From 0db03a3d92fda3c0cf368826d0fe5a224ad688d0 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 23 Sep 2022 00:59:24 +0100 Subject: cleanups for pdf navigation --- custom/jao-custom-exwm.el | 8 ++++++-- custom/jao-custom-org.el | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'custom') 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" diff --git a/custom/jao-custom-org.el b/custom/jao-custom-org.el index b98f665..8c4d88c 100644 --- a/custom/jao-custom-org.el +++ b/custom/jao-custom-org.el @@ -194,7 +194,7 @@ (jao-transient-major-mode org ["Notes" ("o" "find and open note" jao-org-notes-open) - ("c" "open or create note" jao-org-notes-open-or-create) + ("c" "open or create note" jao-org-notes-create) ("\\" "grep notes" jao-org-notes-grep) ("r" "recoll notes" jao-org-notes-recoll)] ["Current note" :if jao-org-notes-note-p -- cgit v1.2.3