diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-06-11 22:21:53 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-06-11 22:21:53 -0400 |
commit | 8021030ed8f723778b230ee09a4e8f89ca1fbf13 (patch) | |
tree | 6a37593277f01722799ce206591cd59a0af3da09 /lisp | |
parent | 96e57eb443d71235914bff499e0fd19e52d468c2 (diff) | |
download | emacs.d-8021030ed8f723778b230ee09a4e8f89ca1fbf13.tar.gz |
Use dired-jump for org-open-link-directory
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-org.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/init-org.el b/lisp/init-org.el index f7c0c38..99f55ef 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -637,14 +637,14 @@ The hook functions and `org-store-link' are called within a (run-hooks 'km/org-store-link-hook) (call-interactively 'org-store-link))) -(defun km/org-open-link-directory () +(defun km/org-link-dired-jump () "Open Dired for directory of file link at point." (interactive) (let ((el (org-element-lineage (org-element-context) '(link) t))) (unless (and el (equal (org-element-property :type el) "file")) (user-error "Not on file link")) - (dired (file-name-directory - (org-element-property :path el))))) + (dired-jump 'other-window + (expand-file-name (org-element-property :path el))))) (after 'org-link-edit (defun km/org-link-edit-slurp-link () @@ -665,7 +665,7 @@ beginning of the link." (goto-char beg) slurped))))) -(define-key km/org-prefix-map "d" 'km/org-open-link-directory) +(define-key km/org-prefix-map "d" 'km/org-link-dired-jump) (define-key km/global-org-map "l" 'km/org-store-link) (define-key km/org-prefix-map "." |