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: Stefan Monnier
Subject: Re: master f8b2a01a9e: * lisp/shell.el (shell): Query shell file name from `interactive`
Date: Sat, 28 May 2022 13:58:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> Does the patch below look correct to you?
>> It also tries to address the FIXME while we're at it.
> I'm not sure. You use `buffer', and not `buf' for the interactive spec.

Could you clarify what you mean by that?

I check nullness of `buffer` so as to preserve the existing behavior
where we prompt for the shell's directory only when current-prefix-arg
is specified.

And the interactive spec returns (list buffer ...) rather than (list
buf ...) again so as to preserve the existing behavior (tho I don't
think it would make any difference in practice other than the
information it leaves in `command-history`).

> OTOH, you set `default-directory' in `buf', which might cure it.

Cure what?

> Anyway, it would be an incompatible (but appreciated) change.

What change are you referring to?

> If you have an existing shell buffer, it would be reused as-it-is, and
> you cannot change its remoteness.  Something, which has been plagued me
> since ever.

Hmm... I don't understand.  AFAICT both with my new code and with the
existing code `C-u M-x shell` will prompt for the shell's directory if
it's done from within (and "to") a shell buffer with  remote
default-directory, no?

> Hmm, do we have test cases for this, for both the local and the remote
> case, for both an existing and a new shell buffer?

AFAICT we don't (we have rather few tests in `shell-tests.el`).

> (If not, I could volunteer to write them, but it might take some
> days then.)

That would be very appreciated.


        Stefan




reply via email to

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