unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Antoine Levitt <antoine.levitt@gmail.com>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 27243@debbugs.gnu.org
Subject: bug#27243: closed (Re: bug#27243: dired-auto-revert-buffer jumps point to beginning of buffer)
Date: Sat, 22 Jul 2017 17:28:59 +0200	[thread overview]
Message-ID: <87o9scv6bo.fsf@beta> (raw)
In-Reply-To: <87379vwh7d.fsf@rosalinde>

Sorry to be the bearer of bad news, but still not completely fixed ;-)
From emacs -Q, (setq dired-auto-revert-buffer t), C-x C-f RET, C-x b
RET, C-x C-f RET, and point jumps.

17 July 2017 11:22 +02, Stephen Berman <stephen.berman@gmx.net>:
> On Sun, 09 Jul 2017 19:37:53 +0200 Antoine Levitt <antoine.levitt@gmail.com> wrote:
>
>> Works for me, feel free to merge!
>>
>> Best,
>> Antoine
>>
>> 17 June 2017 15:32 +02, Stephen Berman <stephen.berman@gmx.net>:
>>> On Sat, 17 Jun 2017 14:16:01 +0200 Antoine Levitt <antoine.levitt@gmail.com> wrote:
>>>
>>>> I just noticed this is not yet completely fixed: starting from emacs -Q,
>>>> (setq dired-auto-revert-buffer t), open dired, open any file in that
>>>> directory, C-x d RET to run dired again, the point jumps back to the
>>>> beginning of the buffer.
>>>
>>> I suppose the command `dired' should not use switch-to-buffer.  With the
>>> following patch, executing the above recipe does not move point.
>>>
>>> diff --git a/lisp/dired.el b/lisp/dired.el
>>> index 8396652d50..aa59f01af9 100644
>>> --- a/lisp/dired.el
>>> +++ b/lisp/dired.el
>>> @@ -786,7 +786,8 @@ dired
>>>  If DIRNAME is already in a Dired buffer, that buffer is used without refresh."
>>>    ;; Cannot use (interactive "D") because of wildcards.
>>>    (interactive (dired-read-dir-and-switches ""))
>>> -  (switch-to-buffer (dired-noselect dirname switches)))
>>> +  (set-window-buffer (selected-window)
>>> +                     (set-buffer (dired-noselect dirname switches))))
>>>  
>>>  ;;;###autoload (define-key ctl-x-4-map "d" 'dired-other-window)
>>>  ;;;###autoload
>>>
>>> Steve Berman
>
> On Sat, 15 Jul 2017 09:36:41 +0200 martin rudalics <rudalics@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
>
> I installed the fix Martin recommended to master as commit b2150e0
> (after confirming that it indeed DTRT).  I also added a test for this
> case and the first one.
>
> Steve Berman






  reply	other threads:[~2017-07-22 15:28 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-04 23:45 bug#27243: dired-auto-revert-buffer jumps point to beginning of buffer Antoine Levitt
2017-06-05 13:37 ` Stephen Berman
2017-06-05 15:02   ` Eli Zaretskii
2017-06-05 15:15     ` Stephen Berman
2017-06-05 16:20       ` Eli Zaretskii
2017-06-10  8:24         ` Eli Zaretskii
     [not found]           ` <CABfD5m0==QAKYoJDkaPQxoyS1BQT-eTQJLmYZC6Z-V5A0jfeig@mail.gmail.com>
2017-06-10  8:45             ` Antoine Levitt
     [not found] ` <handler.27243.D27243.14970831096548.notifdone@debbugs.gnu.org>
2017-06-17 12:16   ` bug#27243: closed (Re: bug#27243: dired-auto-revert-buffer jumps point to beginning of buffer) Antoine Levitt
2017-06-17 13:32     ` Stephen Berman
2017-07-09 17:37       ` Antoine Levitt
2017-07-14  9:56         ` Stephen Berman
2017-07-15  5:52           ` John Wiegley
2017-07-15  7:18             ` Eli Zaretskii
2017-07-17  9:22         ` Stephen Berman
2017-07-22 15:28           ` Antoine Levitt [this message]
2017-07-22 16:55             ` Glenn Morris
2017-07-22 22:48               ` Stephen Berman
2017-07-22 22:48             ` bug#27243: another case: dired-auto-revert-buffer jumps point to beginning of buffer Stephen Berman
2017-07-23 14:43               ` Eli Zaretskii
2017-07-23 18:40                 ` martin rudalics
2017-07-23 18:58                   ` Eli Zaretskii
2017-07-23 21:09                     ` martin rudalics
2017-07-28  8:49                       ` Stephen Berman
2017-07-28  9:28                         ` Eli Zaretskii
2017-07-28 12:22                         ` martin rudalics
2017-07-28 13:02                         ` Stefan Monnier
2017-07-28 13:12                           ` Eli Zaretskii
2017-07-28 13:16                             ` Stefan Monnier
2017-07-28 13:41                               ` Eli Zaretskii
2017-07-28 14:14                               ` martin rudalics
2017-07-28 14:45                                 ` Eli Zaretskii
2017-07-28 14:54                                   ` Stephen Berman
2017-07-29 11:44                                   ` Stephen Berman
2020-05-25  4:21                                     ` Michael Heerdegen
     [not found]                                     ` <874ks4ekpg.fsf@web.de>
2020-05-25  7:26                                       ` Stephen Berman
2020-05-25 23:36                                         ` Michael Heerdegen
2020-05-27  1:23                                         ` Michael Heerdegen
2020-05-27  5:36                                           ` Michael Heerdegen
2020-05-27 14:52                                             ` martin rudalics
2020-05-27 17:01                                               ` Michael Heerdegen
2020-05-27 17:56                                                 ` martin rudalics
2020-05-30 22:11                                               ` Juri Linkov
2020-05-26  8:02                                       ` martin rudalics
2020-05-27  1:16                                         ` Michael Heerdegen
2017-07-15  7:36       ` bug#27243: closed (Re: bug#27243: dired-auto-revert-buffer jumps point to beginning of buffer) martin rudalics
2017-07-15 11:14         ` Stephen Berman
2017-07-15 13:59           ` martin rudalics
2017-07-17  9:28             ` Stephen Berman

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=87o9scv6bo.fsf@beta \
    --to=antoine.levitt@gmail.com \
    --cc=27243@debbugs.gnu.org \
    --cc=stephen.berman@gmx.net \
    /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).