summaryrefslogtreecommitdiffhomepage
path: root/custom
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-09-23 00:59:24 +0100
committerjao <jao@gnu.org>2022-09-23 01:04:05 +0100
commit0db03a3d92fda3c0cf368826d0fe5a224ad688d0 (patch)
tree96d62b882b4cba7bc97f4c7fc7420052f6ae1d23 /custom
parent5a9447886f4930b93813a201bc7194fa183be54f (diff)
downloadelibs-0db03a3d92fda3c0cf368826d0fe5a224ad688d0.tar.gz
elibs-0db03a3d92fda3c0cf368826d0fe5a224ad688d0.tar.bz2
cleanups for pdf navigation
Diffstat (limited to 'custom')
-rw-r--r--custom/jao-custom-exwm.el8
-rw-r--r--custom/jao-custom-org.el2
2 files changed, 7 insertions, 3 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"
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