summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--custom/jao-custom-browse.el1
-rw-r--r--custom/jao-custom-exwm.el8
-rw-r--r--custom/jao-custom-x11.el2
-rw-r--r--init.el8
-rw-r--r--lib/doc/jao-mac.el2
-rw-r--r--lib/doc/jao-pdf.el3
6 files changed, 15 insertions, 9 deletions
diff --git a/custom/jao-custom-browse.el b/custom/jao-custom-browse.el
index ebe023d..99b7fda 100644
--- a/custom/jao-custom-browse.el
+++ b/custom/jao-custom-browse.el
@@ -4,7 +4,6 @@
(require 'jao-url)
;;; variables
-(defvar jao-browse-doc-use-emacs t)
(defvar jao-browse-url-function nil)
(defvar jao-browse-url-external-function nil)
diff --git a/custom/jao-custom-exwm.el b/custom/jao-custom-exwm.el
index 291b78d..5e4a354 100644
--- a/custom/jao-custom-exwm.el
+++ b/custom/jao-custom-exwm.el
@@ -366,7 +366,7 @@
(defun jao-exwm-pdf-enable-zathura ()
(interactive)
(add-hook 'kill-emacs-query-functions #'jao-exwm-pdf-zathura-close-all t)
- (setq jao-browse-doc-use-emacs nil)
+ (setq jao-pdf-open-in-emacs nil)
(setq jao-org-open-pdf-fun #'jao-zathura-open-doc)
(setq jao-org-links-pdf-store-fun #'jao-exwm-org-store-zathura-link)
(setq jao-open-doc-fun #'jao-zathura-open-doc))
@@ -374,7 +374,7 @@
(defun jao-exwm-pdf-disable-zathura ()
(interactive)
(remove-hook 'kill-emacs-query-functions #'jao-exwm-pdf-zathura-close-all)
- (setq jao-browse-doc-use-emacs t)
+ (setq jao-pdf-open-in-emacs t)
(setq jao-org-open-pdf-fun #'jao-find-or-open)
(setq jao-org-links-pdf-store-fun nil)
(setq jao-open-doc-fun #'jao-find-or-open))
@@ -385,7 +385,7 @@
(defun jao-exwm-zathura-goto-pdf ()
(interactive)
- (if jao-browse-doc-use-emacs
+ (if jao-pdf-open-in-emacs
(jao-org-goto-pdf)
(when-let (pdf (jao-exwm-org-to-pdf-file))
(jao-zathura-open-doc pdf))))
@@ -393,7 +393,7 @@
(with-eval-after-load "org"
(define-key org-mode-map (kbd "C-c o") #'jao-exwm-zathura-goto-pdf))
-(when (not jao-browse-doc-use-emacs)
+(when (not jao-pdf-open-in-emacs)
(jao-exwm-pdf-enable-zathura))
(defun jao-exwm-select-pdf ()
diff --git a/custom/jao-custom-x11.el b/custom/jao-custom-x11.el
index 57681d5..3311668 100644
--- a/custom/jao-custom-x11.el
+++ b/custom/jao-custom-x11.el
@@ -33,7 +33,7 @@
;;; xmonad
(defun jao-xmonad-enable ()
- (setq jao-browse-doc-use-emacs (display-graphic-p))
+ (setq jao-pdf-open-in-emacs (display-graphic-p))
(setq jao-mode-line-in-minibuffer nil)
(display-battery-mode -1)
(jao-trisect)
diff --git a/init.el b/init.el
index 79b31cd..0454fd4 100644
--- a/init.el
+++ b/init.el
@@ -1809,6 +1809,12 @@
(defun jao-open-nnw () (interactive) (jao-mac-open "-a NetNewsWire"))
(defun jao-open-safari () (interactive) (jao-mac-open "-a Safari"))
(defun jao-open-telegram () (interactive) (jao-mac-open "-a Telegram"))
+
+ (defun jao-open-skim-doc-in-emacs ()
+ (interactive)
+ (let ((jao-pdf-open-in-emacs t))
+ (jao-skim-open-current-doc)))
+
(global-set-key (kbd "s-f") #'jao-open-safari)
;; (global-set-key (kbd "s-n") #'jao-open-nnw)
(global-set-key (kbd "s-t") #'jao-open-telegram)
@@ -1832,7 +1838,7 @@
["External"
("xn" "browse NNW article" jao-nnw-browse-current-article)
("xs" "browse safary article" jao-safari-internal-browse)
- ("xk" "open skim doc" jao-skim-open-current-doc)
+ ("xk" "open skim doc" jao-open-skim-doc-in-emacs)
("xe" "choose an emoji" ns-do-show-character-palette)]
["Blog"
("bn" "create post" jao-org-static-blog-create-new-post)
diff --git a/lib/doc/jao-mac.el b/lib/doc/jao-mac.el
index 96da735..cb16752 100644
--- a/lib/doc/jao-mac.el
+++ b/lib/doc/jao-mac.el
@@ -196,7 +196,7 @@
(defun jao-devon-open (file &optional page height)
(let ((url (jao-devon-find-url file)))
(if (string-empty-p (or url ""))
- (let ((jao-browse-doc-use-emacs t))
+ (let ((jao-pdf-open-in-emacs t))
(jao-find-or-open file page height))
(let* ((p (if page (format "?page=%s" (- page 1)) ""))
(u (format "%s%s" url p)))
diff --git a/lib/doc/jao-pdf.el b/lib/doc/jao-pdf.el
index fc332ab..162cd9a 100644
--- a/lib/doc/jao-pdf.el
+++ b/lib/doc/jao-pdf.el
@@ -125,9 +125,10 @@
(user-error "Skim is not viewing any docs!"))))
;;; Open doc functions
+(defvar jao-pdf-open-in-emacs t)
(defun jao-find-or-open (file &optional page height)
- (cond ((and jao-browse-doc-use-emacs window-system)
+ (cond ((and jao-pdf-open-in-emacs window-system)
(let* ((buffs (buffer-list))
(b (catch 'done
(while buffs