From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: make eshell-path-env buffer-local Date: Tue, 08 Jan 2013 15:25:02 +0100 Message-ID: <87fw2bg3b5.fsf@gmx.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1357655117 10350 80.91.229.3 (8 Jan 2013 14:25:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Jan 2013 14:25:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?utf-8?Q?J=C3=BCrgen_H=C3=B6tzel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 08 15:25:34 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tsa7R-0003VB-V0 for ged-emacs-devel@m.gmane.org; Tue, 08 Jan 2013 15:25:34 +0100 Original-Received: from localhost ([::1]:53306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tsa7C-0006te-Ak for ged-emacs-devel@m.gmane.org; Tue, 08 Jan 2013 09:25:18 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tsa77-0006rj-EP for emacs-devel@gnu.org; Tue, 08 Jan 2013 09:25:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tsa76-0003qy-A6 for emacs-devel@gnu.org; Tue, 08 Jan 2013 09:25:13 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:56901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tsa76-0003pj-0w for emacs-devel@gnu.org; Tue, 08 Jan 2013 09:25:12 -0500 Original-Received: from mailout-de.gmx.net ([10.1.76.12]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0McTJ0-1Tb3EF1Za4-00HhZa for ; Tue, 08 Jan 2013 15:25:11 +0100 Original-Received: (qmail invoked by alias); 08 Jan 2013 14:25:09 -0000 Original-Received: from p57BB97DA.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.151.218] by mail.gmx.net (mp012) with SMTP; 08 Jan 2013 15:25:09 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18zFKRGqCAzbHHOf4wVDZprl4l9uV+FKQKEHnqcbn PhC82QpbP0hYe9 In-Reply-To: (=?utf-8?Q?=22J=C3=BCrgen_H=C3=B6tzel=22's?= message of "Tue, 8 Jan 2013 15:07:31 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156142 Archived-At: J=C3=BCrgen H=C3=B6tzel writes: > Hi, Hi Juergen, > this is required when running multiple Eshell buffers on different > Hosts: To prevent garbling the different PATHs. > > Any objections against this commit? > > 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-direct= ory'." > - (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")))) >=20=20 > (eval-after-load "esh-util" > '(progn Wouldn't it be more consistent to declare `eshell-path-env' buffer-local in esh-util.el? [Sorry to react late; I haven't seen the proposed patch before] > J=C3=BCrgen Best regards, Michael.