diff options
author | jao <jao@gnu.org> | 2022-09-23 00:59:24 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-09-23 01:04:05 +0100 |
commit | 0db03a3d92fda3c0cf368826d0fe5a224ad688d0 (patch) | |
tree | 96d62b882b4cba7bc97f4c7fc7420052f6ae1d23 /custom/jao-custom-exwm.el | |
parent | 5a9447886f4930b93813a201bc7194fa183be54f (diff) | |
download | elibs-0db03a3d92fda3c0cf368826d0fe5a224ad688d0.tar.gz elibs-0db03a3d92fda3c0cf368826d0fe5a224ad688d0.tar.bz2 |
cleanups for pdf navigation
Diffstat (limited to 'custom/jao-custom-exwm.el')
-rw-r--r-- | custom/jao-custom-exwm.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/custom/jao-custom-exwm.el b/custom/jao-custom-exwm.el index cbc82b7..169fb26 100644 --- a/custom/jao-custom-exwm.el +++ b/custom/jao-custom-exwm.el @@ -339,7 +339,7 @@ (defun jao-exwm-zathura-goto-org (&optional arg) (interactive "P") (when-let ((info (jao-zathura--file-info (current-buffer)))) - (when-let ((file (jao-org-pdf-to-org-file (car info)))) + (when-let ((file (jao-org-find-for-pdf (car info)))) (let ((newp (not (file-exists-p file)))) (when (or arg newp) (org-store-link nil t)) (find-file-other-window file) @@ -374,11 +374,15 @@ (setq jao-org-links-pdf-store-fun nil) (setq jao-open-doc-fun #'jao-find-or-open)) +(defun jao-exwm-org-to-pdf-file () + (expand-file-name (concat "doc/" (file-name-base buffer-file-name) ".pdf") + (file-name-directory jao-org-notes-dir))) + (defun jao-exwm-zathura-goto-pdf () (interactive) (if jao-browse-doc-use-emacs-p (jao-org-goto-pdf) - (when-let (pdf (jao-org-org-to-pdf-file)) + (when-let (pdf (jao-exwm-org-to-pdf-file)) (jao-zathura-open-doc pdf)))) (with-eval-after-load "org" |