GNU bug report logs - #71049
async-shell-command ends with "Process *Async Shell Command* finished" when remote "direct-async-process"

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dmitry <at> gutov.dev>

Date: Sun, 19 May 2024 00:20:02 UTC

Severity: normal

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 71049-done <at> debbugs.gnu.org
Subject: bug#71049: async-shell-command ends with "Process *Async Shell Command* finished" when remote "direct-async-process"
Date: Sun, 2 Jun 2024 17:10:17 +0300
Hi Michael,

On 02/06/2024 11:36, Michael Albinus wrote:

>> Looking at it again, it does seem like it could still be useful to
>> override or disable the remote history file (right?).
>>
>> But with your patch, what happens when tramp-history-override is a
>> string? Both Tramp and shell will write to it its commands, and upon
>> loading shell will also read history from it, including all of the
>> commands that Tramp had sent to the remote host. Am I reading it
>> correctly?
>>
>> Perhaps instead we could have a connection-local variable like
>> shell-history-file-name, which could be customized by the user to t to
>> disable history - and that could even work per-connection.
> 
> Good idea. Something like this?

Pretty much, thanks.

> diff --git a/lisp/shell.el b/lisp/shell.el
> index 4352811912a..6fb5768c056 100644
> --- a/lisp/shell.el
> +++ b/lisp/shell.el
> @@ -419,6 +419,21 @@ shell--start-prog
>     "Shell file name started in `shell'.")
>   (put 'shell--start-prog 'permanent-local t)
> 
> +(defcustom shell-history-file-name nil
> +  "The history file name used in `shell-mode'.
> +When it is a string, this file name will be used.
> +When it is nil, the environment variable HISTFILE is used.
> +When it is t, no history file name is used in `shell-mode'.
> +
> +The settings obey whether `shell-mode' is invoked in a remote buffer.
> +In that case, HISTFILE is taken from the remote host, and the string is
> +interpreted as local file name on the remote host.

I think it could be used in the local case, too? If the user sets a 
global value for this variable. That could probably simplify the 
implementation.





This bug report was last modified 1 year and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.