bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#46151: 28.0.50; Set revert-buffer-function in shell command output b


From: Lars Ingebrigtsen
Subject: bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers
Date: Fri, 29 Jan 2021 08:21:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Sean Whitton <spwhitton@spwhitton.name> writes:

> I realised that my patch needs to setq-local not just setq.  Indeed, my
> previous patch breaks revert-buffer once you've run a shell command...
>
> Attached is a fix.

Heh, that explains why my Emacs was behaving so oddly.  :-)

Fix now pushed.

>> Would it make sense to just define a tiny mode that just defines the `g'
>> command to revert and use that in these buffers?
>
> For M-!, yes, that would be useful and simple.
>
> For M-&, the mode would need to be activated only once the command had
> finished running, as otherwise 'g' should be sent to the inferior
> process.  Not hard to do that either.
>
> I take it a minor mode is more appropriate than a major mode for this?
> If so, I can come up with a patch adding that to simple.el.

Since M-! and M-& use different modes (fundamental and shell), a minor
mode is probably the best, I guess.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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