diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-09-24 00:32:06 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-09-24 00:32:06 -0400 |
commit | 553eeb1bd4975652b7ab0f766bf567fe24816dc7 (patch) | |
tree | d55bb30358fe805b6cb62d49ede3e8d3384d812a /lisp | |
parent | 92ce20f13e33d6cae5653c02641f74e60cff583e (diff) | |
download | emacs.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.el | 8 |
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 |