diff --git a/emacs-bookmark.zsh b/emacs-bookmark.zsh index 2eeff98..720c452 100644 --- a/emacs-bookmark.zsh +++ b/emacs-bookmark.zsh @@ -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)) - (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}}) + 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}}) ;; ''|'emacs') if ! [[ -v BM_BOOKMARK_PATH ]]; then