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: Sun, 09 Jul 2017 19:37:53 +0200 Message-ID: <87zicd1pfy.fsf@beta> References: <83d1ac6yih.fsf@gnu.org> <87shjf48se.fsf@epsilon> <87r2yizu66.fsf@beta> <87bmpm20zt.fsf@rosalinde> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1499621958 31492 195.159.176.226 (9 Jul 2017 17:39:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Jul 2017 17:39:18 +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 Sun Jul 09 19:39:09 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 1dUGAk-0007b2-Vx for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Jul 2017 19:39:07 +0200 Original-Received: from localhost ([::1]:36936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUGAq-0006Q0-Hu for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Jul 2017 13:39:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUGAk-0006Pv-Kq for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 13:39:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUGAg-0001gJ-Kj for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 13:39:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56403) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUGAg-0001ey-FD for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 13:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dUGAf-0004KQ-W9 for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 13:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Antoine Levitt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Jul 2017 17:39: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.149962188316567 (code B ref 27243); Sun, 09 Jul 2017 17:39:01 +0000 Original-Received: (at 27243) by debbugs.gnu.org; 9 Jul 2017 17:38:03 +0000 Original-Received: from localhost ([127.0.0.1]:59080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUG9j-0004J9-D1 for submit@debbugs.gnu.org; Sun, 09 Jul 2017 13:38:03 -0400 Original-Received: from mail-wr0-f171.google.com ([209.85.128.171]:36022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUG9h-0004If-LQ for 27243@debbugs.gnu.org; Sun, 09 Jul 2017 13:38:02 -0400 Original-Received: by mail-wr0-f171.google.com with SMTP id c11so109613117wrc.3 for <27243@debbugs.gnu.org>; Sun, 09 Jul 2017 10:38:01 -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=67bjcmznUgf2BNmIsiaQFuDc6N5knEKW1dv5FgdDdGQ=; b=cKM9nxq6optoPPbhkAegrUaRmHL+Vvqx8hz4k+91EekddXzYwISzk+eul7ZZ/6t1CM 4WeVjL6rXUW7pn8B7uDJ30DB4dsdOaomle1oRI7ra+N9Ql5UNnO16gRc/EKifFkx8L2s PNfZpqMOma/j508/vp4RaQyTm5AP8TulbZ5cO7rrNcv+3xPelIU//X1/sBdF6SjzISDD VMCNp5qpcH3jMNrAKvktG7aX/m13X420ae6EY/noP/DF5O1esBr7f47S2CoL6VWPuAKc LFppjM9DqcWizLoZDM65OZhP+sXq36w5nqpBK1sZfYXI6ccIHWNF+toKp98Klw+RS7O3 P8LQ== 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=67bjcmznUgf2BNmIsiaQFuDc6N5knEKW1dv5FgdDdGQ=; b=AwTuPExU1zGJeqlbrhaq2YuO2rGM8sUtsVXqCArOXk2sfLeJEBTJbflKMo0Ixr+Zaw hMJyjIhfs+nfYGqLqi43mcbNWaqwXqqOi1a2NbHBDM0tEGB0VlwNiVviWpJRZxaBew3w ga8i+lhERka6ojz/J+JC3tUVAoYdbQx4DDP1ZmIfW6YaTzH5CosMBg+zswpIfYAUa/nR R+3jgbtPjA9XTwkVjXWSfATuCeOCXFv01iHHcHrMYD0NDxIpzZGhRUc8vQ0uYIA82T2Q dUMGGefybJoe7aJSBRKXHuqV8u6SmJd3i1UvusYIwwXl296K1c0hGO2e3oMk8R2rAsq4 ZGrA== X-Gm-Message-State: AIVw111snUAFieO1UvUKA3FmYBSf2Z05itE5Rt5MvVAa9ttyYF199FLN JWjtExM7FOul2RjV X-Received: by 10.223.171.181 with SMTP id s50mr5722597wrc.129.1499621875630; Sun, 09 Jul 2017 10:37:55 -0700 (PDT) Original-Received: from beta (ip-109.net-89-2-203.rev.numericable.fr. [89.2.203.109]) by smtp.gmail.com with ESMTPSA id p7sm7962720wmf.11.2017.07.09.10.37.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Jul 2017 10:37:54 -0700 (PDT) In-reply-to: <87bmpm20zt.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:134365 Archived-At: 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