GNU bug report logs -
#46151
28.0.50; Set revert-buffer-function in shell command output buffers
Previous Next
Reported by: Sean Whitton <spwhitton <at> spwhitton.name>
Date: Thu, 28 Jan 2021 06:23:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello,
On Sat 30 Jan 2021 at 07:18AM +01, Lars Ingebrigtsen wrote:
> Sean Whitton <spwhitton <at> spwhitton.name> writes:
>
>> This sort of thing could be pretty annoying if you happened to want to
>> type the letter 'g' and thereby reran the command ..
>
> Indeed -- I was thinking about the `M-!' case only, and whether we'd
> want to change the mode of the resulting buffer to a new mode that
> inherits from `special-mode' (and `special-mode' defines the `g'
> keystroke already).
>
> That's not appropriate for `M-&', I guess, which is in `shell-mode'...
> but is that a good mode for command output, really?
I think it's in shell-mode to facilitate interacting with the command
while it is running -- for example, using C-c C-c to sent SIGINT, and
also just typing into STDIN.
So we're talking about switching the major-mode at the point the command
exits, which seems like it could cause frustration -- imagine the
command finishes up just while you're typing into the buffer and you
happen to type 'g' ...
>> How about binding C-c C-r instead of g? The mnemonic would be
>> Reexecute. In *Async Shell Command* buffers this already has an
>> inherited binding but I don't believe it is one that does anything
>> useful in those buffers, so should be fine to override.
>>
>> An alternative would be to put the whole buffer in special-mode, which
>> would bind 'g', and make shell command output more like M-x compile
>> buffers. Could have a defcustom to turn this off.
>
> Indeed.
Thinking more, I think my C-c C-r solution is the one I prefer; anyone
else in favour of that?
--
Sean Whitton
This bug report was last modified 4 years and 106 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.