[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make eshell-path-env buffer-local
From: |
Michael Albinus |
Subject: |
Re: make eshell-path-env buffer-local |
Date: |
Tue, 08 Jan 2013 15:25:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Jürgen Hötzel <address@hidden> 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-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
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ürgen
Best regards, Michael.