GNU bug report logs - #27243
dired-auto-revert-buffer jumps point to beginning of buffer

Previous Next

Package: emacs;

Reported by: Antoine Levitt <antoine.levitt <at> gmail.com>

Date: Sun, 4 Jun 2017 23:46:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Berman <stephen.berman <at> gmx.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 27243 <at> debbugs.gnu.org
Subject: bug#27243: closed (Re: bug#27243: dired-auto-revert-buffer jumps point to beginning of buffer)
Date: Sat, 15 Jul 2017 13:14:06 +0200
On Fri, 14 Jul 2017 22:52:18 -0700 John Wiegley <jwiegley <at> gmail.com> wrote:

>>>>>> Stephen Berman <stephen.berman <at> gmx.net> writes:
>
>> Thanks for confirming. I think this is the right fix and would commit it,
>> but since this exchange has taken place in a closed bug, it may have fallen
>> under the radar, so I'd like an explicit go-ahead. Eli, John?
>
> At first glance it looks OK to me, though I defer to Eli's experience in such
> matters.

On Sat, 15 Jul 2017 10:18:06 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

> No objections here.
>
> Thanks.

Thanks for okaying, but...

On Sat, 15 Jul 2017 09:36:41 +0200 martin rudalics <rudalics <at> gmx.at> wrote:

>> +  (set-window-buffer (selected-window)
>> +                     (set-buffer (dired-noselect dirname switches))))
>
> This really should be
>
>      (pop-to-buffer-same-window (dired-noselect dirname switches))
>
> Even if people disliked it in the past and some still dislike it: Try
>
> C-h f
> M-x dired

Wow, that's disastrous!  And frightening: I use the "(set-window-buffer
(selected-window) (set-buffer ...))" idiom a lot in todo-mode.el; I just
checked two commands using `C-h f' followed by the command invocation:
one worked fine but the other caused the same disaster.  So now I have
to check all uses :(.  Is there a general guideline for when to use
set-window-buffer and when to use pop-to-buffer-same-window?

Anyway, I'll commit the dired.el change you recommend; many thanks.

Steve Berman




This bug report was last modified 4 years and 358 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.