Fix newlines in filenames in emacs-bookmark.zsh

This commit is contained in:
Alexander Rosenberg 2024-03-10 18:11:29 -07:00
parent 8459b7e1ac
commit c94d82c571
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -26,14 +26,18 @@ function __bm_update_bookmark_list {
local quoted_output
case "${BM_MODE}" in
'daemon')
quoted_output=(${(z)${"$(command emacsclient --eval \
"(let ((out))
quoted_output=(${(z)${"$(command emacs -Q --batch --eval \
"(prin1
(progn
(require 'server)
(server-eval-at \"server\"
'(let ((out))
(dolist (entry bookmark-alist out)
(let ((path (alist-get 'filename (cdr entry) ""))
(pos (alist-get 'position (cdr entry) 1)))
(setq out (append (list (car entry) path
(expand-file-name path) pos)
out)))))")":1:-1}})
out))))))))")":1:-1}})
;;
''|'emacs')
if ! [[ -v BM_BOOKMARK_PATH ]]; then