bookmark handle org-ql-view-buffers-files as function
This commit is contained in:
parent
5a0ed259bc
commit
c457adf2d9
1 changed files with 3 additions and 1 deletions
|
|
@ -528,7 +528,8 @@ dates in the past, and negative for dates in the future."
|
||||||
(defun org-ql-view--bookmark-make-record ()
|
(defun org-ql-view--bookmark-make-record ()
|
||||||
"Return a bookmark record for the current Org QL View buffer."
|
"Return a bookmark record for the current Org QL View buffer."
|
||||||
(cl-labels ((file-nameize
|
(cl-labels ((file-nameize
|
||||||
(b-f) (or (buffer-file-name b-f)
|
(b-f) (or (when (stringp b-f) b-f)
|
||||||
|
(buffer-file-name b-f)
|
||||||
(when (buffer-base-buffer b-f)
|
(when (buffer-base-buffer b-f)
|
||||||
(buffer-file-name (buffer-base-buffer b-f)))
|
(buffer-file-name (buffer-base-buffer b-f)))
|
||||||
(user-error "Only file-backed buffers can be bookmarked by Org QL View: %s" b-f))))
|
(user-error "Only file-backed buffers can be bookmarked by Org QL View: %s" b-f))))
|
||||||
|
|
@ -537,6 +538,7 @@ dates in the past, and negative for dates in the future."
|
||||||
;; Replace buffers with their filenames, and signal error if any are not file-backed.
|
;; Replace buffers with their filenames, and signal error if any are not file-backed.
|
||||||
(setf plist (plist-put plist :buffers-files
|
(setf plist (plist-put plist :buffers-files
|
||||||
(cl-etypecase buffers-files
|
(cl-etypecase buffers-files
|
||||||
|
(function (funcall buffers-files))
|
||||||
(string buffers-files)
|
(string buffers-files)
|
||||||
(buffer (file-nameize buffers-files))
|
(buffer (file-nameize buffers-files))
|
||||||
(list (cl-loop for b-f in buffers-files
|
(list (cl-loop for b-f in buffers-files
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue