diff options
author | Abhishek Chandratre <abhishek.chandratre@gmail.com> | 2019-08-20 22:26:30 -0700 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-08-22 19:11:04 +0200 |
commit | c57f12b707d247a00737d39c8b812ec8210e1143 (patch) | |
tree | db9f6ae37846ed153c29062e026e2a239734de28 | |
parent | 4848b8b9aaee7cc66ffca8dd9b5f15b54f6fd0c3 (diff) | |
download | org-mode-c57f12b707d247a00737d39c8b812ec8210e1143.tar.gz |
Fix org-store-link for eshell
lisp/ol-eshell.el (org-eshell-store-link): Replace `dired-directory'
variable with `eshell/pwd' function to find current directory.
During org-store-link `dired-directory' variable returns nil.
Thus replacing it with (eshell/pwd), which returns pwd.
TINYCHANGE
-rw-r--r-- | lisp/ol-eshell.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ol-eshell.el b/lisp/ol-eshell.el index 4de6574..137e30f 100644 --- a/lisp/ol-eshell.el +++ b/lisp/ol-eshell.el @@ -27,6 +27,8 @@ (require 'esh-mode) (require 'ol) +(declare-function eshell/pwd "em-dirs.el" (&rest args)) + (org-link-set-parameters "eshell" :follow #'org-eshell-open :store #'org-eshell-store-link) @@ -55,7 +57,7 @@ "Store a link that, when opened, switches back to the current eshell buffer and the current working directory." (when (eq major-mode 'eshell-mode) - (let* ((command (concat "cd " dired-directory)) + (let* ((command (concat "cd " (eshell/pwd))) (link (concat (buffer-name) ":" command))) (org-link-store-props :link (concat "eshell:" link) |