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 --- init.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 61fa309..52184d9 100644 --- a/init.el +++ b/init.el @@ -1550,7 +1550,7 @@ (let ((title (or title (jao-shell-string "xdotool" "getactivewindow" "getwindowname")))) - (jao-pdf-goto-zathura-org title no-ask))) + (jao-org-open-from-zathura title no-ask))) (defun jao-find-or-open (file &optional page height) (cond ((and jao-browse-doc-use-emacs-p window-system) @@ -1579,6 +1579,14 @@ (jao-buffer-same-mode '(pdf-view-mode doc-view-mode) #'jao-afio-goto-docs)) +(defun jao-open-with-zathura () + (interactive) + (when-let (f buffer-file-name) + (let ((p (jao-doc-view-current-page))) + (cond (jao-river-enabled (jao-river-open-with-zathura f p)) + (jao-sway-enabled (jao-sway-open-with-zathura f p)) + (t (jao-zathura-open f p)))))) + ;; doc:// links for browse-url (defun jao-open-doc-url (url &rest _) (when (string-match "doc://\\([^?]+\\)\\(\\?.*\\)?" url) @@ -1609,14 +1617,6 @@ (interactive) (jao-org-pdf-goto-org 4)) -(defun jao-open-with-zathura () - (interactive) - (when-let (f buffer-file-name) - (let ((p (jao-doc-view-current-page))) - (cond (jao-river-enabled (jao-river-open-with-zathura f p)) - (jao-sway-enabled (jao-sway-open-with-zathura f p)) - (t (jao-zathura-open f p)))))) - (jao-transient-major-mode doc-view ["Notes" ("o" "notes file" jao-org-pdf-goto-org) -- cgit v1.2.3