From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#27243: closed (Re: bug#27243: dired-auto-revert-buffer jumps point to beginning of buffer) Date: Fri, 14 Jul 2017 11:56:53 +0200 Message-ID: <87lgnrgx3u.fsf@rosalinde> References: <83d1ac6yih.fsf@gnu.org> <87shjf48se.fsf@epsilon> <87r2yizu66.fsf@beta> <87bmpm20zt.fsf@rosalinde> <87zicd1pfy.fsf@beta> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1500026928 18324 195.159.176.226 (14 Jul 2017 10:08:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Jul 2017 10:08:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27243@debbugs.gnu.org, John Wiegley To: Antoine Levitt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 14 12:08:44 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVxWX-0004HJ-Gk for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jul 2017 12:08:37 +0200 Original-Received: from localhost ([::1]:36688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVxWd-00065d-07 for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jul 2017 06:08:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVxMM-0004Ta-F9 for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 05:58:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVxMI-0008Qf-OR for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 05:58:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35094) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVxMI-0008QX-Kq for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 05:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dVxMI-0001nK-7t for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 05:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jul 2017 09:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27243 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27243-submit@debbugs.gnu.org id=B27243.15000262226822 (code B ref 27243); Fri, 14 Jul 2017 09:58:02 +0000 Original-Received: (at 27243) by debbugs.gnu.org; 14 Jul 2017 09:57:02 +0000 Original-Received: from localhost ([127.0.0.1]:37771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVxLK-0001ly-N9 for submit@debbugs.gnu.org; Fri, 14 Jul 2017 05:57:02 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:57334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVxLJ-0001lR-0b for 27243@debbugs.gnu.org; Fri, 14 Jul 2017 05:57:01 -0400 Original-Received: from rosalinde ([83.135.15.98]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0McmS9-1dEhRE3Zz7-00HypC; Fri, 14 Jul 2017 11:56:54 +0200 In-Reply-To: <87zicd1pfy.fsf@beta> (Antoine Levitt's message of "Sun, 09 Jul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j5JS1uZ/Ql7tJswE1njxRh6AZmAP6q X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134542 Archived-At: On Sun, 09 Jul 2017 19:37:53 +0200 Antoine Levitt wrote: > Works for me, feel free to merge! > > Best, > Antoine 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? Steve Berman > 17 June 2017 15:32 +02, Stephen Berman : >> On Sat, 17 Jun 2017 14:16:01 +0200 Antoine Levitt 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