From dcbf8c2aaba1ac8a713358a25d6c568619368a59 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 14 Sep 2014 02:03:50 -0400 Subject: Add org-open-annex-file --- lisp/init-org.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/init-org.el b/lisp/init-org.el index be05b84..b11a82a 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -46,7 +46,17 @@ (org-open-file file) (user-error "No file at point")))) +(defun km/org-open-annex-file () + "Open a git annex file with `org-open-file'." + (interactive) + (-if-let (files (magit-annex-present-files)) + (org-open-file (magit-completing-read "Open annex file" files nil t)) + (message "No annex files found"))) + +(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 "p" 'km/org-open-file-at-point)) (setq initial-major-mode 'org-mode) -- cgit v1.2.3