Subject: bug#27243: another case: dired-auto-revert-buffer jumps point to beginning of buffer

From: Stephen Berman <[email-masked]>
Date: Fri, 28 Jul 2017 16:54:53 +0200

On Fri, 28 Jul 2017 17:45:01 +0300 Eli Zaretskii <[email-masked]> wrote:

>> Date: Fri, 28 Jul 2017 16:14:50 +0200
>> From: martin rudalics <[email-masked]>
>> CC: [email-masked], [email-masked], 
>>  [email-masked]
>> 
>>  >> Doesn't this already happen, and will continue happening after the
>>  >> proposed change?
>>  >
>>  > Yes.
>> 
>> Here it doesn't already happen and will not continue happening
>> after the proposed change.
>
> As long as the current behavior doesn't change, it's fine with me.

I agree with Martin, using a minibuffer-only setup doesn't change
things:

1. emacs -Q --eval "(setq initial-frame-alist '((minibuffer . nil)))"
   ;; Now there's a minibufferless frame and a minibuffer-only frame.
2. M-: (setq dired-auto-revert-buffer t)
3. C-x C-f RET ; Now the default directory is shown with point on the
               ; first entry.
4. C-x b ; Back to *scratch*.
5. C-x C-f RET ; Now the default directory is shown with point at
               ; point-min.  This is the bug.

When switch-to-buffer in find-file is replaced by
pop-to-buffer-same-window and the above recipe is repeated, after step 5
point has not moved to point-min but is still on the first entry as in
step 3.  So using pop-to-buffer-same-window works here.  Or does Stefan
have some other setup?

Steve Berman