summaryrefslogtreecommitdiffhomepage
path: root/init.org
diff options
context:
space:
mode:
Diffstat (limited to 'init.org')
-rw-r--r--init.org19
1 files changed, 9 insertions, 10 deletions
diff --git a/init.org b/init.org
index 84df426..e3119d7 100644
--- a/init.org
+++ b/init.org
@@ -1796,7 +1796,7 @@
(defun jao-rss--feeds-dirs ()
(mapcar (lambda (d) (cadr (split-string d "\\.")))
- (directory-files (jao-gnus-dir "Mail/") nil "^feeds")))
+ (directory-files "~/.emacs.d/gnus/Mail/" nil "^feeds")))
(defun jao-rss-subscribe (url)
"Subscribe to a given RSS URL. If URL not given, look for it."
@@ -1883,8 +1883,11 @@
(string-to-number (match-string 4 title))
(match-string 2 title))))
- (defun jao-zathura-goto-org (title)
- (when-let* ((info (jao-zathura-file-info title))
+ (defun jao-zathura-goto-org (&optional title)
+ (when-let* ((title (or title (jao-shell-string "xdotool"
+ "getactivewindow"
+ "getwindowname")))
+ (info (jao-zathura-file-info title))
(file (jao-org-pdf-to-org-file (car info)))
(page (cadr info))
(pageno (or (car (last info)) page)))
@@ -1917,6 +1920,7 @@
:after doc-view)
(setq jao-open-doc-fun 'jao-find-or-open)
+ (setq jao-org-open-pdf-fun 'jao-find-or-open)
(defun jao-find-or-open (file &optional page height)
(if (and jao-browse-doc-use-emacs-p window-system)
@@ -1927,7 +1931,8 @@
(throw 'done (car buffs)))
(setq buffs (cdr buffs))))))
(jao-afio--goto-docs)
- (if b (pop-to-buffer b) (find-file file)))
+ (if b (pop-to-buffer b) (find-file file))
+ (when page (jao-doc-view-goto-page page height)))
(jao-zathura-open file page)))
(defun jao-open-doc (&optional file page height)
@@ -1937,12 +1942,6 @@
(concat jao-org-dir "/doc/"))))
(funcall jao-open-doc-fun file page height)))
- (defun jao-afio-open-pdf (file page &optional height)
- (jao-open-doc file page height)
- (when page (jao-doc-view-goto-page page height)))
-
- (setq jao-org-open-pdf-fun #'jao-afio-open-pdf)
-
(defun jao-select-pdf ()
(interactive)
(jao-buffer-same-mode '(pdf-view-mode doc-view-mode)