From 553eeb1bd4975652b7ab0f766bf567fe24816dc7 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 24 Sep 2016 00:32:06 -0400 Subject: Add org-open-last-pdf command Mostly for binding to i3wm key. --- lisp/km-org.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lisp') 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 -- cgit v1.2.3