Fix: Abbreviate file paths in created org-ql bookmarks
This commit is contained in:
parent
9dfa534e60
commit
da2bab2552
1 changed files with 7 additions and 6 deletions
|
|
@ -533,12 +533,13 @@ dates in the past, and negative for dates in the future."
|
|||
(defun org-ql-view-bookmark-make-record ()
|
||||
"Return a bookmark record for the current Org QL View buffer."
|
||||
(cl-labels ((file-nameize
|
||||
(b-f) (cl-typecase b-f
|
||||
(string b-f)
|
||||
(buffer (or (buffer-file-name b-f)
|
||||
(when (buffer-base-buffer b-f)
|
||||
(buffer-file-name (buffer-base-buffer b-f)))))
|
||||
(t (user-error "Only file-backed buffers can be bookmarked by Org QL View: %s" b-f)))))
|
||||
(b-f) (abbreviate-file-name
|
||||
(cl-typecase b-f
|
||||
(string b-f)
|
||||
(buffer (or (buffer-file-name b-f)
|
||||
(when (buffer-base-buffer b-f)
|
||||
(buffer-file-name (buffer-base-buffer b-f)))))
|
||||
(t (user-error "Only file-backed buffers can be bookmarked by Org QL View: %s" b-f))))))
|
||||
(-let* ((plist (org-ql-view--plist (current-buffer)))
|
||||
((&plist :buffers-files) plist))
|
||||
;; Replace buffers with their filenames, and signal error if any are not file-backed.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue