unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jürgen Hötzel" <juergen@archlinux.org>
To: emacs-devel@gnu.org
Subject: make eshell-path-env buffer-local
Date: Tue, 8 Jan 2013 15:07:31 +0100	[thread overview]
Message-ID: <CANmXxHPHD4_HC5bF_RF+LqiQU8kPJBUcSc4uXABU2Q5xv=OscQ@mail.gmail.com> (raw)

[-- 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


             reply	other threads:[~2013-01-08 14:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08 14:07 Jürgen Hötzel [this message]
2013-01-08 14:25 ` make eshell-path-env buffer-local 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

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANmXxHPHD4_HC5bF_RF+LqiQU8kPJBUcSc4uXABU2Q5xv=OscQ@mail.gmail.com' \
    --to=juergen@archlinux.org \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).