summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-09-24 00:32:06 -0400
committerKyle Meyer <kyle@kyleam.com>2016-09-24 00:32:06 -0400
commit553eeb1bd4975652b7ab0f766bf567fe24816dc7 (patch)
treed55bb30358fe805b6cb62d49ede3e8d3384d812a /lisp
parent92ce20f13e33d6cae5653c02641f74e60cff583e (diff)
downloademacs.d-553eeb1bd4975652b7ab0f766bf567fe24816dc7.tar.gz
Add org-open-last-pdf command
Mostly for binding to i3wm key.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-org.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/km-org.el b/lisp/km-org.el
index 29df941..2a00814 100644
--- a/lisp/km-org.el
+++ b/lisp/km-org.el
@@ -654,6 +654,14 @@ to be easily overriden.")
(interactive)
(org-open-file (read-file-name "Open file: " nil nil t)))
+;;;###autoload
+(defun km/org-open-last-pdf ()
+ (interactive)
+ (let ((file (cl-find-if (lambda (x) (string-match-p "\\.pdf\\'" x))
+ recentf-list)))
+ (when file
+ (org-open-file file))))
+
(autoload 'magit-annex-present-files "magit-annex")
(autoload 'magit-completing-read "magit-utils")
;;;###autoload