emacs-devel
[Top][All Lists]
Advanced

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

Re: master b2150e0: Preserve point under 'dired-auto-revert-buffer' (sec


From: Stephen Berman
Subject: Re: master b2150e0: Preserve point under 'dired-auto-revert-buffer' (second case)
Date: Wed, 19 Jul 2017 12:23:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Wed, 19 Jul 2017 10:18:32 +0200 martin rudalics <address@hidden> wrote:

>> This is what's supposed to happen
>> (what the test tests for): (1) the todo-mode buffer is displayed in a
>> window; (2) calling dired makes the window display a directory; (3)
>> calling todo-show makes the window display the todo-mode buffer again;
>> (4) calling todo-quit buries the todo-mode buffer, so the window
>> displays the directory again; (5) now immediately calling quit-window in
>> the directory should not make the window display the todo-mode buffer
>> again, if there is an alternative.  This worked when dired used
>> switch-to-buffer, but no longer works now that dired uses
>> pop-to-buffer-same-window.  I'd be grateful for any advice.
>
> The problematic step is (4).  ‘quit-window’ has no idea of the semantics
> of ‘bury-buffer’ (neither do I).  But if no one objects we could install
> the attached patch.

Thanks for the patch (and the clarifications).  But I feel uneasy about
changing a general function to cater to the specific needs of todo-mode,
unless it is certain that the change would not cause problems for other
existing uses.  This unease prompted me to look at todo-quit again, and
it turns out that replacing bury-buffer there by quit-window DTRT as
described above.  So I will make that change and there's no need to
change bury-buffer.  This should also mean the existing test will work
again without change (I'll confirm with `make check' before pushing).
(I had taken over the invocation of bury-buffer in todo-quit from the
old first version of todo-mode.el, which I believe predates the
introduction quit-window, and till now had not second-guessed its use.
Better late than never.)

Thanks for the feedback.

Steve Berman



reply via email to

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