Subject: Re: bug#71049: async-shell-command ends with "Process *Async Shell Command* finished" when remote "direct-async-process"

From: Eli Zaretskii <[email-masked]>
Date: Fri, 31 May 2024 21:05:32 +0300

> Date: Fri, 31 May 2024 19:24:10 +0300
> Cc: [email-masked], [email-masked]
> From: Dmitry Gutov <[email-masked]>
> 
> On 31/05/2024 08:53, Eli Zaretskii wrote:
> 
> >> 1) [first patch] We can add a new major mode, for 'M-&' to use instead
> >> of the full-blown 'shell-mode' - it could be very simple: just apply
> >> font-lock keywords and maybe set list-buffers-directory.
> > 
> > I think I'm okay with this.  (It needs to be prominently documented,
> > of course.)
> 
> In NEWS?

There, but also in the doc string of M-&, and maybe also in the doc
string of shell-mode-hook.

> > But we need a documented way for people to get previous
> > behavior if they want that.  How would that work?
> 
> If we really needed the capability to rollback the change, I suppose we 
> could add a defvar pointing to the major mode to use. I.e.
> 
>    (defvar async-shell-command-major-mode #'shell-command-mode)

That could work, yes.