[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: |
Sean Whitton |
Subject: |
bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers |
Date: |
Fri, 29 Jan 2021 00:05:37 -0700 |
On Fri 29 Jan 2021 at 06:52AM +01, Lars Ingebrigtsen wrote:
> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>> Inspired by Stefan's comment at [1] I came up with this patch to set
>> revert-buffer-function in shell command buffers.
>
> Nice; I've applied your patch to Emacs 28.
Thanks for taking a look!
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.
>> I have a binding for revert-buffer which is nicer to press than M-! M-p
>> RET or M-& M-p RET when repeatedly editing and re-running programs and
>> scripts.
>
> 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.
--
Sean Whitton
0001-Fix-previous-commit-regarding-revert-buffer-function.patch
Description: Text Data
- bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers, Sean Whitton, 2021/01/28
- bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers, Lars Ingebrigtsen, 2021/01/29
- bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers,
Sean Whitton <=
- bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers, Juri Linkov, 2021/01/30
- bug#46151: [External] : bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers, Drew Adams, 2021/01/30
- bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers, Michael Welsh Duggan, 2021/01/30
- bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers, Lars Ingebrigtsen, 2021/01/31
- bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers, Kévin Le Gouguec, 2021/01/31
- bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers, Lars Ingebrigtsen, 2021/01/31