From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#27633: 26.0.50; Dired doesn't update buffer when wildcards have changed Date: Mon, 10 Jul 2017 12:02:16 +0900 Message-ID: <87a84dm1tz.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1499655796 1932 195.159.176.226 (10 Jul 2017 03:03:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Jul 2017 03:03:16 +0000 (UTC) To: 27633@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 10 05:03:11 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 1dUOyY-0008PY-4B for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Jul 2017 05:03:06 +0200 Original-Received: from localhost ([::1]:38251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUOyd-0000xs-HP for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Jul 2017 23:03:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUOyX-0000xj-HC for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 23:03:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUOyU-0002ER-EP for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 23:03:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56736) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUOyU-0002EN-Aq for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 23:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dUOyT-0006Lt-VX for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 23:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Jul 2017 03:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27633 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.149965575424381 (code B ref -1); Mon, 10 Jul 2017 03:03:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Jul 2017 03:02:34 +0000 Original-Received: from localhost ([127.0.0.1]:59413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUOy2-0006LB-B1 for submit@debbugs.gnu.org; Sun, 09 Jul 2017 23:02:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUOy0-0006Kw-CV for submit@debbugs.gnu.org; Sun, 09 Jul 2017 23:02:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUOxu-0001km-9b for submit@debbugs.gnu.org; Sun, 09 Jul 2017 23:02:27 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:37911) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dUOxu-0001kh-66 for submit@debbugs.gnu.org; Sun, 09 Jul 2017 23:02:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUOxt-0000jL-0q for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 23:02:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUOxp-0001j9-Um for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 23:02:25 -0400 Original-Received: from mail-pg0-x234.google.com ([2607:f8b0:400e:c05::234]:33832) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUOxp-0001iu-Ox for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 23:02:21 -0400 Original-Received: by mail-pg0-x234.google.com with SMTP id t186so42239156pgb.1 for ; Sun, 09 Jul 2017 20:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=OIu7TIpxcT+UO/DShXcMWyk/dl9+bAON3gFTM8/tcls=; b=elVdIOhft542RXQI+VZ+Z++17WpOlPVMz6zh4YLcZZpu3d6wAaTrRq7IA8t1x0DY1S MxrmvG2Pt2bzsrOzF89mOHfdgqN5M0YkWWA8awBix8dRDvQgsVgweMb2Tb0Y10Gii6eN hiiCHxdynFSunDbHZD0KvX+apS8RcsksGC5kaXf91tFQlZd72SuMjw4VP8avYw500W4p zNY7mENVnVXI2s8jPpQYfs5rDnBm5vhqf2XM60YemZNNF2Un5R9fe2Pf/BVlp2koNfSv lc9U1GB7334q+4bskZkgaJKrgwScYYmgqaYaOcyB0G6xJdzgtkdNYG5WXt3BRXJj0/QD v/Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=OIu7TIpxcT+UO/DShXcMWyk/dl9+bAON3gFTM8/tcls=; b=CoduNRP1aM6Cp1LB83yYYdqzcdbRdJgzKWewyXNh6F4vrgTHJtZAsRuzx6rzI34tl4 NO3Qx4gGDkar0wno9oVIuW1pfaGoJlWQEkp1R4Q192dZyxU+p0cvNFrfyDFX3Z1ZVukB Mv4OHP49fVWQxYKOMQYb40285fSCPr2AnZkqyHn+4FoeXsnq5tw4Hrw0+OJXy0CLGcAl bDtzMeVWhbANpcAaHAafwF2fpG1utWeXt57kMETz5ltj1LU95VsrZpt6L0HKrGdh2Epe 7tYI25tUn5X/tabZ0U0haEX8eGm+l9wsbn6jdhKBuUbYy/2v/ISarEr39HgQnPWZsvyn GKnw== X-Gm-Message-State: AIVw110kXzLdP4jZKIUN1mCD9JVz7ZXyAoQJhpa1OMXvCWI25sigpmfu I42YNsaDb6FkTySn X-Received: by 10.84.129.71 with SMTP id 65mr16090610plb.183.1499655740494; Sun, 09 Jul 2017 20:02:20 -0700 (PDT) Original-Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id j29sm18566227pfj.68.2017.07.09.20.02.19 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Jul 2017 20:02:20 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:134384 Archived-At: A 2nd Dired call on the same directory must update the buffer when the wildcards have changed. emacs -Q -l dired -eval '(dired (expand-file-name "lisp" source-directory))' M-: (dired (list default-directory "simple.el")) RET ;; Same Dired buffer. C-x k RET ; kill the buffer. ;; Show Dired buffer with just 'simple.el': M-: (dired (list (expand-file-name "lisp" source-directory) "simple.el")) RET C-x d RET ; Same Dired buffer. --8<-----------------------------cut here---------------start------------->8--- commit 8772e1bede02b1509fccef0445238e1ec9227a53 Author: Tino Calancha Date: Mon Jul 10 12:00:53 2017 +0900 Revert Dired buffer if wildcards have change A 2nd Dired call in the same directory must update the buffer if the wildcards have changed (Bug#27633). * lisp/dired.el (dired-internal-noselect): Revert Dired buffer if wildcards change. diff --git a/lisp/dired.el b/lisp/dired.el index 0c1f3e4af6..667cf7fba6 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -898,6 +898,10 @@ dired-internal-noselect (setq dired-directory dir-or-list) ;; this calls dired-revert (dired-sort-other switches)) + ;; wildcards have changed. + ((not (equal dired-directory dir-or-list)) + (setq dired-directory dir-or-list) + (revert-buffer)) ;; Always revert regardless of whether it has changed or not. ((eq dired-auto-revert-buffer t) (revert-buffer)) --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-07-09 built Repository revision: 273f4bde39af5d87f10fd58f35b666dfa8a996a3