From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.bugs 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 Message-ID: <87o9scv6bo.fsf@beta> References: <83d1ac6yih.fsf@gnu.org> <87shjf48se.fsf@epsilon> <87r2yizu66.fsf@beta> <87bmpm20zt.fsf@rosalinde> <87zicd1pfy.fsf@beta> <87379vwh7d.fsf@rosalinde> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1500737414 22447 195.159.176.226 (22 Jul 2017 15:30:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Jul 2017 15:30:14 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 26.0.50 Cc: 27243@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 22 17:30:10 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 1dYwM4-0005Wm-8c for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Jul 2017 17:30:09 +0200 Original-Received: from localhost ([::1]:47533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYwM9-0006Ka-VC for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Jul 2017 11:30:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYwM1-0006HQ-JK for bug-gnu-emacs@gnu.org; Sat, 22 Jul 2017 11:30:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYwLy-0003kS-G3 for bug-gnu-emacs@gnu.org; Sat, 22 Jul 2017 11:30:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49847) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYwLy-0003jr-CA for bug-gnu-emacs@gnu.org; Sat, 22 Jul 2017 11:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dYwLx-000502-Tz for bug-gnu-emacs@gnu.org; Sat, 22 Jul 2017 11:30:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Antoine Levitt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Jul 2017 15:30:01 +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.150073735019138 (code B ref 27243); Sat, 22 Jul 2017 15:30:01 +0000 Original-Received: (at 27243) by debbugs.gnu.org; 22 Jul 2017 15:29:10 +0000 Original-Received: from localhost ([127.0.0.1]:52524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYwL8-0004yc-BO for submit@debbugs.gnu.org; Sat, 22 Jul 2017 11:29:10 -0400 Original-Received: from mail-wr0-f169.google.com ([209.85.128.169]:35790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYwL5-0004yP-RN for 27243@debbugs.gnu.org; Sat, 22 Jul 2017 11:29:08 -0400 Original-Received: by mail-wr0-f169.google.com with SMTP id k71so38182091wrc.2 for <27243@debbugs.gnu.org>; Sat, 22 Jul 2017 08:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:in-reply-to:from:to:cc:subject:date :message-id:mime-version; bh=HJ67CtrEr4rUqT/Wx4jdY0HEJOYyzTyJf+mtMWFvl74=; b=G+90rWnNaTlZkB4MjZfJIsopcKR1hwgc/5k//anH6ubNj/76/zhI4I4zjjFHWrZDyf w7NyIZp5b7J5vtv+g2m0akuQJ8SBmdsMl/VdVc1tvbmgIYSziULFdxyhHpNAFNluGkM8 EPpBReDdGiQ5qvZKS5VATBKKUPQMW+2gwXCZcF7dsECQsI627DTIFhnofHoMqp7VhXUn 3muTrZtLaoZKeVcuvtOUXOG49eCRKfP82fn+Fa1mqs3ZDKXum1NMPJ+uE0AvWhCUW6Zu doQwvanoAPO8VAGFyKZBozRe8n1uINVZ7DoqDJWEyUa8FVjVtmj+VyhfITMDDyoVryqH ca1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:in-reply-to:from:to:cc :subject:date:message-id:mime-version; bh=HJ67CtrEr4rUqT/Wx4jdY0HEJOYyzTyJf+mtMWFvl74=; b=i2P/SJSnbGQ3zdOP9mUSBDLtddTOfaS7aZpOjcJULx0gPlTj2QugDjO5PpjD7FxyGZ XuN2Hspw1lBvQ8DuHqY9ZcOCkzZRo4s3fsvAud9kE7pnRSm1geWRYmYX5wVic9yKepva o+zXFTNBr+O8RrjKxEVevoMoMVLykdGpVE4vkSp+pc0ZiXQV+tucHuGb2hikA+99KIlC 2ere7xtBOYGWN9mXZQ787vqesoXsE5VB9j+axeBHRZgCg0lrQY9SpDyM2VJRK2jTNDe5 jOCruqZ14qcSVtFPvdeLQm3rHBtIOCsoeFcux2xfRXn0VWLcDdUVRfAAor3NQgSGNzSZ DQnw== X-Gm-Message-State: AIVw1113SzNGUzQONzdCMoPGPW2R5kZyEnqdbqFi4Q0B/7JiiAAV2/RW LsaotXV6IEMXmvD8 X-Received: by 10.223.163.16 with SMTP id c16mr13327294wrb.173.1500737341922; Sat, 22 Jul 2017 08:29:01 -0700 (PDT) Original-Received: from beta (ip-109.net-80-236-113.lhaylesroses.rev.numericable.fr. [80.236.113.109]) by smtp.gmail.com with ESMTPSA id i185sm4327458wmf.34.2017.07.22.08.29.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Jul 2017 08:29:00 -0700 (PDT) In-reply-to: <87379vwh7d.fsf@rosalinde> 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:134861 Archived-At: 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 : > On Sun, 09 Jul 2017 19:37:53 +0200 Antoine Levitt wrote: > >> Works for me, feel free to merge! >> >> Best, >> Antoine >> >> 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 > > On Sat, 15 Jul 2017 09:36:41 +0200 martin rudalics 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