From 158989de65409042f4933ec2cea118e91a285257 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 12 Sep 2014 01:01:18 -0400 Subject: Add org-open-file-at-point --- lisp/init-org.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/init-org.el b/lisp/init-org.el index 858b7de..be05b84 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -38,6 +38,17 @@ (interactive) (find-file org-default-notes-file)) +(defun km/org-open-file-at-point () + "Open file at point with `org-open-file'." + (interactive) + (let ((file (thing-at-point 'filename))) + (if (and file (file-exists-p file)) + (org-open-file file) + (user-error "No file at point")))) + +(after 'init-buffile + (define-key km/file-map "p" 'km/org-open-file-at-point)) + (setq initial-major-mode 'org-mode) (define-prefix-command 'km/global-org-map) -- cgit v1.2.3