emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master f8b2a01a9e: * lisp/shell.el (shell): Query shell file name fr


From: Michael Albinus
Subject: Re: master f8b2a01a9e: * lisp/shell.el (shell): Query shell file name from `interactive`
Date: Sat, 28 May 2022 11:19:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier via Mailing list for Emacs changes <emacs-diffs@gnu.org>
writes:

Hi Stefan,

> @@ -771,7 +773,20 @@ Make the shell buffer the current buffer, and return it.
>                    (expand-file-name
>                     (read-directory-name
>                      "Default directory: " default-directory default-directory
> -                    t nil))))))))
> +                    t nil))))))
> +    ;; On remote hosts, the local `shell-file-name' might be useless.
> +    (when (and (file-remote-p default-directory)
> +               (null explicit-shell-file-name)
> +               (null (getenv "ESHELL")))
> +      ;; `expand-file-name' shall not add the MS Windows volume letter
> +      ;; (Bug#49229).
> +      (replace-regexp-in-string
> +       "^[[:alpha:]]:" ""
> +       (file-local-name
> +        (expand-file-name
> +         (read-file-name "Remote shell path: " default-directory
> +                         shell-file-name t shell-file-name
> +                         #'file-remote-p)))))))
>    (setq buffer (if (or buffer (not (derived-mode-p 'shell-mode))
>                         (comint-check-proc (current-buffer)))
>                     (get-buffer-create (or buffer "*shell*"))
> @@ -782,21 +797,8 @@ Make the shell buffer the current buffer, and return it.
>    (pop-to-buffer buffer display-comint-buffer-action)
>
>    (with-connection-local-variables
> -   ;; On remote hosts, the local `shell-file-name' might be useless.
> -   (when (and (file-remote-p default-directory)
> -              (called-interactively-p 'any)
> -              (null explicit-shell-file-name)
> -              (null (getenv "ESHELL")))
> -     ;; `expand-file-name' shall not add the MS Windows volume letter
> -     ;; (Bug#49229).
> -     (setq-local explicit-shell-file-name
> -                 (replace-regexp-in-string
> -                  "^[[:alpha:]]:" ""
> -                  (file-local-name
> -                   (expand-file-name
> -                    (read-file-name "Remote shell path: " default-directory
> -                                    shell-file-name t shell-file-name
> -                                    #'file-remote-p))))))

This misses the `with-connection-local-variables' wrapper in the
`interactive' form. Is this intended? It would be a serious regression.

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]