From: Abhishek Chandratre <abhishek.chandratre@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Fixing org-store-link for eshell
Date: Tue, 20 Aug 2019 23:20:06 -0700 [thread overview]
Message-ID: <CAPfbJ9+g7wehvTsqfi5UtFCy-oHws6Y8L=MudaC2riKxRBnpnQ@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 719 bytes --]
Hello all,
Thank you for supporting and maintaining org mode.
I wanted to use org-store-link for eshell, but it failed.
Looked like dired-directory was nil, I fixed it by calling (eshell/pwd) to
get pwd.
I tested with and without TRAMP, works like a charm.
The patch did not create new test case failures, but for master branch on
my machine I saw 6 test case failure (not related to patch).
6 unexpected results:
FAILED ob-sed-test/cmd-line-header-argument
FAILED ob-shell/bash-uses-assoc-arrays
FAILED ob-tangle/jump-to-org
FAILED test-ob-shell/session
FAILED test-org-attach/dir
FAILED test-org-table/sort-lines
I will try investigate and address them in another patch.
Thanks,
-Abhishek
[-- Attachment #1.2: Type: text/html, Size: 1009 bytes --]
[-- Attachment #2: 0001-ol-eshell.el-Fix-org-store-link-for-eshell.patch --]
[-- Type: application/octet-stream, Size: 1132 bytes --]
From 37c77d8e563428dcc44c69fa4cd377639730734f Mon Sep 17 00:00:00 2001
From: Abhishek Chandratre <abhishek.chandratre@gmail.com>
Date: Tue, 20 Aug 2019 22:26:30 -0700
Subject: [PATCH] ol-eshell.el: 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
---
lisp/ol-eshell.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/ol-eshell.el b/lisp/ol-eshell.el
index 4de657461..a9a72a534 100644
--- a/lisp/ol-eshell.el
+++ b/lisp/ol-eshell.el
@@ -55,7 +55,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)
--
2.20.1 (Apple Git-117)
next reply other threads:[~2019-08-21 6:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 6:20 Abhishek Chandratre [this message]
2019-08-22 17:12 ` [PATCH] Fixing org-store-link for eshell Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPfbJ9+g7wehvTsqfi5UtFCy-oHws6Y8L=MudaC2riKxRBnpnQ@mail.gmail.com' \
--to=abhishek.chandratre@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.