GNU bug report logs -
#27243
dired-auto-revert-buffer jumps point to beginning of buffer
Previous Next
Full log
Message #49 received at 27243 <at> debbugs.gnu.org (full text, mbox):
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 357 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.