summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-09-27 21:12:30 -0400
committerKyle Meyer <kyle@kyleam.com>2014-09-27 21:12:30 -0400
commit31c0a8283b8c7ec08319ddd8f304080422384691 (patch)
treea67942e029055b85a825f43ebd58966d490cf8c5 /lisp
parent1c2691c04c7323ee510bd6fa9bb2b29f9c256010 (diff)
downloademacs.d-31c0a8283b8c7ec08319ddd8f304080422384691.tar.gz
Add org-open-recent-file
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-org.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/init-org.el b/lisp/init-org.el
index 02bfa65..55421f1 100644
--- a/lisp/init-org.el
+++ b/lisp/init-org.el
@@ -65,12 +65,19 @@ PDF files are not ignored."
(org-open-file (magit-completing-read "Open annex file" files nil t))
(message "No annex files found")))
+(defun km/org-open-recent-file ()
+ "Open a file from `recentf-list' with `org-open-file'."
+ (interactive)
+ (-when-let (file (km/read-recent-file))
+ (org-open-file file)))
+
(autoload 'magit-annex-present-files "magit-annex")
(after 'init-buffile
(define-key km/file-map "a" 'km/org-open-annex-file)
(define-key km/file-map "o" 'km/org-open-file)
- (define-key km/file-map "p" 'km/org-open-file-at-point))
+ (define-key km/file-map "p" 'km/org-open-file-at-point)
+ (define-key km/file-map "r" 'km/org-open-recent-file))
(setq initial-major-mode 'org-mode)