diff options
-rw-r--r-- | exwm.org | 13 | ||||
-rw-r--r-- | init.org | 7 |
2 files changed, 17 insertions, 3 deletions
@@ -394,6 +394,15 @@ (when (not jao-browse-doc-use-emacs-p) (jao-exwm-pdf-enable-zathura)) + (defun jao-exwm-select-pdf () + (interactive) + (if jao-browse-doc-use-emacs-p + (jao-buffer-same-mode 'doc-view-mode #'jao-afio--goto-docs) + (when-let (bs (jao-zathura--buffers)) + (let ((infos (mapcar #'jao-zathura--file-info bs))) + (when-let (f (completing-read "Document: " (mapcar #'car infos))) + (jao-zathura-open-doc f)))))) + #+end_src * Hydras #+begin_src emacs-lisp @@ -442,8 +451,8 @@ ("Notes" (("n" jao-org-notes-open-or-create "capture note") ("N" jao-org-notes-open "go to note") - ("d" (jao-buffer-same-mode 'doc-view-mode #'jao-afio--goto-docs) - "go to doc")) + ("d" jao-exwm-select-pdf "go to doc") + ("D" jao-open-doc "open to doc")) "Packages" (("a" jao-vterm-aptitude "aptitude") ("l" jao-exwm-paradox "packages") @@ -2212,7 +2212,12 @@ (jao-afio--goto-docs) (if b (pop-to-buffer b) (find-file file)))) - (defun jao-open-doc (file) (funcall jao-open-doc-fun file)) + (defun jao-open-doc (&optional file) + (interactive) + (when-let (file (or file + (read-file-name "Document: " + (concat jao-org-dir "/doc/")))) + (funcall jao-open-doc-fun file))) (defun jao-open-pdf-session () (interactive) |