all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* make eshell-path-env buffer-local
@ 2013-01-08 14:07 Jürgen Hötzel
  2013-01-08 14:25 ` Michael Albinus
  0 siblings, 1 reply; 6+ messages in thread
From: Jürgen Hötzel @ 2013-01-08 14:07 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]

Hi,

this is required when running multiple Eshell buffers on different
Hosts: To prevent garbling the different PATHs.

Any objections against this commit?

Jürgen

[-- Attachment #2: 0001-set-eshell-path-env-buffer-local.patch --]
[-- Type: application/octet-stream, Size: 1236 bytes --]

From 58f16a811c6f0ed9afa12fe7cedbfe76681bc169 Mon Sep 17 00:00:00 2001
From: Juergen Hoetzel <juergen@archlinux.org>
Date: Tue, 8 Jan 2013 13:29:48 +0100
Subject: [PATCH] set eshell-path-env buffer-local

---
 lisp/tramp.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lisp/tramp.el b/lisp/tramp.el
index f8db03e..e333ad0 100644
--- a/lisp/tramp.el
+++ b/lisp/tramp.el
@@ -3896,14 +3896,14 @@ Only works for Bourne-like shells."
 ;; when `default-directory' points to another host.
 (defun tramp-eshell-directory-change ()
   "Set `eshell-path-env' to $PATH of the host related to `default-directory'."
-  (setq eshell-path-env
-	(if (file-remote-p default-directory)
-	    (with-parsed-tramp-file-name default-directory nil
-	      (mapconcat
-	       'identity
-	       (tramp-get-connection-property v "remote-path" nil)
-	       ":"))
-	  (getenv "PATH"))))
+  (set (make-local-variable 'eshell-path-env)
+       (if (file-remote-p default-directory)
+	   (with-parsed-tramp-file-name default-directory nil
+	     (mapconcat
+	      'identity
+	      (tramp-get-connection-property v "remote-path" nil)
+	      ":"))
+	 (getenv "PATH"))))
 
 (eval-after-load "esh-util"
   '(progn
-- 
1.8.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-17 10:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 14:07 make eshell-path-env buffer-local Jürgen Hötzel
2013-01-08 14:25 ` Michael Albinus
2013-01-08 14:53   ` Jürgen Hötzel
2013-01-08 15:11     ` Michael Albinus
2013-01-08 17:19       ` Jürgen Hötzel
2013-01-17 10:05         ` Michael Albinus

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.