From: Stephen Berman <stephen.berman@gmx.net>
To: martin rudalics <rudalics@gmx.at>
Cc: Glenn Morris <rgm@gnu.org>, emacs-devel@gnu.org
Subject: Re: master b2150e0: Preserve point under 'dired-auto-revert-buffer' (second case)
Date: Wed, 19 Jul 2017 12:23:52 +0200 [thread overview]
Message-ID: <8760eou3lz.fsf@rosalinde> (raw)
In-Reply-To: <596F15D8.207@gmx.at> (martin rudalics's message of "Wed, 19 Jul 2017 10:18:32 +0200")
On Wed, 19 Jul 2017 10:18:32 +0200 martin rudalics <rudalics@gmx.at> 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
prev parent reply other threads:[~2017-07-19 10:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170717091700.5734.53572@vcs0.savannah.gnu.org>
[not found] ` <20170717091702.497B522E0A@vcs0.savannah.gnu.org>
2017-07-17 23:58 ` master b2150e0: Preserve point under 'dired-auto-revert-buffer' (second case) Glenn Morris
2017-07-18 14:03 ` Stephen Berman
2017-07-19 8:18 ` martin rudalics
2017-07-19 10:23 ` Stephen Berman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760eou3lz.fsf@rosalinde \
--to=stephen.berman@gmx.net \
--cc=emacs-devel@gnu.org \
--cc=rgm@gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).