From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Jul 2017 18:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 27631@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs Received: via spool by submit@debbugs.gnu.org id=B.149962579429496 (code B ref -1); Sun, 09 Jul 2017 18:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jul 2017 18:43:14 +0000 Received: from localhost ([127.0.0.1]:59145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUHAn-0007fg-TG for submit@debbugs.gnu.org; Sun, 09 Jul 2017 14:43:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUHAm-0007fT-FP for submit@debbugs.gnu.org; Sun, 09 Jul 2017 14:43:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUHAg-0007aa-NQ for submit@debbugs.gnu.org; Sun, 09 Jul 2017 14:43:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,TVD_SPACE_RATIO, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45447) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dUHAg-0007aW-KC for submit@debbugs.gnu.org; Sun, 09 Jul 2017 14:43:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUHAf-0001g9-L5 for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 14:43:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUHAc-0007YT-Jt for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 14:43:05 -0400 Received: from homie.mail.dreamhost.com ([208.97.132.208]:45295 helo=homiemail-a8.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dUHAc-0007QM-AC for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 14:43:02 -0400 Received: from homiemail-a8.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a8.g.dreamhost.com (Postfix) with ESMTP id C0D585F2065 for ; Sun, 9 Jul 2017 11:42:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=69YEbaVGoKAt1cads/K4S9fw+Ro=; b=JdNnRqSq45fTTgGu svENENW4eM1nFXHz0XR2KUua1DndcxB0L+P3RLUC0xN+DmIuwY0S5QTF9z4FIi5R 3YqPLPF9YEQ/pou2iIx7P3pygPqPe2jcvGJuU6kfI7fJAHIS07XbfCXF68yTwnqU UCvqj1DXDzNPmFOaJahWS/WVFz8= Received: from jidanni.org (220-140-8-133.dynamic-ip.hinet.net [220.140.8.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a8.g.dreamhost.com (Postfix) with ESMTPSA id 813B95F205C for ; Sun, 9 Jul 2017 11:42:56 -0700 (PDT) From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Date: Mon, 10 Jul 2017 02:42:53 +0800 Message-ID: <87o9sth2oi.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Maybe make dired and list-directory deal with wildcards in positions like ~/.config/chromium/Default/*/menkifleemblimdogmoihpfopnplikde/ From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2017 05:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Cc: 27631@debbugs.gnu.org Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.149992518617511 (code B ref 27631); Thu, 13 Jul 2017 05:54:02 +0000 Received: (at 27631) by debbugs.gnu.org; 13 Jul 2017 05:53:06 +0000 Received: from localhost ([127.0.0.1]:36125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVX3h-0004YM-Jx for submit@debbugs.gnu.org; Thu, 13 Jul 2017 01:53:05 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVX3f-0004Xs-FC for 27631@debbugs.gnu.org; Thu, 13 Jul 2017 01:53:04 -0400 Received: by mail-pg0-f67.google.com with SMTP id y129so5688777pgy.3 for <27631@debbugs.gnu.org>; Wed, 12 Jul 2017 22:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=J/9bUgmeaXS0p/ffzqxy8ghekS+uQ4u9kQNys/76bOo=; b=pW8ZR+61T7nyLP9/r1aIYQHqV52GsVTj4EUrIU7F5fP6vmnyYJaPM5MGyX3kH/e8GE HOT+7mB8MEtfW+ZiY9fxyh8/0c8n5VYrPpFRm6BNpUgWCZzWbQ/938sVK0uVJGzM27GV Yo/ia6FGQQ3OZIKBTpynwazskrn7McQgVGWcPtonzAXcWJgI4ULWKak0w8KQEhpEmKx8 typIsZr3F+aAc/s0m7VXZj4NE5YPZOPFuyruY/v9F+qfwMBIxXMrpqrUiZLjAxfa6zUx wdo8QKKgleSReLjGoCCw47+rSW4nt22bB7M5R3ebyIoHbfTucOP1Yatr3kZ3rrMhMa/F awuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=J/9bUgmeaXS0p/ffzqxy8ghekS+uQ4u9kQNys/76bOo=; b=cpCEORd4GEIGk6kz/bLbnJm3etEr+t6H/ceUnqsS8KmAS5XC1b74aGQU1oIcKChuRH ExZkc7zgG8U+8w6rIopYR14rJY8o/UCwJMXN6VU4ASKWpmlFDElwvnt7rIQaJFBgrzjq MlFbyYK1oWP6mFUmZvtNSgnDB6nkej/+Dpn9ItOO3lDP8kbryaAVnsjgJHsH0eDC+y38 EPVUblM0FvgqpZsvZZFA4igQ1FV4Ijqm5yy8JJyXbgTZ6QwEpAQcCUVATUSV+MYgMVci L5CSkKg84icw1cHA00wnkw1Bowz5anwkoYC9eCfgzt6UqB7JskBUMDPhUu9JK9rjcM4Z YWrQ== X-Gm-Message-State: AIVw110tOzFIZps9CWJta3RwgO/P+JlHfTbDMIj17qfDRsrHkfyQmq4O 0OHY8mrutezWuFj5 X-Received: by 10.84.174.129 with SMTP id r1mr8314686plb.55.1499925177265; Wed, 12 Jul 2017 22:52:57 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id l4sm8147019pgr.21.2017.07.12.22.52.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jul 2017 22:52:56 -0700 (PDT) From: Tino Calancha References: <87o9sth2oi.fsf@jidanni.org> Date: Thu, 13 Jul 2017 14:52:51 +0900 In-Reply-To: <87o9sth2oi.fsf@jidanni.org> ("=?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson"'s message of "Mon, 10 Jul 2017 02:42:53 +0800") Message-ID: <8737a0yjbg.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson writes: > Maybe make dired and list-directory deal with wildcards in positions like > ~/.config/chromium/Default/*/menkifleemblimdogmoihpfopnplikde/ Thank you for the report. IMO, this is a nice thing to have. [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [74.125.83.67 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.83.67 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.83.67 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.1 TRACKER_ID BODY: Incorporates a tracking ID number -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson writes: > Maybe make dired and list-directory deal with wildcards in positions like > ~/.config/chromium/Default/*/menkifleemblimdogmoihpfopnplikde/ Thank you for the report. IMO, this is a nice thing to have. [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [74.125.83.67 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.83.67 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.83.67 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tino.calancha[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.1 TRACKER_ID BODY: Incorporates a tracking ID number -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: > Maybe make dired and list-directory deal with wildcards in positions like > ~/.config/chromium/Default/*/menkifleemblimdogmoihpfopnplikde/ Thank you for the report. IMO, this is a nice thing to have. It must be possible to extend the current code so that dired might handle wildcards in the directory part. Following is a crude patch as a proof of principle. Not heavily tested yet, but for simple cases seems to work. --8<-----------------------------cut here---------------start------------->= 8--- commit c172cd911229a02877dea2681f533c10e8e34b4f Author: Tino Calancha Date: Thu Jul 13 14:43:34 2017 +0900 dired: Handle wildcards in the directory part (Bug#27631) diff --git a/lisp/dired.el b/lisp/dired.el index 0c1f3e4af6..7fa3a47db5 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -913,11 +913,13 @@ dired-internal-noselect "Directory has changed on disk; type \\[revert-buffer] to update Dir= ed"))))) ;; Else a new buffer (setq default-directory - ;; We can do this unconditionally - ;; because dired-noselect ensures that the name - ;; is passed in directory name syntax - ;; if it was the name of a directory at all. - (file-name-directory dirname)) + (if (insert-directory-wildcard-in-dir-p dirname) + (car (insert-directory-process-wildcard dirname)) + ;; We can do this unconditionally + ;; because dired-noselect ensures that the name + ;; is passed in directory name syntax + ;; if it was the name of a directory at all. + (file-name-directory dirname))) (or switches (setq switches dired-listing-switches)) (if mode (funcall mode) (dired-mode dir-or-list switches)) @@ -1049,13 +1051,14 @@ dired-readin-insert (not file-list)) ;; If we are reading a whole single directory... (dired-insert-directory dir dired-actual-switches nil nil t) - (if (not (file-readable-p - (directory-file-name (file-name-directory dir)))) - (error "Directory %s inaccessible or nonexistent" dir) - ;; Else treat it as a wildcard spec - ;; unless we have an explicit list of files. - (dired-insert-directory dir dired-actual-switches - file-list (not file-list) t))))) + (if (and (not (insert-directory-wildcard-in-dir-p dir)) + (not (file-readable-p + (directory-file-name (file-name-directory dir))))) + (error "Directory %s inaccessible or nonexistent" dir)) + ;; Else treat it as a wildcard spec + ;; unless we have an explicit list of files. + (dired-insert-directory dir dired-actual-switches + file-list (not file-list) t)))) =20 (defun dired-align-file (beg end) "Align the fields of a file to the ones of surrounding lines. @@ -1272,11 +1275,16 @@ dired-insert-directory ;; Note that dired-build-subdir-alist will replace the name ;; by its expansion, so it does not matter whether what we insert ;; here is fully expanded, but it should be absolute. - (insert " " (directory-file-name (file-name-directory dir)) ":\n") + (insert " " (if (insert-directory-wildcard-in-dir-p dir) + (car (insert-directory-process-wildcard dir)) + (directory-file-name (file-name-directory dir))) = ":\n") (setq content-point (point))) (when wildcard ;; Insert "wildcard" line where "total" line would be for a full dir. - (insert " wildcard " (file-name-nondirectory dir) "\n"))) + (insert " wildcard " (if (insert-directory-wildcard-in-dir-p dir) + (cdr (insert-directory-process-wildcar= d dir)) + (file-name-nondirectory dir)) + "\n"))) (dired-insert-set-properties content-point (point))))) =20 (defun dired-insert-set-properties (beg end) diff --git a/lisp/files.el b/lisp/files.el index 2f3efa33c2..96d1b49d50 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6552,6 +6552,23 @@ directory-listing-before-filename-regexp =20 (defvar insert-directory-ls-version 'unknown) =20 +(defun insert-directory-wildcard-in-dir-p (dir) + (string-match "\\`\\([^*]+\\)\\([*].*\\)" + (file-name-directory dir))) + +(defun insert-directory-process-wildcard (dir) + (let ((switches "") + (newdir "") + (regexp "\\`\\([^*]+/\\)\\([^*]*[*].*\\)")) + (cond ((string-match regexp (file-name-directory dir)) + (string-match regexp dir) + (setq newdir (match-string 1 dir) + switches (match-string 2 dir))) + (t + (setq newdir (file-name-directory dir) + switches (file-name-nondirectory dir)))) + (cons newdir switches))) + ;; insert-directory ;; - must insert _exactly_one_line_ describing FILE if WILDCARD and ;; FULL-DIRECTORY-P is nil. @@ -6611,13 +6628,20 @@ insert-directory default-file-name-coding-system)))) (setq result (if wildcard - ;; Run ls in the directory part of the file pattern - ;; using the last component as argument. - (let ((default-directory - (if (file-name-absolute-p file) - (file-name-directory file) - (file-name-directory (expand-file-name file)))) - (pattern (file-name-nondirectory file))) + ;; If the wildcard is just in the file part, then run ls in + ;; the directory part of the file pattern using the = last + ;; component as argument. Otherwise, run ls in the = longest + ;; subdirectory of the directory part free of wildca= rs; use + ;; the remaining of the file pattern as argument. + (let* ((dir-wildcard (and (insert-directory-wildcard-in-dir-p file) + (insert-directory-process-= wildcard file))) + (default-directory + (cond (dir-wildcard (car dir-wildcard)) + (t + (if (file-name-absolute-p file) + (file-name-directory file) + (file-name-directory (expand-file-name file)))))) + (pattern (if dir-wildcard (cdr dir-wildcard) (file-name-nondirecto= ry file)))) ;; NB since switches is passed to the shell, be ;; careful of malicious values, eg "-l;reboot". ;; See eg dired-safe-switches-p. --8<-----------------------------cut here---------------end--------------->= 8--- In GNU Emacs 26.0.50 (build 7, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-07-12 Repository revision: dde7f2d48b53996bdf767a8cf91aafc2e10add23 From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b In-Reply-To: <87o9sth2oi.fsf@jidanni.org> Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2017 13:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27631@debbugs.gnu.org Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.149995172831729 (code B ref 27631); Thu, 13 Jul 2017 13:16:01 +0000 Received: (at 27631) by debbugs.gnu.org; 13 Jul 2017 13:15:28 +0000 Received: from localhost ([127.0.0.1]:36363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVdxn-0008Fh-TB for submit@debbugs.gnu.org; Thu, 13 Jul 2017 09:15:28 -0400 Received: from homie.mail.dreamhost.com ([208.97.132.208]:52547 helo=homiemail-a5.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVdxl-0008FX-UI for 27631@debbugs.gnu.org; Thu, 13 Jul 2017 09:15:26 -0400 Received: from homiemail-a5.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a5.g.dreamhost.com (Postfix) with ESMTP id C0E9170406F; Thu, 13 Jul 2017 06:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=jidanni.org; bh=LYwZyDGrrS9+COP5lR0LaJ5oGB0=; b=ZiQblZrPxPO4d doiMWxIIwmHCTvFDTryIq0x686USlbFz/XMI768OrFxZuk6kUp7ZppnsRmv8+am4 cQgo4ZzgHmOlobWh2WURHv65W3HYQmlWqCyy0KJMXW+ctovFVlqSeTDmzxpQt6fL 6qqKW6UkwksVfCdzUJFQXHm2rtks8Q= Received: from jidanni.org (114-41-14-212.dynamic-ip.hinet.net [114.41.14.212]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a5.g.dreamhost.com (Postfix) with ESMTPSA id 6FAA570406A; Thu, 13 Jul 2017 06:15:24 -0700 (PDT) From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson References: <87o9sth2oi.fsf@jidanni.org> Date: Thu, 13 Jul 2017 21:15:19 +0800 Message-ID: <87zic8bhqw.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Thank you for making dired as powerful as ls(1). Though I did not test your patch, I hope it gets into emacs. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2017 15:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: 27631@debbugs.gnu.org Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.149995882217364 (code B ref 27631); Thu, 13 Jul 2017 15:14:02 +0000 Received: (at 27631) by debbugs.gnu.org; 13 Jul 2017 15:13:42 +0000 Received: from localhost ([127.0.0.1]:37248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVfoD-0004Vz-HW for submit@debbugs.gnu.org; Thu, 13 Jul 2017 11:13:41 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:34171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVfoB-0004Vg-By for 27631@debbugs.gnu.org; Thu, 13 Jul 2017 11:13:40 -0400 Received: by mail-pf0-f173.google.com with SMTP id q85so30950440pfq.1 for <27631@debbugs.gnu.org>; Thu, 13 Jul 2017 08:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=JPlJFATNBNGlW6K8TF80q7zhXp1kseYh1BvocoZkq+I=; b=XcrP77FJIeVHsxXfRbqOHzk0sJusLDuf9Qn4bDRa5VTvod/kNHbtc3eDwkGGdoYvXS DCmpa9bYa+kvi8HFEdtpH+yer+ROzfadUEguWUOEUie6dnYkiveXlBspSulFiZC2Y7SV lKc7qDEPe0ubRS2js9gnNfB7rRbhik+EIA0/q8Z8KT2ShCI5Ak+IF7tb46tF9Oqr3qhJ u0Zp0swuXeraN3+J/02HEmk/o1S62j8L7riJCb7kaKKOud+McgGqYS8WynVM0aTUwcA4 jhRklr/xrSxl5XkgP8v16C48z/3fVaaoFW+58+FxNKEL1X2PFRZSKUz1NqQd3l5I6xW8 E+pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=JPlJFATNBNGlW6K8TF80q7zhXp1kseYh1BvocoZkq+I=; b=KdPpmeu17wL40yBNz2YwzeKIi46Say3b/njC72y/s8/ttiSoQhl0TjfZYIH51h6ta4 UpvNUhX2C6R5I3grdFi4hxKorCOXnpnZK8LniHAY/jlQzsg2/yj2NTVHhcSM/xXDkX+C jv6dqG4HsT0mODOABswJ60EG1bW5L3T7GuU8Sx3SnYSX/5zf5o0k8KaKIUyrhTBwzuEU 2r8U4SktSqndamcg8faCVbR5CKrFmcK0f1jAT1W+Kn9qowiJt7N5ltcls/tOPgzGF65C yuUdxymYK7zDK3Be/qiD31KHNrnFWtlNjQUDeYqc1zj98tZJ9JvkmImtD1ooI/hy1jR1 kkOg== X-Gm-Message-State: AIVw111T3FbYVeseMZggpWslBM7Xb7aInZ1swzydMpkXw5GXpbkcMysM MVy0sg6yGU2vpN4f X-Received: by 10.84.130.76 with SMTP id 70mr10629192plc.138.1499958813028; Thu, 13 Jul 2017 08:13:33 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id w85sm17536703pfj.115.2017.07.13.08.13.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jul 2017 08:13:32 -0700 (PDT) From: Tino Calancha References: <87o9sth2oi.fsf@jidanni.org> Date: Fri, 14 Jul 2017 00:13:28 +0900 In-Reply-To: <87o9sth2oi.fsf@jidanni.org> ("=?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson"'s message of "Mon, 10 Jul 2017 02:42:53 +0800") Message-ID: <877ezcxtd3.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: > Maybe make dired and list-directory deal with wildcards in positions like > ~/.config/chromium/Default/*/menkifleemblimdogmoihpfopnplikde/ Hi Michael, i'd like to provide Tramp support for this new Dired feature. The implementation is fairly straight: just adds a function 'insert-directory-wildcard-in-dir-p' in files.el, and use it in 'insert-directory' and Dired. To get Tramp support i've added a handler 'tramp-sh-handle-insert-directory-wildcard-in-dir-p'. Is this procedure OK or i am doing something weird? Best regards, Tino --8<-----------------------------cut here---------------start------------->= 8--- commit e5d5bd9822c1c562a7feb16f035062fda603d4d9 Author: Tino Calancha Date: Thu Jul 13 23:56:43 2017 +0900 Dired: Handle wildards in directory part =20=20=20=20 Allow to Dired to handle calls like \(dired \"~/foo/*/*.el\"), that is, with wildcards withing the directory part of the file argument. * lisp/files.el (insert-directory-wildcard-in-dir-p): New predicate. (insert-directory) * lisp/dired.el(dired-internal-noselect) (dired-insert-directory): Use it. * /etc/NEWS: Announce it. * doc/emacs/dired.texi (Dired Enter): Update manual. diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 28cb51d88b..2113381e3a 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -64,10 +64,23 @@ Dired Enter directory name using the minibuffer, and opens a @dfn{Dired buffer} listing the files in that directory. You can also supply a wildcard file name pattern as the minibuffer argument, in which case the Dired -buffer lists all files matching that pattern. The usual history and -completion commands can be used in the minibuffer; in particular, -@kbd{M-n} puts the name of the visited file (if any) in the minibuffer -(@pxref{Minibuffer History}). +buffer lists all files matching that pattern. A wildcard may appear +in the directory part as well. +For instance, + +@example +C-x d ~/foo/*.el @key{RET} +C-x d ~/foo/*/*.el @key{RET} +@end example + +The former lists all the files with extension @samp{.el} in directory +@samp{foo}. The latter lists the files with extension @samp{.el} +in @samp{foo} subdirectories; the sudirectories are 1 level of depth +below @samp{foo}. + +The usual history and completion commands can be used in the minibuffer; +in particular, @kbd{M-n} puts the name of the visited file (if any) in +the minibuffer (@pxref{Minibuffer History}). =20 You can also invoke Dired by giving @kbd{C-x C-f} (@code{find-file}) a directory name. diff --git a/etc/NEWS b/etc/NEWS index 71a2da1b63..e16c4a7b76 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -559,9 +559,13 @@ properties as intact as possible. * Changes in Specialized Modes and Packages in Emacs 26.1 =20 ** Dired -You can now use '`?`' in 'dired-do-shell-command'; as ' ? ', it gets repla= ced ++++ +*** You can now use '`?`' in 'dired-do-shell-command'; as ' ? ', it gets r= eplaced by the current file name. =20 ++++ +*** Now Dired support wildcards in the directory part of file names. + *** html2text is now marked obsolete. =20 *** smerge-refine-regions can refine regions in separate buffers diff --git a/lisp/dired.el b/lisp/dired.el index 0c1f3e4af6..50dd81dfdd 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -913,11 +913,12 @@ dired-internal-noselect "Directory has changed on disk; type \\[revert-buffer] to update Dir= ed"))))) ;; Else a new buffer (setq default-directory - ;; We can do this unconditionally - ;; because dired-noselect ensures that the name - ;; is passed in directory name syntax - ;; if it was the name of a directory at all. - (file-name-directory dirname)) + (or (car (insert-directory-wildcard-in-dir-p dirname)) + ;; We can do this unconditionally + ;; because dired-noselect ensures that the name + ;; is passed in directory name syntax + ;; if it was the name of a directory at all. + (file-name-directory dirname))) (or switches (setq switches dired-listing-switches)) (if mode (funcall mode) (dired-mode dir-or-list switches)) @@ -1049,13 +1050,14 @@ dired-readin-insert (not file-list)) ;; If we are reading a whole single directory... (dired-insert-directory dir dired-actual-switches nil nil t) - (if (not (file-readable-p - (directory-file-name (file-name-directory dir)))) - (error "Directory %s inaccessible or nonexistent" dir) - ;; Else treat it as a wildcard spec - ;; unless we have an explicit list of files. - (dired-insert-directory dir dired-actual-switches - file-list (not file-list) t))))) + (if (and (not (insert-directory-wildcard-in-dir-p dir)) + (not (file-readable-p + (directory-file-name (file-name-directory dir))))) + (error "Directory %s inaccessible or nonexistent" dir)) + ;; Else treat it as a wildcard spec + ;; unless we have an explicit list of files. + (dired-insert-directory dir dired-actual-switches + file-list (not file-list) t)))) =20 (defun dired-align-file (beg end) "Align the fields of a file to the ones of surrounding lines. @@ -1272,11 +1274,14 @@ dired-insert-directory ;; Note that dired-build-subdir-alist will replace the name ;; by its expansion, so it does not matter whether what we insert ;; here is fully expanded, but it should be absolute. - (insert " " (directory-file-name (file-name-directory dir)) ":\n") + (insert " " (or (car (insert-directory-wildcard-in-dir-p dir)) + (directory-file-name (file-name-directory dir))= ) ":\n") (setq content-point (point))) (when wildcard ;; Insert "wildcard" line where "total" line would be for a full dir. - (insert " wildcard " (file-name-nondirectory dir) "\n"))) + (insert " wildcard " (or (cdr (insert-directory-wildcard-in-dir-p dir)) + (file-name-nondirectory dir)) + "\n"))) (dired-insert-set-properties content-point (point))))) =20 (defun dired-insert-set-properties (beg end) diff --git a/lisp/files.el b/lisp/files.el index 2f3efa33c2..96c6357d92 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6552,6 +6552,12 @@ directory-listing-before-filename-regexp =20 (defvar insert-directory-ls-version 'unknown) =20 +(defun insert-directory-wildcard-in-dir-p (dir) + (when (string-match "[*]" (file-name-directory dir)) + (let ((regexp "\\`\\([^*]+/\\)\\([^*]*[*].*\\)")) + (string-match regexp dir) + (cons (match-string 1 dir) (match-string 2 dir))))) + ;; insert-directory ;; - must insert _exactly_one_line_ describing FILE if WILDCARD and ;; FULL-DIRECTORY-P is nil. @@ -6611,13 +6617,19 @@ insert-directory default-file-name-coding-system)))) (setq result (if wildcard - ;; Run ls in the directory part of the file pattern - ;; using the last component as argument. - (let ((default-directory - (if (file-name-absolute-p file) - (file-name-directory file) - (file-name-directory (expand-file-name file)))) - (pattern (file-name-nondirectory file))) + ;; If the wildcard is just in the file part, then run ls in + ;; the directory part of the file pattern using the = last + ;; component as argument. Otherwise, run ls in the = longest + ;; subdirectory of the directory part free of wildca= rs; use + ;; the remaining of the file pattern as argument. + (let* ((dir-wildcard (insert-directory-wildcard-in-dir-p file)) + (default-directory + (cond (dir-wildcard (car dir-wildcard)) + (t + (if (file-name-absolute-p file) + (file-name-directory file) + (file-name-directory (expand-file-name file)))))) + (pattern (if dir-wildcard (cdr dir-wildcard) (file-name-nondirecto= ry file)))) ;; NB since switches is passed to the shell, be ;; careful of malicious values, eg "-l;reboot". ;; See eg dired-safe-switches-p. commit 15eef43279e2d92ef1e20e66bb2a4ff23c22ead3 Author: Tino Calancha Date: Thu Jul 13 23:56:43 2017 +0900 Dired: Tramp support for wildcards in directory part =20=20=20=20 * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory-wildcard-in-di= r-p): New handler for 'insert-directory-wildcard-in-dir-p'. (tramp-sh-file-name-handler-alist): Add it t the list. (tramp-sh-handle-insert-directory): Use it. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 4beb6fe521..3a0094d8f7 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1030,6 +1030,7 @@ tramp-sh-file-name-handler-alist ;; `find-file-noselect' performed by default handler. ;; `get-file-buffer' performed by default handler. (insert-directory . tramp-sh-handle-insert-directory) + (insert-directory-wildcard-in-dir-p . tramp-sh-handle-insert-directory= -wildcard-in-dir-p) (insert-file-contents . tramp-handle-insert-file-contents) (load . tramp-handle-load) (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) @@ -2632,8 +2633,12 @@ tramp-sh-handle-insert-directory (not (tramp-get-ls-command-with-dired v))) (setq switches (delete "--dired" switches))) (when wildcard - (setq wildcard (tramp-run-real-handler - 'file-name-nondirectory (list localname))) + (setq wildcard (or (cdr (tramp-run-real-handler + 'insert-directory-wildcard-in-dir-p + (list localname))) + (tramp-run-real-handler + 'file-name-nondirectory + (list localname)))) (setq localname (tramp-run-real-handler 'file-name-directory (list localname)))) (unless (or full-directory-p (member "-d" switches)) @@ -2654,13 +2659,19 @@ tramp-sh-handle-insert-directory (tramp-get-ls-command v) switches (if wildcard - localname + (or (car (tramp-run-real-handler + 'insert-directory-wildcard-in-dir-p + (list localname))) localname) (tramp-shell-quote-argument (concat localname "."))))) (tramp-barf-unless-okay v (format "cd %s" (tramp-shell-quote-argument - (tramp-run-real-handler - 'file-name-directory (list localname)))) + (or (car (tramp-run-real-handler + 'insert-directory-wildcard-in-dir-p + (list localname))) + (tramp-run-real-handler + 'file-name-directory + (list localname))))) "Couldn't `cd %s'" (tramp-shell-quote-argument (tramp-run-real-handler 'file-name-directory (list localname)))) @@ -2736,6 +2747,11 @@ tramp-sh-handle-insert-directory =20 (goto-char (point-max))))))) =20 +(defun tramp-sh-handle-insert-directory-wildcard-in-dir-p (dir) + "Like `insert-directory-wildcard-in-dir-p' for Tramp files." + (with-parsed-tramp-file-name dir nil + (insert-directory-wildcard-in-dir-p localname))) + ;; Canonicalization of file names. =20 (defun tramp-sh-handle-expand-file-name (name &optional dir) --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-13 Repository revision: 1f08279e1b20bd1e07132b6ee0a25a154811615a From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jul 2017 08:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27631@debbugs.gnu.org, michael.albinus@gmx.de Reply-To: Eli Zaretskii Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150002166032290 (code B ref 27631); Fri, 14 Jul 2017 08:41:01 +0000 Received: (at 27631) by debbugs.gnu.org; 14 Jul 2017 08:41:00 +0000 Received: from localhost ([127.0.0.1]:37713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVw9k-0008Ok-5u for submit@debbugs.gnu.org; Fri, 14 Jul 2017 04:41:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVw9g-0008OW-Q2 for 27631@debbugs.gnu.org; Fri, 14 Jul 2017 04:40:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVw9Y-0002vs-JX for 27631@debbugs.gnu.org; Fri, 14 Jul 2017 04:40:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVw9Y-0002vj-E9; Fri, 14 Jul 2017 04:40:48 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4165 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dVw9X-0008Cb-O0; Fri, 14 Jul 2017 04:40:48 -0400 Date: Fri, 14 Jul 2017 11:40:49 +0300 Message-Id: <83y3rrfm26.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <877ezcxtd3.fsf@calancha-pc> (message from Tino Calancha on Fri, 14 Jul 2017 00:13:28 +0900) References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Tino Calancha > Date: Fri, 14 Jul 2017 00:13:28 +0900 > Cc: 27631@debbugs.gnu.org > > commit e5d5bd9822c1c562a7feb16f035062fda603d4d9 > Author: Tino Calancha > Date: Thu Jul 13 23:56:43 2017 +0900 > > Dired: Handle wildards in directory part > > Allow to Dired to handle calls like > \(dired \"~/foo/*/*.el\"), that is, with wildcards withing > the directory part of the file argument. > * lisp/files.el (insert-directory-wildcard-in-dir-p): New predicate. > (insert-directory) > * lisp/dired.el(dired-internal-noselect) > (dired-insert-directory): Use it. > * /etc/NEWS: Announce it. > * doc/emacs/dired.texi (Dired Enter): Update manual. Thanks, but this doesn't seem to work with ls-lisp.el, so I guess it relies on some features of the 'ls' command. (ls-lisp.el does support wildcards in the likes of "C-x d foo* RET".) So if we are going to accept this, either it should be made to work with ls-lisp.el (preferred), or some kind of error message should be emitted in that case, because presenting an empty Dired buffer is not very user-friendly. A few random comments on the code: > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -559,9 +559,13 @@ properties as intact as possible. > * Changes in Specialized Modes and Packages in Emacs 26.1 > > ** Dired > -You can now use '`?`' in 'dired-do-shell-command'; as ' ? ', it gets replaced > ++++ > +*** You can now use '`?`' in 'dired-do-shell-command'; as ' ? ', it gets replaced > by the current file name. This is unrelated, right? > +(defun insert-directory-wildcard-in-dir-p (dir) > + (when (string-match "[*]" (file-name-directory dir)) > + (let ((regexp "\\`\\([^*]+/\\)\\([^*]*[*].*\\)")) > + (string-match regexp dir) > + (cons (match-string 1 dir) (match-string 2 dir))))) Any reason you only want to support '*'? What about '?' or '[a-b]', for example? Also, what happens if the directory includes a literal '*' character? That's possible on Posix systems. > + ;; subdirectory of the directory part free of wildcars; use ^^^^^^^^^ A typo. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jul 2017 09:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27631@debbugs.gnu.org Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.15000246114389 (code B ref 27631); Fri, 14 Jul 2017 09:31:01 +0000 Received: (at 27631) by debbugs.gnu.org; 14 Jul 2017 09:30:11 +0000 Received: from localhost ([127.0.0.1]:37743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVwvL-00018j-5X for submit@debbugs.gnu.org; Fri, 14 Jul 2017 05:30:11 -0400 Received: from mout.gmx.net ([212.227.17.22]:59739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVwvJ-00017f-LS for 27631@debbugs.gnu.org; Fri, 14 Jul 2017 05:30:10 -0400 Received: from detlef.gmx.de ([79.140.120.145]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MJFBe-1dUHxY3KFm-002oYR; Fri, 14 Jul 2017 11:30:02 +0200 From: Michael Albinus References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> Date: Fri, 14 Jul 2017 11:30:01 +0200 In-Reply-To: <877ezcxtd3.fsf@calancha-pc> (Tino Calancha's message of "Fri, 14 Jul 2017 00:13:28 +0900") Message-ID: <87mv87pdra.fsf@detlef> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:EngBqGQ057dcflyak1XM33ieHybDXxTp6zv/SCiCuKz+lHIl4/K SNEiysLBeS4Z2FOxBvc4K0TNzqYOVW14C6QdJI2kqxFL1fVXyG12hyyGIoKbreAkJ+dixPt BwXWIxkDDuRte0ncZKhLo1+5cZRms6OdYXW9mLPtMj3xObpgb4/lbTTFImD8aXwGprcu+eg v9HftoQu/lMhkxsSr2x9w== X-UI-Out-Filterresults: notjunk:1;V01:K0:SHiwqP8+8Zo=:DvoPfGh9aaLjvT30QqMYG/ DnNi+gQXGTf6yz8b7up9kmnwzl5ZWvlNUstN7Bg/V3I5+3cHZV8WHuSfNJBL3Bl/D88w+hdO+ 1kz7CBRJYD1kFextvvA6G0vE3H05Px/9Fpp+Ymu5K4gk26GVHF6MZqkyLXa+/CHCx1eSOm870 GQa/bOMr2MLFCJx0JgQEMMkLSd56akT53Uhy00y5iRY49OhmFTXJZF7YjDtyHHbwa4Qjka6gO I75ObKFGLfz39BhNva/jp88rIa5nIRVNkqehzuazIZVLckeA2MpQun+LPHrG/sgHRl+7bQl63 0dSsHbsHidtQ/So2oW8wL7gklZQY0e3vvPY4SWBRBr9Zdz2pni2Uj0D5ZcKyMM8ahYAr8eiHq EaEkvSeP3yqgGA8nKUeImRGFwrCWFXK9VFHvqQLqeWiV4sBxHrExBy48/Tn/4bUCxgsfsYKuw at13thHCNtosB9GUHgfx2SW7NN/1bcDn5fCBCr7l+S/1tX4Vur7SQz0ojR1Y9O0lsdDBs7aph BVrD9R1XvH9t/jByiPVcW++9Z4Xdpwphzen32Samb7/DbABeb/vCDp3pj8aCDrmobHyJCS2M6 oLkPUqlsH/0TICA0fVfLMam6gUDFDMEiYt7r1zu9JZt+yP+sVXdzao5X6/cm5ufjPrWKEM40b lcq4Qe8r7CYTXM6qU/orygWmQhrp5Si0l9Va7SBmSu8uT2Z2c3pTjJZz1oUg/LQhkKr4l+k3J DEawI5BRD/PGLOmKxvo4/pL+uvW/yn33s8DM8Qas+S8NPK7IIDSESu8d3wBprR54a5Z1vk3Eu GcbnFzajstFvqVSyeGjmD1liRTzO7H6q8EiIqCivU44uPA+7aI= X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) Tino Calancha writes: > Hi Michael, > i'd like to provide Tramp support for this new Dired feature. > The implementation is fairly straight: just adds a function > 'insert-directory-wildcard-in-dir-p' in files.el, and use it in > 'insert-directory' and Dired. > > To get Tramp support i've added a handler > 'tramp-sh-handle-insert-directory-wildcard-in-dir-p'. > Is this procedure OK or i am doing something weird? That's not sufficient, it takes much more for adding a new handler in Tramp. At least, it must be declared in tramp.el, and it must also be added to the other backends but tramp-sh.el. And you can also not call it directly; Tramp is backwards compatible with Emacs 24 and 25. > +(defun insert-directory-wildcard-in-dir-p (dir) > + (when (string-match "[*]" (file-name-directory dir)) > + (let ((regexp "\\`\\([^*]+/\\)\\([^*]*[*].*\\)")) > + (string-match regexp dir) > + (cons (match-string 1 dir) (match-string 2 dir))))) Unfortunately, there's no docstring, so it isn't clear to me what you expect as result. Reading `tramp-sh-handle-insert-directory-wildcard-in-dir-p', I believe you just want to work over the local part of a remote file name. So you could do at the beginning: ;; DIR could be remote. (setq dir (file-local-name dir)) And I don't believe that it is mandatory to call `insert-directory-wildcard-in-dir-p' in Tramp. All what's needed could be done outside Tramp file name handlers. . > Best regards, > Tino Best regards, Michael. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jul 2017 15:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 27631@debbugs.gnu.org, michael.albinus@gmx.de Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150099597227883 (code B ref 27631); Tue, 25 Jul 2017 15:20:01 +0000 Received: (at 27631) by debbugs.gnu.org; 25 Jul 2017 15:19:32 +0000 Received: from localhost ([127.0.0.1]:56078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da1cR-0007Fe-Vs for submit@debbugs.gnu.org; Tue, 25 Jul 2017 11:19:32 -0400 Received: from mail-pg0-f43.google.com ([74.125.83.43]:33583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da1cQ-0007FO-0t for 27631@debbugs.gnu.org; Tue, 25 Jul 2017 11:19:30 -0400 Received: by mail-pg0-f43.google.com with SMTP id g14so22635733pgu.0 for <27631@debbugs.gnu.org>; Tue, 25 Jul 2017 08:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=WvI/3ai/P7i3pInLeKahH3bgpxpvKHC8oF4YnpBMAzA=; b=tl6Et3azlwMMcLsYBQeLfU9jF/BBgvRmjIIDE66I48q0evoAXAXysg3qSFYt85C/mX 5szRMsH2qsrEbtIiniAsW56jRG6mLlcooD+4EchacmrxFwE0kddHUds9j6oUeMvJ64mk bd5N4LnIhPweioWbBYAlPIEsRpRojWZfx45W+kFGOfI67d8mcraTwDZrE34JuyQYusu4 47RTesDH5zbo9pc+e0p94PMSDhbd5u2vZmPgguABOogoVuvGC1cAlkD/KQZG6Q8h29YX 5AOiYEkCZwnz6WPK5zpWE6NPmykLpZgkjA5w+OI6ZB2YBbzH3cUBJlfQc7s63hmeMs65 MjHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=WvI/3ai/P7i3pInLeKahH3bgpxpvKHC8oF4YnpBMAzA=; b=X4cYx7L7nRd+HeEx2AvjUQKJenVjqKCCWNSB+oYs/7tbcpLsBTqiEYCAWES89ekQYa y73LWuZPT5lNXmFFcvhTWwJp7EV7DO/ATY5lc02W8jVroQcdGv92I6yfILMqj/kK+XeX ndophwg3ymbjG/7zIVNeDyFzmGfjncc6rBa/jCRsJHskzlyUpwiQXBYGgIrpwXDig+lm b3d71hHeQAU9QQ6FPRFDuCb6TLEMRG1+HJ4wLY+i7lR5ZP13Jjm2/FIZdWQO7BATzACL z1n1ohGp9GxWYUIjAiZizzkVjGMF/SZuaIpLyv3ej7yQUSgwMKMWrsLr0HdzLDgfaXmp CKtw== X-Gm-Message-State: AIVw113S6Qa+eZmfUPGRWn0H0Idx98xXhdAkcG/wzu1Ve06OrcS07R83 6RMzALB7kmJCoA== X-Received: by 10.84.210.203 with SMTP id a69mr21854986pli.399.1500995963932; Tue, 25 Jul 2017 08:19:23 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id j8sm9984332pgc.24.2017.07.25.08.19.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Jul 2017 08:19:22 -0700 (PDT) From: Tino Calancha References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> Date: Wed, 26 Jul 2017 00:19:18 +0900 In-Reply-To: <83y3rrfm26.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 14 Jul 2017 11:40:49 +0300") Message-ID: <87fudkv91l.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Eli Zaretskii writes: >> commit e5d5bd9822c1c562a7feb16f035062fda603d4d9 >> Author: Tino Calancha >> Date: Thu Jul 13 23:56:43 2017 +0900 >> >> Dired: Handle wildards in directory part >> >> Allow to Dired to handle calls like >> \(dired \"~/foo/*/*.el\"), that is, with wildcards withing >> the directory part of the file argument. > Thanks, but this doesn't seem to work with ls-lisp.el, so I guess it > relies on some features of the 'ls' command. (ls-lisp.el does support > wildcards in the likes of "C-x d foo* RET".) So if we are going to > accept this, either it should be made to work with ls-lisp.el > (preferred), or some kind of error message should be emitted in that > case, Added support for ls-lisp and em-ls. >> +(defun insert-directory-wildcard-in-dir-p (dir) >> + (when (string-match "[*]" (file-name-directory dir)) >> + (let ((regexp "\\`\\([^*]+/\\)\\([^*]*[*].*\\)")) >> + (string-match regexp dir) >> + (cons (match-string 1 dir) (match-string 2 dir))))) > > Any reason you only want to support '*'? What about '?' or '[a-b]', > for example? Added support for (all?) posix globing. > Also, what happens if the directory includes a literal '*' character? > That's possible on Posix systems. Fixed. Then, we will visit that file if does exist. I have something working pretty well. I gave up with `find-lisp' lib because it was really slow. I changed to use 'em-glob' which is really fast! But current implementation doesn't work with (Donald) tramp :-(. If we want this in tramp, i am afraid i will need a tramp super-expert, i.e. Michael. Best smiles, Tino --8<-----------------------------cut here---------------start------------->8--- commit 92330e7e08a62f8731633d78a05b523b98025de2 Author: Tino Calancha Date: Wed Jul 26 00:10:15 2017 +0900 Dired: Handle posix wildcards in directory part Allow to Dired to handle calls like \(dired \"~/foo/*/*.el\"), that is, with wildcards within the directory part of the file argument. * lisp/files.el (insert-directory-wildcard-in-dir-p): New predicate. (insert-directory) * lisp/dired.el (dired-internal-noselect) (dired-insert-directory): Use it. * lisp/eshell/em-ls.el (eshell-ls-use-in-dired): Add/remove both advices. (eshell-ls-unload-hook): New defun. Use it in eshell-ls-unload-hook instead of an anonymous function. (eshell-ls--dired) * lisp/ls-lisp.el (ls-lisp--dired): Advice dired to handle wildcards in the directory part with both em-ls and ls-lisp. * /etc/NEWS: Announce it. * doc/emacs/dired.texi (Dired Enter): Update manual. * test/lisp/dired-tests.el (dired-test-bug27631): Add test. diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index ddd7229b0c..150ac8427a 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -64,10 +64,22 @@ Dired Enter directory name using the minibuffer, and opens a @dfn{Dired buffer} listing the files in that directory. You can also supply a wildcard file name pattern as the minibuffer argument, in which case the Dired -buffer lists all files matching that pattern. The usual history and -completion commands can be used in the minibuffer; in particular, -@kbd{M-n} puts the name of the visited file (if any) in the minibuffer -(@pxref{Minibuffer History}). +buffer lists all files matching that pattern. A wildcard may appear +in the directory part as well. +For instance, + +@example +C-x d ~/foo/*.el @key{RET} +C-x d ~/foo/*/*.el @key{RET} +@end example + +The former lists all the files with extension @samp{.el} in directory +@samp{foo}. The latter lists the files with extension @samp{.el} +in subdirectories 2 levels of depth below @samp{foo}. + +The usual history and completion commands can be used in the minibuffer; +in particular, @kbd{M-n} puts the name of the visited file (if any) in +the minibuffer (@pxref{Minibuffer History}). You can also invoke Dired by giving @kbd{C-x C-f} (@code{find-file}) a directory name. diff --git a/etc/NEWS b/etc/NEWS index f43491b630..af0f461d1f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -604,6 +604,9 @@ paragraphs, for the purposes of bidirectional display. *** You can now use '`?`' in 'dired-do-shell-command'; as ' ? ', it gets replaced by the current file name. ++++ +*** Dired supports wildcards in the directory part of the file names. + *** html2text is now marked obsolete. *** smerge-refine-regions can refine regions in separate buffers diff --git a/lisp/dired.el b/lisp/dired.el index 9d500a9f52..358e50d73c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -920,11 +920,12 @@ dired-internal-noselect "Directory has changed on disk; type \\[revert-buffer] to update Dired"))))) ;; Else a new buffer (setq default-directory - ;; We can do this unconditionally - ;; because dired-noselect ensures that the name - ;; is passed in directory name syntax - ;; if it was the name of a directory at all. - (file-name-directory dirname)) + (or (car-safe (insert-directory-wildcard-in-dir-p dirname)) + ;; We can do this unconditionally + ;; because dired-noselect ensures that the name + ;; is passed in directory name syntax + ;; if it was the name of a directory at all. + (file-name-directory dirname))) (or switches (setq switches dired-listing-switches)) (if mode (funcall mode) (dired-mode dir-or-list switches)) @@ -1056,13 +1057,14 @@ dired-readin-insert (not file-list)) ;; If we are reading a whole single directory... (dired-insert-directory dir dired-actual-switches nil nil t) - (if (not (file-readable-p - (directory-file-name (file-name-directory dir)))) - (error "Directory %s inaccessible or nonexistent" dir) - ;; Else treat it as a wildcard spec - ;; unless we have an explicit list of files. - (dired-insert-directory dir dired-actual-switches - file-list (not file-list) t))))) + (if (and (not (insert-directory-wildcard-in-dir-p dir)) + (not (file-readable-p + (directory-file-name (file-name-directory dir))))) + (error "Directory %s inaccessible or nonexistent" dir)) + ;; Else treat it as a wildcard spec + ;; unless we have an explicit list of files. + (dired-insert-directory dir dired-actual-switches + file-list (not file-list) t)))) (defun dired-align-file (beg end) "Align the fields of a file to the ones of surrounding lines. @@ -1279,11 +1281,14 @@ dired-insert-directory ;; Note that dired-build-subdir-alist will replace the name ;; by its expansion, so it does not matter whether what we insert ;; here is fully expanded, but it should be absolute. - (insert " " (directory-file-name (file-name-directory dir)) ":\n") + (insert " " (or (car-safe (insert-directory-wildcard-in-dir-p dir)) + (directory-file-name (file-name-directory dir))) ":\n") (setq content-point (point))) (when wildcard ;; Insert "wildcard" line where "total" line would be for a full dir. - (insert " wildcard " (file-name-nondirectory dir) "\n"))) + (insert " wildcard " (or (cdr-safe (insert-directory-wildcard-in-dir-p dir)) + (file-name-nondirectory dir)) + "\n"))) (dired-insert-set-properties content-point (point))))) (defun dired-insert-set-properties (beg end) diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 79799db30b..14c83d072a 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -65,17 +65,19 @@ eshell-ls-use-in-dired "If non-nil, use `eshell-ls' to read directories in Dired. Changing this without using customize has no effect." :set (lambda (symbol value) - (if value - (advice-add 'insert-directory :around - #'eshell-ls--insert-directory) - (advice-remove 'insert-directory - #'eshell-ls--insert-directory)) + (cond (value + (require 'dired) + (advice-add 'insert-directory :around + #'eshell-ls--insert-directory) + (advice-add 'dired :around #'eshell-ls--dired)) + (t + (advice-remove 'insert-directory + #'eshell-ls--insert-directory) + (advice-remove 'dired #'eshell-ls--dired))) (set symbol value)) :type 'boolean :require 'em-ls) -(add-hook 'eshell-ls-unload-hook - (lambda () (advice-remove 'insert-directory - #'eshell-ls--insert-directory))) +(add-hook 'eshell-ls-unload-hook #'eshell-ls-unload-function) (defcustom eshell-ls-default-blocksize 1024 @@ -279,6 +281,36 @@ eshell-ls--insert-directory eshell-ls-dired-initial-args) (eshell-do-ls (append switches (list file))))))))) +(declare-function eshell-extended-glob "em-glob" (glob)) +(declare-function dired-read-dir-and-switches "dired" (str)) +(declare-function dired-goto-next-file "em-glob" ()) + +(defun eshell-ls--dired (orig-fun dir-or-list &optional switches) + (interactive (dired-read-dir-and-switches "")) + (require 'em-glob) + (if (consp dir-or-list) + (funcall orig-fun dir-or-list switches) + (let* ((dir-wildcard (insert-directory-wildcard-in-dir-p + (file-local-name (expand-file-name dir-or-list)))) + (default-directory (car dir-wildcard))) + (if (not dir-wildcard) + (funcall orig-fun dir-or-list switches) + (let ((files (eshell-extended-glob (cdr dir-wildcard))) + (dir (car dir-wildcard))) + (if files + (let ((inhibit-read-only t) + (buf + (apply orig-fun + (nconc (list dir) files) + (and switches (list switches))))) + (with-current-buffer buf + (save-excursion + (goto-char (point-min)) + (dired-goto-next-file) + (forward-line 0) + (insert " wildcard " (cdr dir-wildcard) "\n")))) + (user-error "No files matching regexp"))))))) + (defsubst eshell/ls (&rest args) "An alias version of `eshell-do-ls'." (let ((insert-func 'eshell-buffered-print) @@ -909,6 +941,11 @@ eshell-ls-decorated-name (car file))))) (car file)) +(defun eshell-ls-unload-function () + (advice-remove 'insert-directory #'eshell-ls--insert-directory) + (advice-remove 'dired #'eshell-ls--dired) + nil) + (provide 'em-ls) ;; Local Variables: diff --git a/lisp/files.el b/lisp/files.el index 321a35b530..fa72dff58e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6552,6 +6552,22 @@ directory-listing-before-filename-regexp (defvar insert-directory-ls-version 'unknown) +(defun insert-directory-wildcard-in-dir-p (dir) + "Return non-nil if DIR contents a shell wildcard in the directory part. +The return value is a cons (DIR . WILDCARDS); DIR is the +`default-directory' in the Dired buffer, and WILDCARDS are the wildcards. + +Valid wildcards are '*', '?', '[abc]' and '[a-z]'." + (let ((wildcards "[?*")) + (when (and (or (not (featurep 'ls-lisp)) + ls-lisp-support-shell-wildcards) + (string-match (concat "[" wildcards "]") (file-name-directory dir)) + (not (file-exists-p dir))) ; Prefer an existing file to wildcards. + (let ((regexp (format "\\`\\([^%s]+/\\)\\([^%s]*[%s].*\\)" + wildcards wildcards wildcards))) + (string-match regexp dir) + (cons (match-string 1 dir) (match-string 2 dir)))))) + ;; insert-directory ;; - must insert _exactly_one_line_ describing FILE if WILDCARD and ;; FULL-DIRECTORY-P is nil. @@ -6611,13 +6627,19 @@ insert-directory default-file-name-coding-system)))) (setq result (if wildcard - ;; Run ls in the directory part of the file pattern - ;; using the last component as argument. - (let ((default-directory - (if (file-name-absolute-p file) - (file-name-directory file) - (file-name-directory (expand-file-name file)))) - (pattern (file-name-nondirectory file))) + ;; If the wildcard is just in the file part, then run ls in + ;; the directory part of the file pattern using the last + ;; component as argument. Otherwise, run ls in the longest + ;; subdirectory of the directory part free of wildcards; use + ;; the remaining of the file pattern as argument. + (let* ((dir-wildcard (insert-directory-wildcard-in-dir-p file)) + (default-directory + (cond (dir-wildcard (car dir-wildcard)) + (t + (if (file-name-absolute-p file) + (file-name-directory file) + (file-name-directory (expand-file-name file)))))) + (pattern (if dir-wildcard (cdr dir-wildcard) (file-name-nondirectory file)))) ;; NB since switches is passed to the shell, be ;; careful of malicious values, eg "-l;reboot". ;; See eg dired-safe-switches-p. diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 730ba26c6c..611350fbc1 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -60,6 +60,9 @@ ;;; Code: + +(require 'em-glob) + (defgroup ls-lisp nil "Emulate the ls program completely in Emacs Lisp." :version "21.1" @@ -477,6 +480,32 @@ ls-lisp-insert-directory (message "%s: doesn't exist or is inaccessible" file) (ding) (sit-for 2))))) ; to show user the message! + +(defun ls-lisp--dired (orig-fun dir-or-list &optional switches) + (interactive (dired-read-dir-and-switches "")) + (if (consp dir-or-list) + (funcall orig-fun dir-or-list switches) + (let* ((dir-wildcard (insert-directory-wildcard-in-dir-p + (file-local-name (expand-file-name dir-or-list)))) + (default-directory (car dir-wildcard))) + (if (not dir-wildcard) + (funcall orig-fun dir-or-list switches) + (let ((files (eshell-extended-glob (cdr dir-wildcard))) + (dir (car dir-wildcard))) + (if files + (let ((inhibit-read-only t) + (buf + (apply orig-fun (nconc (list dir) files) (and switches (list switches))))) + (with-current-buffer buf + (save-excursion + (goto-char (point-min)) + (dired-goto-next-file) + (forward-line 0) + (insert " wildcard " (cdr dir-wildcard) "\n")))) + (user-error "No files matching regexp"))))))) + +(advice-add 'dired :around #'ls-lisp--dired) + (defun ls-lisp-sanitize (file-alist) "Sanitize the elements in FILE-ALIST. Fixes any elements in the alist for directory entries whose file @@ -869,6 +898,7 @@ ls-lisp-format-file-size (defun ls-lisp-unload-function () "Unload ls-lisp library." (advice-remove 'insert-directory #'ls-lisp--insert-directory) + (advice-remove 'dired #'ls-lisp--dired) ;; Continue standard unloading. nil) diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index 69331457c0..005a82031f 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el @@ -175,5 +175,43 @@ (should (looking-at "src"))) (when (buffer-live-p buf) (kill-buffer buf))))) +(ert-deftest dired-test-bug27631 () + "Test for http://debbugs.gnu.org/27631 ." + (let* ((dir (make-temp-file "bug27631" 'dir)) + (dir1 (expand-file-name "dir1" dir)) + (dir2 (expand-file-name "dir2" dir)) + (default-directory dir) + buf) + (unwind-protect + (progn + (make-directory dir1) + (make-directory dir2) + (with-temp-file (expand-file-name "a.txt" dir1)) + (with-temp-file (expand-file-name "b.txt" dir2)) + (setq buf (dired (expand-file-name "dir*/*.txt" dir))) + (dired-toggle-marks) + (should (cdr (dired-get-marked-files))) + ;; Must work with ls-lisp ... + (require 'ls-lisp) + (kill-buffer buf) + (setq default-directory dir) + (let (ls-lisp-use-insert-directory-program) + (setq buf (dired (expand-file-name "dir*/*.txt" dir))) + (dired-toggle-marks) + (should (cdr (dired-get-marked-files)))) + ;; ... And with em-ls as well. + (kill-buffer buf) + (setq default-directory dir) + (unload-feature 'ls-lisp 'force) + (require 'em-ls) + (let ((orig eshell-ls-use-in-dired)) + (customize-set-value 'eshell-ls-use-in-dired t) + (setq buf (dired (expand-file-name "dir*/*.txt" dir))) + (dired-toggle-marks) + (should (cdr (dired-get-marked-files))))) + (delete-directory dir 'recursive) + (when (buffer-live-p buf) (kill-buffer buf))))) + + (provide 'dired-tests) ;; dired-tests.el ends here --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-25 Repository revision: 24b91584c214caadff0f2394cf1f021bf480b624 From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jul 2017 07:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: Eli Zaretskii , 27631@debbugs.gnu.org Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150105460520990 (code B ref 27631); Wed, 26 Jul 2017 07:37:01 +0000 Received: (at 27631) by debbugs.gnu.org; 26 Jul 2017 07:36:45 +0000 Received: from localhost ([127.0.0.1]:56687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daGs8-0005ST-U8 for submit@debbugs.gnu.org; Wed, 26 Jul 2017 03:36:45 -0400 Received: from mout.gmx.net ([212.227.17.22]:61115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daGs6-0005SG-Ii for 27631@debbugs.gnu.org; Wed, 26 Jul 2017 03:36:43 -0400 Received: from detlef.gmx.de ([79.140.121.197]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MSuYT-1dBD781vtt-00RnP0; Wed, 26 Jul 2017 09:36:35 +0200 From: Michael Albinus References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> Date: Wed, 26 Jul 2017 09:36:33 +0200 In-Reply-To: <87fudkv91l.fsf@calancha-pc> (Tino Calancha's message of "Wed, 26 Jul 2017 00:19:18 +0900") Message-ID: <87d18nk5tq.fsf@detlef> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:tf3UocVv1G71O1+B0ncBIdKJ9Xott66DES5MpSkogxmatxU6D48 tdd510Qv3URpy/yS7/lcQPeHJFH8Fnbi+2p1d8J3YuxCFAGaYZclDG+IgNRSgyYaIWfu6Iq WD7tqHzk5i/G5AbLhmI28STBoIFwD09o9H4R04Hn8L3witrW9an8a2xCK68Tf5isMIfBafG mQhT3qM03J/B20wEJpg/w== X-UI-Out-Filterresults: notjunk:1;V01:K0:griC3JzNKGA=:E+kJ0ytksyLg66dNOlTo4e LUctiN97byuMPk9AgyVSNToLbRGs/S1b0dHOfsil3pTYcOoCziacTeSCf3Cuub/o6AFdVzNZc aah/rh41Det4ViYBAhSSKDDLOI5GO+7uJkXF6LSwlrLAMHf4H3ZUElNyK+X2XVp2kkRFyUr5I 00QbjWPOIQlrjRR10bVfbn4QcCrtHKoofqzKUuK0xOgEaBV93xFnm1pjiAy6ZsB9Qh6XjLSf8 Am48Ah6YAzCJyVJ/KcRNUY7ogHtlC9ivXvvnLbxkr+wzKty0zfGtCCUCGSXzB4BKl1C4JPCq+ Viprr4RxkgiFWSd2CMazwifCcoXpvI1n4fEZKAiD8V6icP9sU7fjAwuLunj2EIWdwExjCpodU IXqRxkZtFPZLPQ9pUwyX4J+IM1jQWbqsjUTYoBncvRpTRCNgtpPP2DyRYbT3aFsIiKcLZhBGl THZftwkoF0XH9tIoH+cn+XxIavBhwyLs1yvoqqTN0Hbyf1/izbZGewvNEWsX41f5Cda2sgexv UJ97nvJDNc1VIemT4geznzBsZcfsrlU6ZziHDtmxkZqEjn8whZ7lzVFVt8N3SS+crpQpCEr0q XlSt+rscpheSgV5sI53fcW2QxOeTRkzT83iXUPqnYH2ACA3P5NTV5obVAVA0FC8QVUw1II+PA UXG8zIsLqLQLVXNvS0drqBpEcQo2S3KbqT8shEeOIol4PENaIqeayaz11t0oFSD0XuYMUZ65v HLiVTisn+Nq+prAlRktXUHRTp3TrqIpF9Bo5OCE0zLMd3CfHAhhj2WgfAy2dq/sLhEeEKBeso sUoA+2pSbgB/5j3TjJ26S7f4ptfuyj7RBXFIKi4rGdhcYjdsDs= X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) Tino Calancha writes: Hi Tino, > But current implementation doesn't work with (Donald) tramp :-(. If we > want this in tramp, i am afraid i will need a tramp super-expert, > i.e. Michael. I've applied your patch, and I've performed "C-x C-f /scp:remotehost:~/src/tramp/*/*". It works as expected. Neither "C-x d ~/src/*/lisp" nor "C-x d /scp:remotehost:~/src/*/lisp" works. According to the NEWS entry in your patch, I would expect that at least the former works. Could you, pls, tell me what I shall do? Sorry, I didn't follow the whole thread. > Best smiles, > Tino Best regards, Michael. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jul 2017 07:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: Eli Zaretskii , 27631@debbugs.gnu.org Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150122823415045 (code B ref 27631); Fri, 28 Jul 2017 07:51:02 +0000 Received: (at 27631) by debbugs.gnu.org; 28 Jul 2017 07:50:34 +0000 Received: from localhost ([127.0.0.1]:59147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db02c-0003ub-1X for submit@debbugs.gnu.org; Fri, 28 Jul 2017 03:50:34 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db02a-0003uO-KL for 27631@debbugs.gnu.org; Fri, 28 Jul 2017 03:50:32 -0400 Received: by mail-pg0-f68.google.com with SMTP id y129so22904397pgy.3 for <27631@debbugs.gnu.org>; Fri, 28 Jul 2017 00:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=lZ7ThM5LBP9q57JCcY7NadFKjMu8+OnPGEamPPPefEo=; b=sj4Ibjjm+dwofw+T4zWOamLA5aRoyj1555ePF+/tc94FO8dboJpt8/vOpkyORwpGbv aJWm14yLLEyNDtryv6YSvHoxxtOrMFAMzrxiiR4xh9Gyeyoj7s9OS1SMuMKsbE7UDwuH /ofyvPTa3E5rQG36hBLn3BNOl0Zz+BsfxbOZEedTe8K5leKEYh6TmLrHrQzP6IUGMNe4 vVhqCR2HLZyVdy3Eg1h2TY+kSqdSignkeyUXer8X9Vh1ds9ueyPEtNt8MdU0R9hosiLr aed9zvbqBRPexGLOqFDlltx63jFlE1AMqlEza/1iz67Ex0w56I86cOylR/dl6T/VmVHx yB+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=lZ7ThM5LBP9q57JCcY7NadFKjMu8+OnPGEamPPPefEo=; b=YegFRQ+GM8/L5l6eOWEmAAH1EUG/qTgiilam1KMQFEIePYvTa5Dxv0garmi+P5JENS K3G9ZCXwd/ZYB7JwhPtL8meF3V+iL7Njus7gkEYVSKVh2GRoilHCKh1Gq+b8yLTL+x61 RT+TOh8KhRV656O7nWPOblEPrPOqQjbvyQ85YH21EesiL7wUc5VLwn4r20e11Z3f2ehc 1ExqIktUdL9kFny+dlet5BYgOecNEuP3e5bygKr9atV28P9jGxXFLV5I+wME1+hadE2D 8eN8WtCgt96kkgzL0ge5mg9m8YyNfHQdsHz771WlwfqNbhXSsM+ZbMz9g6OEnPAXbIAy vBQg== X-Gm-Message-State: AIVw113vDQt9V4McXy4piiQXHlYkN3H5/a0jWmqvSdTodr3h9Kjk/moS 0j2QQzB2qhs3AKKH X-Received: by 10.98.75.148 with SMTP id d20mr2630317pfj.48.1501228226406; Fri, 28 Jul 2017 00:50:26 -0700 (PDT) Received: from calancha-pc ([240f:6e:fb29:1:9ee6:2511:da80:1c7e]) by smtp.gmail.com with ESMTPSA id r64sm41386377pfj.62.2017.07.28.00.50.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Jul 2017 00:50:25 -0700 (PDT) From: Tino Calancha References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> <87d18nk5tq.fsf@detlef> Date: Fri, 28 Jul 2017 16:50:20 +0900 In-Reply-To: <87d18nk5tq.fsf@detlef> (Michael Albinus's message of "Wed, 26 Jul 2017 09:36:33 +0200") Message-ID: <877eyt2e6b.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Michael Albinus writes: > I've applied your patch, and I've performed "C-x C-f > /scp:remotehost:~/src/tramp/*/*". It works as expected. > > Neither "C-x d ~/src/*/lisp" nor "C-x d /scp:remotehost:~/src/*/lisp" > works. According to the NEWS entry in your patch, I would expect that at > least the former works. No, the former must fails because there is n match. Maybe just the error i= s not clear. The wildcard, ~/src/*/lisp matches things like: ~/src/foo/lisp but not: ~/src/lisp I) The following should match something: C-x d ~/src/*/gray* I got a dired buffer with 3 files: bitmaps/gray1.xbm bitmaps/gray3.xbm bitmaps/gray.xbm II) If i try I) with tramp, for instance calling sudo: /sudo:calancha@calancha-pc:/home/calancha/soft/emacs-master/src/*/gray* RET then i get: tramp-file-name-handler: Couldn=E2=80=99t =E2=80=98cd /home/calancha/soft/e= macs-master/src/\*/=E2=80=99 ;; Which doesn't sorprise me because my patch doesn't touch any ;; tramp file. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jul 2017 09:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: Eli Zaretskii , 27631@debbugs.gnu.org Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150123383823360 (code B ref 27631); Fri, 28 Jul 2017 09:24:01 +0000 Received: (at 27631) by debbugs.gnu.org; 28 Jul 2017 09:23:58 +0000 Received: from localhost ([127.0.0.1]:59205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db1Uz-00064i-Rj for submit@debbugs.gnu.org; Fri, 28 Jul 2017 05:23:57 -0400 Received: from mout.gmx.net ([212.227.17.20]:64661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db1Uy-00064U-DD for 27631@debbugs.gnu.org; Fri, 28 Jul 2017 05:23:56 -0400 Received: from detlef.gmx.de ([212.86.53.188]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MSq5p-1dBYgL2hBV-00Ro8A; Fri, 28 Jul 2017 11:23:48 +0200 From: Michael Albinus References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> <87d18nk5tq.fsf@detlef> <877eyt2e6b.fsf@calancha-pc> Date: Fri, 28 Jul 2017 11:23:47 +0200 In-Reply-To: <877eyt2e6b.fsf@calancha-pc> (Tino Calancha's message of "Fri, 28 Jul 2017 16:50:20 +0900") Message-ID: <87shhg6hjw.fsf@detlef> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:CWMFwdZe9n8SZ2A/AWhuP3bb47MTJrgJOaLmUwo4M8XnaCQI3Mz uSy2tMIfZMbmWWKazREFdNGCu2Mg/IjRlaCDQUByYORpCm00cMDUAI0dwAaBSLrXXuRGAMK k2UdiJ+fzYfAj8/EVQozSxjCg6F1jhLl8SdyKjY2xoqOLGHuNQusIA9MKpsTnd4mvEu/HG7 Vp+4htSczz90QK2ZmWAVA== X-UI-Out-Filterresults: notjunk:1;V01:K0:yC9+Mukk3Hs=:jvZBsEcAZ7RM6jWVBXWCZb nS48m38A8gDMrNjucUZUmomfCjxGGPFAqohrp/E2X0XryELicg+AbqqFYYX6zMKEmbgIfUa0J CQ8tIuc3GgFhjJGeud5p0xBB4drV3FXDLEjwOZOVbxwC+mwu3u79NndYeIC/OG9KKIY1dArY2 7u2weyhnLFKne4eGrvwwo22hNGxPSVtAfdd5EZcH6KPCs5oExNvTriTNF8UsuWeuvggiyFcUB HyX/4ATfNKLhEGKmtVQz+/xxOswTFJVcnNEcZC+1e4PstTZoJpTtTIgS+zUtqBB5lLZ9KgUDf Z6VG/sj8qZ/m5xKqjOIKZBHCO/ttkgS7oJ67ynDpY4zsSIMPC/j4gq051IEAEDpfLeUfXkWoU lq1GbuQ1hnP16Si/+2SK4I5JOIYAE9CUm23yNnTb4V7AkBJJ7BfgUP4oXK6TwtPorZqTenMq6 CzexATFshn3IE9q3Y0XU2azzoX53gkjs42liOWGvphs5rGfehq2L8SjhqxwG4+ZlLN4b3PC0b HX0QPp7a9ktlB73qqXjvCdzZYXXjJExEgxbbfbjqh/Xu3vJklw4etm3HjvW1O9xPVWP1x8T8i 7FIOt0N/zU19tpTKAfI2x5SSKy458UTRwtlgjuE6nb6sJcQQc1ty5Fad7RCLptCc4fw44dWjz 75W8klxtXiy4wDkZxgTUzDSeV30tyOdr0sWSj0kHrOcNZDdzUh1F7VhETITWaOrNb6AAriVEz OoAxi3fRXk97VxeXjuQlClMuCkOSD2uGBl3hCTLtFdAf1MWYtniTJY6sif/vOdQd2WlLUtfWZ RRbzrI62tqKeGzELLzPe4pWhIBCPOHJm3Mnu0j1eOWg5ktYIpY= X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) Tino Calancha writes: >> Neither "C-x d ~/src/*/lisp" nor "C-x d /scp:remotehost:~/src/*/lisp" >> works. According to the NEWS entry in your patch, I would expect that at >> least the former works. > No, the former must fails because there is n match. Maybe just the > error is not clear. > The wildcard, ~/src/*/lisp > matches things like: > ~/src/foo/lisp > but not: > ~/src/lisp I should have said that there exist ~/src/emacs/lisp and ~/src/tramp/lisp. I would expect to see them with "C-x d ~/src/*/lisp". I'll check again why it doesn't work for me. Best regards, Michael. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jul 2017 09:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: Eli Zaretskii , 27631@debbugs.gnu.org, Tino Calancha Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150123447224334 (code B ref 27631); Fri, 28 Jul 2017 09:35:02 +0000 Received: (at 27631) by debbugs.gnu.org; 28 Jul 2017 09:34:32 +0000 Received: from localhost ([127.0.0.1]:59214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db1fE-0006KQ-4d for submit@debbugs.gnu.org; Fri, 28 Jul 2017 05:34:32 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:38022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db1fC-0006KC-ER for 27631@debbugs.gnu.org; Fri, 28 Jul 2017 05:34:30 -0400 Received: by mail-pf0-f195.google.com with SMTP id e3so2736002pfc.5 for <27631@debbugs.gnu.org>; Fri, 28 Jul 2017 02:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=FV0YwCA6QyoCAGK93b5DTpO3BUnPR0JMcUgxwW8zito=; b=SZcNzxLNn2OGOIGrej7WkKEWqxgDJia0tLDCbXUjMlj5afjSAP9pL8bRJTTjhBcfbe 7hBFS+rUtNj97B1zJbAzQzZSHk/+9Qk7Yw4zWFgsNYIeNnt6+zm68TjIECIrfy3XURTg C60iYJH+wyXg7Qr2Tay8jv22bLAD1m3QiMpluF+SWJFVJmAWNd7dYZrp2HjHBVdS+dFu rVaKq9xDzjKQrkBfiIxnqTvt9rWJIlt5oWniVAXaYLUW4nceDs0OQEwRO+CJ3oBVQDDt Ry2gNkd9oAghDZr21Zls9uJ6FT68KroIYBPdIKtzdG+xFkNG4cQvmYUHMy7RitCHqj3n V1BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=FV0YwCA6QyoCAGK93b5DTpO3BUnPR0JMcUgxwW8zito=; b=tYavqA9KfUdbu1g+Kl0RQXHXLvC2TlF7i6MDERmqAZNUjGk/Ua5Py83xgwOTCFCSqr 5e+Jthi194F6ImOjSMR7FeLaIzNCfattB0hCXphcItYl9or4CJ67asYQY+SCRpRzXRKK MKPqxpaIJ8zU1eLeMwnU8PB587Feb6p40BwNrt/6gQjZyieiWOpHF/+6SnHIDcUByirE Pu+FRFH/Ix+vLP4DMjx5TZWOxY24hJn2p2cXq1j+UKYNTYCzA14GDaObbzJau0+PUFT1 nw02UDZTWoz81Ksp3p0DS+vPa2eaabspNUe7Jul+RHSXw4QCbTh11MG9nTGcCEA3f18y r8nw== X-Gm-Message-State: AIVw112VG+ntK8uMs7wGK0fgKLxd7S8aYVgLJuBmHUz/uJq2WFyCqLcP O9BUhx67al8Qkg== X-Received: by 10.99.175.67 with SMTP id s3mr7010431pgo.134.1501234464520; Fri, 28 Jul 2017 02:34:24 -0700 (PDT) Received: from calancha-pc ([240f:6e:fb29:1:9ee6:2511:da80:1c7e]) by smtp.gmail.com with ESMTPSA id q79sm37813727pfi.99.2017.07.28.02.34.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jul 2017 02:34:23 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 28 Jul 2017 18:34:20 +0900 (JST) X-X-Sender: calancha@calancha-pc In-Reply-To: <87shhg6hjw.fsf@detlef> Message-ID: References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> <87d18nk5tq.fsf@detlef> <877eyt2e6b.fsf@calancha-pc> <87shhg6hjw.fsf@detlef> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) On Fri, 28 Jul 2017, Michael Albinus wrote: >>> Neither "C-x d ~/src/*/lisp" nor "C-x d /scp:remotehost:~/src/*/lisp" >>> works. According to the NEWS entry in your patch, I would expect that at >>> least the former works. >> No, the former must fails because there is n match. Maybe just the >> error is not clear. >> The wildcard, ~/src/*/lisp >> matches things like: >> ~/src/foo/lisp >> but not: >> ~/src/lisp > > I should have said that there exist ~/src/emacs/lisp and > ~/src/tramp/lisp. I would expect to see them with "C-x d ~/src/*/lisp". When you are not using neither 'ls-lisp' nor 'eshell-ls', then it is the system shell who performs the wildcard expansion. That means, if the following doesn't work: M-! ls ~/src/*/lisp RET then, C-x d ~/src/*/lisp RET must fail as well. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jul 2017 11:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: Eli Zaretskii , 27631@debbugs.gnu.org Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.15012410321725 (code B ref 27631); Fri, 28 Jul 2017 11:24:02 +0000 Received: (at 27631) by debbugs.gnu.org; 28 Jul 2017 11:23:52 +0000 Received: from localhost ([127.0.0.1]:59279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db3N1-0000Rk-QK for submit@debbugs.gnu.org; Fri, 28 Jul 2017 07:23:51 -0400 Received: from mout.gmx.net ([212.227.17.21]:55939) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db3N0-0000RX-Gz for 27631@debbugs.gnu.org; Fri, 28 Jul 2017 07:23:51 -0400 Received: from detlef.gmx.de ([212.86.53.188]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LaJWs-1dzxRo0iGU-00m7I4; Fri, 28 Jul 2017 13:23:42 +0200 From: Michael Albinus References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> <87d18nk5tq.fsf@detlef> <877eyt2e6b.fsf@calancha-pc> <87shhg6hjw.fsf@detlef> Date: Fri, 28 Jul 2017 13:23:41 +0200 In-Reply-To: (Tino Calancha's message of "Fri, 28 Jul 2017 18:34:20 +0900 (JST)") Message-ID: <87k22s6c02.fsf@detlef> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:uGMrOIoU/XL4apWfOJEt8qZITsETb5BKWbUiO1eeLBFVw4UL744 GjC2cgaUZW3QKwKgHMQm9LIbq9tmGVEYP8pd3DCAk3PN9DK7UYTG3juH+hwfisvG6hYPIZk aPc/DJSyCSvLhmqN29srRVRtzoiBh8GMGHO7B4+e/0juwvyK4P08g0+g7Dvv9Dmhl84zlUD m0eLMGjYXKAh6u50evTqA== X-UI-Out-Filterresults: notjunk:1;V01:K0:PayiFjpInRw=:0GvBTPGnZvhgMr1II6FHii Ui9SJfTX0M8V6mq3IJ4paoNT1mT9YjF6zQlfUeghn/XnjI6SOhT1VBY2f9yYrJ0ICvj0BPhDv 6v9DL5+sdyKWWbroQJgBKgUi60lmVobQxV5c8Lm8nXsc2zwuXmqmTy2GcjB0irGtUmfDvAZlz 9qwxfK6H0CzHSRPqrjQFUdthVkT9966OMzGZLZnHKb0ca5OU2CwmnKMsTufmr6lnOtwor5Spi gMzgk1EJtvR98dNb25XSTE8/4WO9UFPSTyT9QGdpg0ZLu5lHu1ZaxYV4zVV/2Y526FpE00rZF RYNVALPT2KAfRNEq2NX6T0nXOT46NiJWEMPCY4/v9ve4yJB78h7U+cZu9sV3QS1yrA6tYnLLH Ll2G6OK+/a5O5nwKw7aJNJPht/pgWHlBoJt1YJu3CbQRji3xhYaRJMP+BwZz6ev5dGSEb10tX RmPDNZfvFphJ8eSDDSN/CFOyza8K3Oa1yGAtUPPwQGNqXa/lD79BVrlJk8T0XINO4oqLKt+b8 4Su5fmnhA5wQhrPLtP9c1td8tycWYy8tmS1GUkXKmfSzgnz+HpE+PqatNwOSpIVq7+i1PSf9o 0jeHfUSv3RaCDa/NAlcvHo6zLTSg/HxVOkcmTOjRzUL45MsVdDO2ItCP+pgXgQ6F7UXvtSXbm jwcUnwDgm/l3X1W5YOJGTtoLm5V7eh9Coz/pORmgJqONNwwHG5FYWafmAip9b1h28ol3FCVYw GFNvcXsUci9IGjoCJWlczNZyhub/YeCKNjErbZobPEeKMWSEUo9s87ZF3byumhcax88FXirO1 /OvDsN0bYL1LsQ4Zd/yMksnd40j3sGPYVo1I2mHWgAOMNSZlmE= X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) Tino Calancha writes: Hi Tino, > That means, if the following doesn't work: > M-! ls ~/src/*/lisp RET > then, > C-x d ~/src/*/lisp RET > must fail as well. That command works. I'll check, what's up with your patch and why it doesn't work for me. Best regards, Michael. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jul 2017 12:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: Eli Zaretskii , 27631@debbugs.gnu.org Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150124327012039 (code B ref 27631); Fri, 28 Jul 2017 12:02:01 +0000 Received: (at 27631) by debbugs.gnu.org; 28 Jul 2017 12:01:10 +0000 Received: from localhost ([127.0.0.1]:59298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db3x8-000387-Eh for submit@debbugs.gnu.org; Fri, 28 Jul 2017 08:01:10 -0400 Received: from mout.gmx.net ([212.227.17.20]:54960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1db3x6-00037p-Sc for 27631@debbugs.gnu.org; Fri, 28 Jul 2017 08:01:09 -0400 Received: from detlef.gmx.de ([212.86.53.188]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LvhC4-1deYWe0isu-017Ub2; Fri, 28 Jul 2017 14:01:00 +0200 From: Michael Albinus References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> <87d18nk5tq.fsf@detlef> <877eyt2e6b.fsf@calancha-pc> Date: Fri, 28 Jul 2017 14:00:59 +0200 In-Reply-To: <877eyt2e6b.fsf@calancha-pc> (Tino Calancha's message of "Fri, 28 Jul 2017 16:50:20 +0900") Message-ID: <877eys6a9w.fsf@detlef> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:j+9BqMw/LRxsB3WVoqndVBuODybxnEeImt4sLJdsRoOvMT3oUQS AEnFcnFfqsjpkfTlsFvDEow/sxALPjovXU6fok6F/WQ3GZDqc0+o/rJ2zfIAXdoz5SOpDDi DgQ2sGaxn1PPucsRDJVVfgH5bxhM1HAgwkATYB1piDm9/Osw6DGTfNaoxexSpzvQIP+9Do5 aV0PtJlfg7jB3UCJCfO2w== X-UI-Out-Filterresults: notjunk:1;V01:K0:p0syUR/onRE=:NhQSF1S0zLp4FoHhvHVJkn PZrz7M8HFjxwlp73nD0CjCiqLBXx5OBAY9oR1Xm9ILKzSF+3+Zohw5bRvz0Ab0D4qtTplpAaB yZqvJ5PyCx7Xa7GerP996Gzz37dsMdkOzbY46VcAE+b3K9Tgl+sHKR99p78GQ4ewCHIIAf/Xt he7TFWxNBC6gJ9JdgBUApcp2r+I8lG62G7iVpYsSDGaKTo1TevzUxKSMHne1N912mE/UNhaUZ BkfzpfB57B39eP8fBXsDDBkBxuPDTVLNnnEP/iR2Ql0TtEb/4+L1VD9h/cPaKl35/HWtnYK1d 5l/4L0zRGRo8n6uRCuQx3DAzgG5IZcNG4LMqEIxfyzuYjG/tFO7zif27rsAAJTdf04rAlgXDp ghwjj81XZ93pl73A/IUYUJVb67DvhKxDBnuhfev+oX0nMGYT8VFEjeB+JOu7aY8iT3miUGHZx +ZYZDScpHZX6mVX65wBI5sWtDCiJsUBotkD/iUALrcHgWXDUHL1pFFB8QeSuNxjmNjTQYycq/ gN67OOnVfbVJ7fFGsqDMCy7qXbxI5oEcuw1PEwxEW++Yk3/pqhZK6vZ0ImZaZtlSBPl2gt2qo F50F9MGKBwP8ZT3osZOPkHeXpuGA7QFkkoSVAMMDEOWHL/IOKpnAfvQLV/L3KM9OSPchp/zRl JwxwuSxlrvnLzmBSXwf9YQadAe57HNZJyj1NeJd2gR8zVD20i7lUceI04T1PNttkT7SIs49vW JML+DuJc7BQ3qxnxTiagDeg4xb62igEmkS2RJHZZe4rRJgIBe8A1S12i5L3VozcfJF9xz9ANu xa7lIETlirJw8KYvq9daa1JgQ/CVfuQp5zQXQuvJFeWEHg1pdk= X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) Tino Calancha writes: > I) > The following should match something: > C-x d ~/src/*/gray* > > I got a dired buffer with 3 files: > bitmaps/gray1.xbm > bitmaps/gray3.xbm > bitmaps/gray.xbm The second time I've applied your patch it works. I get a similar result. Don't ask me what happened before, pilot error very likely. > II) > If i try I) with tramp, for instance calling sudo: > /sudo:calancha@calancha-pc:/home/calancha/soft/emacs-master/src/*/gray* R= ET > then i get: > > tramp-file-name-handler: Couldn=E2=80=99t =E2=80=98cd /home/calancha/soft= /emacs-master/src/\*/=E2=80=99 Same error here. The backtrace shows me: --8<---------------cut here---------------start------------->8--- tramp-file-name-handler(insert-directory "/ssh:localhost:/home/albinus/sr= c/emacs/src/*/gray*" "--dired -al" t nil) insert-directory("/ssh:localhost:/home/albinus/src/emacs/src/*/gray*" "--= dired -al" t nil) dired-insert-directory("/ssh:localhost:/home/albinus/src/emacs/src/*/gray= *" "-al" nil t t) dired-readin-insert() dired-readin() dired-internal-noselect("/ssh:localhost:/home/albinus/src/emacs/src/*/gra= y*" nil) dired-noselect("/ssh:localhost:~/src/emacs/src/*/gray*" nil) dired("/ssh:localhost:~/src/emacs/src/*/gray*" nil) funcall-interactively(dired "/ssh:localhost:~/src/emacs/src/*/gray*" nil) call-interactively(dired nil nil) command-execute(dired) --8<---------------cut here---------------end--------------->8--- I believe it is wrong to expand wilcards in `insert-directory'. It is not designed for that. Expanding must happen in `dired-insert-directory', which calls then `insert-directory' for the results. This relates to your description in etc/NEWS: *** Dired supports wildcards in the directory part of the file names. Best regards, Michael. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jul 2017 08:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27631@debbugs.gnu.org, michael.albinus@gmx.de Reply-To: Eli Zaretskii Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150131703532727 (code B ref 27631); Sat, 29 Jul 2017 08:31:02 +0000 Received: (at 27631) by debbugs.gnu.org; 29 Jul 2017 08:30:35 +0000 Received: from localhost ([127.0.0.1]:60560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbN8t-0008Vn-Am for submit@debbugs.gnu.org; Sat, 29 Jul 2017 04:30:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbN8r-0008Va-M8 for 27631@debbugs.gnu.org; Sat, 29 Jul 2017 04:30:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dbN8l-0000wG-Pc for 27631@debbugs.gnu.org; Sat, 29 Jul 2017 04:30:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbN8g-0000rU-RM; Sat, 29 Jul 2017 04:30:22 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4201 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dbN8d-0002FY-D6; Sat, 29 Jul 2017 04:30:20 -0400 Date: Sat, 29 Jul 2017 11:30:10 +0300 Message-Id: <83pocj3ast.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87fudkv91l.fsf@calancha-pc> (message from Tino Calancha on Wed, 26 Jul 2017 00:19:18 +0900) References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Tino Calancha > Cc: 27631@debbugs.gnu.org, michael.albinus@gmx.de > Date: Wed, 26 Jul 2017 00:19:18 +0900 > > Eli Zaretskii writes: > > >> commit e5d5bd9822c1c562a7feb16f035062fda603d4d9 > >> Author: Tino Calancha > >> Date: Thu Jul 13 23:56:43 2017 +0900 > >> > >> Dired: Handle wildards in directory part > >> > >> Allow to Dired to handle calls like > >> \(dired \"~/foo/*/*.el\"), that is, with wildcards withing > >> the directory part of the file argument. > > > Thanks, but this doesn't seem to work with ls-lisp.el, so I guess it > > relies on some features of the 'ls' command. (ls-lisp.el does support > > wildcards in the likes of "C-x d foo* RET".) So if we are going to > > accept this, either it should be made to work with ls-lisp.el > > (preferred), or some kind of error message should be emitted in that > > case, > Added support for ls-lisp and em-ls. > > >> +(defun insert-directory-wildcard-in-dir-p (dir) > >> + (when (string-match "[*]" (file-name-directory dir)) > >> + (let ((regexp "\\`\\([^*]+/\\)\\([^*]*[*].*\\)")) > >> + (string-match regexp dir) > >> + (cons (match-string 1 dir) (match-string 2 dir))))) > > > > Any reason you only want to support '*'? What about '?' or '[a-b]', > > for example? > Added support for (all?) posix globing. > > > Also, what happens if the directory includes a literal '*' character? > > That's possible on Posix systems. > Fixed. Then, we will visit that file if does exist. > > > I have something working pretty well. I gave up with `find-lisp' lib > because it was really slow. I changed to use 'em-glob' which is really > fast! LGTM, please push. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jul 2017 12:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 27631@debbugs.gnu.org, michael.albinus@gmx.de, Tino Calancha Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150132984026595 (code B ref 27631); Sat, 29 Jul 2017 12:04:01 +0000 Received: (at 27631) by debbugs.gnu.org; 29 Jul 2017 12:04:00 +0000 Received: from localhost ([127.0.0.1]:60719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbQTO-0006us-CK for submit@debbugs.gnu.org; Sat, 29 Jul 2017 08:03:59 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbQTN-0006uf-G9 for 27631@debbugs.gnu.org; Sat, 29 Jul 2017 08:03:57 -0400 Received: by mail-pg0-f68.google.com with SMTP id d193so26001168pgc.2 for <27631@debbugs.gnu.org>; Sat, 29 Jul 2017 05:03:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=7F3kx4qA3IGDE3hnD13vD7fZDoYNq+L2o8Q22Nr+668=; b=oOcV6L5z9Vx9uVDfM3DR+iIs+YcjRrwAJ2xnueD2DtVv1xQqc62AEqiYWcvZLbL31b SJm939JgjiU4gPAAaJUDVoNU4LkDlI6qyE/roMMrByrtQpHAo647156Oz77Eom1lFaDu kn1FM8iqB/jZiD7a4pIolAKauz9JeAN6CGEU6KUXFgBaFU+Sk3L170dN3sW3l+SSOqfs DAQd9IYenbeHXdntIsQcVpv4NP6s7uM7CY4ap4FWdKIBNC5WR8OH2BdgW7Oa7ESI0Psb XGVxco6Ppmkpl1GjfOSh93Jw4l0UqM+o2RxXR9Cnw5tOiSaHWQop5dZYQsE6SDw9HNeD xpdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=7F3kx4qA3IGDE3hnD13vD7fZDoYNq+L2o8Q22Nr+668=; b=qGIdJZHUE58pX5mMT8gsb3zdZy23y/aF0AA1UKaSchtP22pIcRnqLxL+Ol2+/ha9hc aaNvvmhaX7+77DMBK1xFT3riEA5zvdlAul7mum3ILK3DViyh10YGW1mH/p+tWTIY1Ivx xqSYCselImoh8lz8MO7uesZmPp6WZcxtwwMjafUp7Ar7JCzfF1WOhsm2+1x/A+IvYUiH vjX2+lr6ZUAQA1yyK57cUA0vrcq45hvbRoy1jrGgHcEqkO5llk02+N/NDDyqkTTefd9Z +8I7tVXsOdjMgw0JHD+anjpvPUQrSDX6DlrENdILtjo3K/yGsPKx2XEW7Z31jNxSJmNQ NnvA== X-Gm-Message-State: AIVw110p2rlaW8wblpfrC6WmVIcGYnbIotJ3Q7bHmZOaHhWJiApAUHBP Uw4iBk11cxWEFQ== X-Received: by 10.98.24.21 with SMTP id 21mr10009776pfy.190.1501329831451; Sat, 29 Jul 2017 05:03:51 -0700 (PDT) Received: from calancha-pc ([240f:6e:fb29:1:9ee6:2511:da80:1c7e]) by smtp.gmail.com with ESMTPSA id t8sm43395461pgq.68.2017.07.29.05.03.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Jul 2017 05:03:50 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 29 Jul 2017 21:03:47 +0900 (JST) X-X-Sender: calancha@calancha-pc In-Reply-To: <83pocj3ast.fsf@gnu.org> Message-ID: References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> <83pocj3ast.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Sat, 29 Jul 2017, Eli Zaretskii wrote: >> because it was really slow. I changed to use 'em-glob' which is really >> fast! > > LGTM, please push. Thanks. I think is better to wait until i provide tramp support. Michael is giving me guidance wo i get we can get this working in tramp soon. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jul 2017 12:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: Eli Zaretskii , 27631@debbugs.gnu.org, Tino Calancha Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150133084628154 (code B ref 27631); Sat, 29 Jul 2017 12:21:02 +0000 Received: (at 27631) by debbugs.gnu.org; 29 Jul 2017 12:20:46 +0000 Received: from localhost ([127.0.0.1]:60748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbQje-0007K2-Ct for submit@debbugs.gnu.org; Sat, 29 Jul 2017 08:20:46 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:37898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbQjc-0007Jp-N0 for 27631@debbugs.gnu.org; Sat, 29 Jul 2017 08:20:45 -0400 Received: by mail-pg0-f44.google.com with SMTP id k190so55506805pgk.5 for <27631@debbugs.gnu.org>; Sat, 29 Jul 2017 05:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=PZ1iAcxz48GeXA3apeZKNRHJZTvrFTFgBru8ERdVNTY=; b=QFlkf2aebpPHnlzR5QoJ7Ul+57dFNaFApRJqJcFwdQs9nfULrIxPmpQd8XHsi+a6WP AQy6PYWgH+i6gDXEwSLzVAwqoPM8pfLKVEiXsbwgzoIGfOW2VPWzaEYANL2kEWDvcMSG rP1vPagLd8qy0EJtz5LjNo+ty1Uim+XPRCbo9KrmZKv8xwIN4NMf6fNavhvECSxSEXki KAOaVfVYD5wMbviWLkd/gGTivBFTGPITJFuDyDRVAIBOa93rEUmAc2/4NewuqJfUC2QD vgo+WszYT2pzPLKeXJz6CZO+Qf6rNRy5qH9dvJobYpko5wZnXixxhtt+g2NrV4JXNrws TRNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=PZ1iAcxz48GeXA3apeZKNRHJZTvrFTFgBru8ERdVNTY=; b=YpBzhubX0WDp0ezKaT0I+3ylrUfd1St40LSA9nvTXNHQbW1j2sIUtdz2eHsBnPvlhy HdKz6fxD87p+k/cJYjQ7tMKW3WkQu9Cs3H7s5rF9F3VZtjr9fVEG6MHMjC6MoyTxACxc s20PV9hL013QlOZIA6YL3GbbPx299qtROBlCuJHLSnRUIGVbS39o0Bv+/kol/e2cL8JH 1251sabOMHHLv3aQ8k2BiB3vgorGMYhkDjDOrYhx9gu1dFOTSddvIPe6CrWJjLM/tY+1 g+5B1XMez/eq9/NLwIVw1g4CnUacecn40RSCL/7p4OfAYh8LcAi2q5sIJOdAk8QZzEdj X5RA== X-Gm-Message-State: AIVw113B5Sk5KGmFiB85J+jla69Bkosw7D95LH6+KSIx1R4ls4y7BnC7 ukcgGGIxrpDV3g== X-Received: by 10.99.143.67 with SMTP id r3mr9935840pgn.126.1501330838891; Sat, 29 Jul 2017 05:20:38 -0700 (PDT) Received: from calancha-pc ([240f:6e:fb29:1:9ee6:2511:da80:1c7e]) by smtp.gmail.com with ESMTPSA id 15sm12168793pfm.32.2017.07.29.05.20.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Jul 2017 05:20:38 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 29 Jul 2017 21:20:35 +0900 (JST) X-X-Sender: calancha@calancha-pc In-Reply-To: <877eys6a9w.fsf@detlef> Message-ID: References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> <87d18nk5tq.fsf@detlef> <877eyt2e6b.fsf@calancha-pc> <877eys6a9w.fsf@detlef> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-966496107-1501330837=:26107" X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) --8323329-966496107-1501330837=:26107 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT On Fri, 28 Jul 2017, Michael Albinus wrote: >> If i try I) with tramp, for instance calling sudo: >> /sudo:calancha@calancha-pc:/home/calancha/soft/emacs-master/src/*/gray* RET >> then i get: >> >> tramp-file-name-handler: Couldn’t ‘cd /home/calancha/soft/emacs-master/src/\*/’ > > Same error here. The backtrace shows me: > > --8<---------------cut here---------------start------------->8--- > tramp-file-name-handler(insert-directory "/ssh:localhost:/home/albinus/src/emacs/src/*/gray*" "--dired -al" t nil) > insert-directory("/ssh:localhost:/home/albinus/src/emacs/src/*/gray*" "--dired -al" t nil) > dired-insert-directory("/ssh:localhost:/home/albinus/src/emacs/src/*/gray*" "-al" nil t t) > dired-readin-insert() > dired-readin() > dired-internal-noselect("/ssh:localhost:/home/albinus/src/emacs/src/*/gray*" nil) > dired-noselect("/ssh:localhost:~/src/emacs/src/*/gray*" nil) > dired("/ssh:localhost:~/src/emacs/src/*/gray*" nil) > funcall-interactively(dired "/ssh:localhost:~/src/emacs/src/*/gray*" nil) > call-interactively(dired nil nil) > command-execute(dired) > --8<---------------cut here---------------end--------------->8--- > > I believe it is wrong to expand wilcards in `insert-directory'. It is > not designed for that. Expanding must happen in > `dired-insert-directory', which calls then `insert-directory' for the > results. Hi Michael, thank you for your advice on this. I have a new version which handle the expansion in `dired-insert-directory'. I pushed a new branch with the newest patch: origin/feature/dired-wildcard-in-dir-bug#27631 When the user is neither using 'ls-lisp' nor 'eshell-ls', then we run in the remote host something like: (process-file "/bin/sh" nil (current-buffer) nil "-c" (format "ls %s %s" switches wildcard))) I have tested it running tramp in a remote machine and it seems to work. What do you think? Tino --8323329-966496107-1501330837=:26107-- From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jul 2017 20:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: Eli Zaretskii , 27631@debbugs.gnu.org Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.15013607589479 (code B ref 27631); Sat, 29 Jul 2017 20:40:02 +0000 Received: (at 27631) by debbugs.gnu.org; 29 Jul 2017 20:39:18 +0000 Received: from localhost ([127.0.0.1]:33410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbYW6-0002Sp-H6 for submit@debbugs.gnu.org; Sat, 29 Jul 2017 16:39:18 -0400 Received: from mout.gmx.net ([212.227.17.21]:64696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbYW4-0002Sc-8W for 27631@debbugs.gnu.org; Sat, 29 Jul 2017 16:39:16 -0400 Received: from detlef.gmx.de ([178.20.90.228]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LbPza-1e08gL48i2-00l16J; Sat, 29 Jul 2017 22:39:08 +0200 From: Michael Albinus References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> <87d18nk5tq.fsf@detlef> <877eyt2e6b.fsf@calancha-pc> <877eys6a9w.fsf@detlef> Date: Sat, 29 Jul 2017 22:39:07 +0200 In-Reply-To: (Tino Calancha's message of "Sat, 29 Jul 2017 21:20:35 +0900 (JST)") Message-ID: <87pocj3rmc.fsf@detlef> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:pNhVbrkmxOpq7uxM34DPUGRQi8QExJfCGDxxQkoSXW3dufIDxup spEKDgW3B2OqBvLXpK9BpKvnpNLQ422WelKQYJTzfRgF/Jfd1v5PP0OKA+wnxSEVWt85Ifo ycChfOtA6JXTQABBr1jOsZ2tRmzRBkKN+8vLgPDPqxQco/su6Ig5xTmvUUKDn5LADQKqYv8 Zwgd3Ze8dzK447bKN2fSA== X-UI-Out-Filterresults: notjunk:1;V01:K0:wGwkupB+K4U=:EWwHWEM+aLSwfHZTycNND1 YpcfdLFaCeuU6NNicx5OgwvnGdKO9TXG8qa0JSuYBt+J0QKXSzDRIivlpZFlttop8+FuYUcJl xbaNw1S0zj3PqpR+R7xaXC33i5P71LHdUvEf+39b25zMz7AkE2kp6xqGWN3SARL6tDhmQqpQF WYFZe0wpdSN6lUAQOL7Uw+ElcUs+zD4S0NECGX409P+jxadbHRnV5KetPwrW6oQTWBQmdPNpg ZT3S5kN4r1RTOkdbLVAJBfkl3DKQEYrbOx9NUzbBZ+udSNKMErMfKFYiQb2sM19n8j9GN86pu 9rzP/RDCvE8Unilb0eKLoe1m27FJip52gpA4xnT0if4iNYnmsoQNwiL4xIVlSgPQ3tVLNRM0w veBhTppKBa74kJ/TJPLpn4UJl4Iy+Uldz0P8/WCylvLr0zkCc6m8I/W53fUKDPxsivugLB0nt TymVqgm61Bi86CfzsEIdLojbrKeA5n9g9pv/R8DvlUdUakd6X0TsimFJTHjvWNK74xEti+teF cp/E+vlmZsqiJ4dPN9EJ7mabUae7KgoNmdIsNt9bO6LEK04hrQEaq/IpWHIOD2dB+t/cmjBq7 MdFx6EA5ramq3Xj39FAO4Peg6Yj/KjVdiBhxuRWnNwvslBKCdfYf7hbqYXWFJ6bqmvNaROUS3 oqaK024kUctsML/7S1Y/+fLO1C97/uzNCA9PspfqHhgWMxMJZyXRW1Y+ehk3iQNvmuWeGSDRz 3aNF8tx2ReozExtWngDFEISszDplrtO1sLT4YgLfkB9tbzv5xMPn058Imx7V01Fev3sON0MJ+ hd0dtUTLiAI5KK9h3IOdgo0eSTCXFB//rweqXuO1QFm4tIVESk= X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) Tino Calancha writes: > Hi Michael, Hi Tino, > thank you for your advice on this. I have a new version which handle the > expansion in `dired-insert-directory'. I pushed a new branch with > the newest patch: > origin/feature/dired-wildcard-in-dir-bug#27631 > > When the user is neither using 'ls-lisp' nor 'eshell-ls', then we run > in the remote host something like: > (process-file "/bin/sh" nil (current-buffer) nil "-c" (format "ls %s > %s" switches wildcard))) > > I have tested it running tramp in a remote machine and it seems to work. > What do you think? I made a short test, works for remote directories. Likely, I'll add a test to tramp-tests.el next days, in order to let it run for a variety of other Tramp methods, like adb, gdrive and smb. You might push it to master. > Tino Best regards, Michael. From unknown Sat Jun 21 10:45:34 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Subject: bug#27631: closed (Re: bug#27631: dired a/*/b) Message-ID: References: <87tw1u64yh.fsf@calancha-pc> <87o9sth2oi.fsf@jidanni.org> X-Gnu-PR-Message: they-closed 27631 X-Gnu-PR-Package: emacs Reply-To: 27631@debbugs.gnu.org Date: Sun, 30 Jul 2017 02:21:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1501381262-8042-1" This is a multi-part message in MIME format... ------------=_1501381262-8042-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #27631: dired a/*/b which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 27631@debbugs.gnu.org. --=20 27631: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D27631 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1501381262-8042-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 27631-done) by debbugs.gnu.org; 30 Jul 2017 02:20:37 +0000 Received: from localhost ([127.0.0.1]:33502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbdqP-00024r-BS for submit@debbugs.gnu.org; Sat, 29 Jul 2017 22:20:37 -0400 Received: from mail-pg0-f42.google.com ([74.125.83.42]:34067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbdqN-00024e-QJ for 27631-done@debbugs.gnu.org; Sat, 29 Jul 2017 22:20:36 -0400 Received: by mail-pg0-f42.google.com with SMTP id u185so19359028pgb.1 for <27631-done@debbugs.gnu.org>; Sat, 29 Jul 2017 19:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=UYgz1HYT37tUOyPyvA47HXF+6uwvCjfLHskVu4kUmys=; b=am0ZeiXhXxOnPwwtEpV+RoSwqBHzHSsRGLOB7enn9470QZaiwsNVddoaXo3mi2jC3D VYaYeJii3ka4TScy3PpkaHW8kxM8OVwfmbFPBoQZ6xVKFUhOsjM0Ca8wGIm+5Y1ujm2p PBKhRLBieSlrZELwmRAtQPrMqeMfjuftwxkcc2Q0tepqtHYiOlZisAk+ZH7DnMVDVI26 15+TJSZzzS8V+cUNpd2tEgI9Js4d75z77bdb/2xqxG3/F7nYM8/M7qqAvMBgC32SuQhw u0yccFW8dzNndKFv3j9D4Dc6smuuaMPh/Tyde2BlsvbN5nPv+VToagxQkc227Gbu3pcl AtwA== 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:references:date:in-reply-to :message-id:user-agent:mime-version; bh=UYgz1HYT37tUOyPyvA47HXF+6uwvCjfLHskVu4kUmys=; b=aJjh+cGbhzdlp/9ANUdgtwhRw3S8q9/KG6qdjBESCfUFpDs/+IyJZ17wWx8qSmhl7z KwW+cJk9I8mZjLxSTFF7P7ii4zOXXb18atShzbh0kw/O314pRDm04yAyGLHYQeuwkvsF LE7ruxvJcC8IJ+2nlMj0QIgJe+YB93nPs8YNBmPlnVr6jlfNQ1jX2oY+ROdW5X3LemCO USHst43GqVzlbgfAy3BXu4BneFE6rUpu6hOiflrBTxLu49zNBu0jleYXn8oy/s36fmJD vHloMFS9V3mSc2dv8GdmNBKvnOGHxkkrvYnVgZ3dlJaVqQS1lh7PGFtlBn+dJqPyn/oe 6Mhg== X-Gm-Message-State: AIVw111jmcwEXGJjk9jKMZshtp8btG97KGC8c8WQEHfpdwdQi41jUCdp M8YSz5sAT6HH+kOX X-Received: by 10.84.215.130 with SMTP id l2mr12475890pli.116.1501381229544; Sat, 29 Jul 2017 19:20:29 -0700 (PDT) Received: from calancha-pc ([240f:6e:fb29:1:9ee6:2511:da80:1c7e]) by smtp.gmail.com with ESMTPSA id g79sm46307260pfd.163.2017.07.29.19.20.27 for <27631-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 29 Jul 2017 19:20:28 -0700 (PDT) From: Tino Calancha To: 27631-done@debbugs.gnu.org Subject: Re: bug#27631: dired a/*/b References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> <87d18nk5tq.fsf@detlef> <877eyt2e6b.fsf@calancha-pc> <877eys6a9w.fsf@detlef> <87pocj3rmc.fsf@detlef> Date: Sun, 30 Jul 2017 11:20:22 +0900 In-Reply-To: <87pocj3rmc.fsf@detlef> (Michael Albinus's message of "Sat, 29 Jul 2017 22:39:07 +0200") Message-ID: <87tw1u64yh.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27631-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Michael Albinus writes: >> I have tested it running tramp in a remote machine and it seems to work. >> What do you think? > > I made a short test, works for remote directories. Likely, I'll add a > test to tramp-tests.el next days, in order to let it run for a variety > of other Tramp methods, like adb, gdrive and smb. Sounds great. > You might push it to master. I've pushed into master as commit 6f6639d6ed6c6314b2643f6c22498fc2e23d34c7 Thank you very much. ------------=_1501381262-8042-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Jul 2017 18:43:14 +0000 Received: from localhost ([127.0.0.1]:59145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUHAn-0007fg-TG for submit@debbugs.gnu.org; Sun, 09 Jul 2017 14:43:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUHAm-0007fT-FP for submit@debbugs.gnu.org; Sun, 09 Jul 2017 14:43:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUHAg-0007aa-NQ for submit@debbugs.gnu.org; Sun, 09 Jul 2017 14:43:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,TVD_SPACE_RATIO, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45447) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dUHAg-0007aW-KC for submit@debbugs.gnu.org; Sun, 09 Jul 2017 14:43:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUHAf-0001g9-L5 for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 14:43:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUHAc-0007YT-Jt for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 14:43:05 -0400 Received: from homie.mail.dreamhost.com ([208.97.132.208]:45295 helo=homiemail-a8.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dUHAc-0007QM-AC for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 14:43:02 -0400 Received: from homiemail-a8.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a8.g.dreamhost.com (Postfix) with ESMTP id C0D585F2065 for ; Sun, 9 Jul 2017 11:42:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=69YEbaVGoKAt1cads/K4S9fw+Ro=; b=JdNnRqSq45fTTgGu svENENW4eM1nFXHz0XR2KUua1DndcxB0L+P3RLUC0xN+DmIuwY0S5QTF9z4FIi5R 3YqPLPF9YEQ/pou2iIx7P3pygPqPe2jcvGJuU6kfI7fJAHIS07XbfCXF68yTwnqU UCvqj1DXDzNPmFOaJahWS/WVFz8= Received: from jidanni.org (220-140-8-133.dynamic-ip.hinet.net [220.140.8.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a8.g.dreamhost.com (Postfix) with ESMTPSA id 813B95F205C for ; Sun, 9 Jul 2017 11:42:56 -0700 (PDT) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: bug-gnu-emacs Subject: dired a/*/b Date: Mon, 10 Jul 2017 02:42:53 +0800 Message-ID: <87o9sth2oi.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Maybe make dired and list-directory deal with wildcards in positions like ~/.config/chromium/Default/*/menkifleemblimdogmoihpfopnplikde/ ------------=_1501381262-8042-1-- From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jul 2017 11:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: Eli Zaretskii , 27631@debbugs.gnu.org Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150141321123915 (code B ref 27631); Sun, 30 Jul 2017 11:14:02 +0000 Received: (at 27631) by debbugs.gnu.org; 30 Jul 2017 11:13:31 +0000 Received: from localhost ([127.0.0.1]:33654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbmA6-0006De-TG for submit@debbugs.gnu.org; Sun, 30 Jul 2017 07:13:31 -0400 Received: from mout.gmx.net ([212.227.17.22]:53894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbmA5-0006DM-0m for 27631@debbugs.gnu.org; Sun, 30 Jul 2017 07:13:29 -0400 Received: from detlef.gmx.de ([212.91.238.205]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LqQTl-1e68xd0Xjd-00e75H; Sun, 30 Jul 2017 13:13:20 +0200 From: Michael Albinus References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> <83y3rrfm26.fsf@gnu.org> <87fudkv91l.fsf@calancha-pc> <87d18nk5tq.fsf@detlef> <877eyt2e6b.fsf@calancha-pc> <877eys6a9w.fsf@detlef> <87pocj3rmc.fsf@detlef> Date: Sun, 30 Jul 2017 13:13:18 +0200 In-Reply-To: <87pocj3rmc.fsf@detlef> (Michael Albinus's message of "Sat, 29 Jul 2017 22:39:07 +0200") Message-ID: <87lgn6b2k1.fsf@detlef> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:iPtlYmrhu1qqKIHXT8dJKFtryJlQHB4JT+l9MkM+s5Olz8dy7fN 0NORAfzvwZYz9On1K0M55a2+30V79u+GLRC1LoL5vkvkX4phv1uoMcr2JDHJK/VlO2jjX1x eE+PFlNahzoRPFI8o1Hp5vTx8Jh3zi0owZ4pkcY07TCALLRn+k8Y3Tmi6UAoelbiRSwkNg+ cNXUVqYlitB+ewfucHFGQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:akv67IDH1Fw=:PErI0Ego2bfb4Jizbuj9PY Quck6HX2/K3T2oXK+w6dPLUEFsoGzqjwWu/d44hyOFNn2yGszd99ePYorpRqo5Yo1OQo4IQnX IF7Ua4hNw4vxPPDf70Zohbp4luhGKpKwCmpxPepRxlj0zTcL/uXVE9/iEJcDGxVTuTrTJ5aGb XEG2X4pa3caVdefP28EBUSPt5GcYoT9D18kipMsLK9bOfZJlLveZ67Vjgq5LYh8VQxABkvbea BA4aYEtVBKOoIkvei3LZxSjajX8R2K9ubwU+vCReaGsaDwg8JlFWENd120PF2uGoSnN+L6RUi AJA7AsjdaRc2P15oaxAhtFdqThZfiBECFyWBWvHzfaAk9atJ/YMU6xgUj4W3FM7Q7cmFt8dGF V5NoV6XhK42kLm8eFp1zbbyBz/UOD4aWhZ+539g3nUaiDLlzSMIexdozb8/Gr2NHDSjUDKhfH p8A+/zfagwPWotOa56xpEgs2yJpH/a5lb+bGOEUB3zrs2Yd9H/r9XjbzAKXV6cdp7levjugrl xo6D1zHeITtkovdEQ3bJ9Ci0Rwe5X7srdLeVJz2XcgrPJTMfot++YN4mxwf2shHy+NEmz6DrZ tsgGsh1LeGWgqcCG0rE+T+gcddK1GnEZ9NrCLzYUDSBb/N6+RHEC/2aexhq0gU5J0Bb9TnmbZ 8wU5yE0wAFKlPcmGMRKzPGb0DvfQyknnusi1SHTP142tlE2CqCE0Z+ghdqWZtCUGEhp4xDxmj NBy4V5r6487RgSnEF5lSaKOFRMRS4TJyfcWzjnjFv1coqt0wBoUNpDM5sIN2cVv6OgYwMiwE1 eFRT1WOC+39As79Gx+W7Fbde667Pp0ZTvTrukiQdDlM2i7e8Ao= X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) Michael Albinus writes: Hi Tino, > I made a short test, works for remote directories. Likely, I'll add a > test to tramp-tests.el next days, in order to let it run for a variety > of other Tramp methods, like adb, gdrive and smb. See tramp-test17-dired-with-wildcards. Best regards, Michael. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Aug 2017 17:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27631@debbugs.gnu.org, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150169504713379 (code B ref 27631); Wed, 02 Aug 2017 17:31:01 +0000 Received: (at 27631) by debbugs.gnu.org; 2 Aug 2017 17:30:47 +0000 Received: from localhost ([127.0.0.1]:38655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcxTq-0003TD-VJ for submit@debbugs.gnu.org; Wed, 02 Aug 2017 13:30:47 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:54143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcxTn-0003PQ-TC for 27631@debbugs.gnu.org; Wed, 02 Aug 2017 13:30:45 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v72HUfRP018640; Wed, 2 Aug 2017 13:30:42 -0400 Received: by ceviche.home (Postfix, from userid 20848) id BA21866142; Wed, 2 Aug 2017 13:30:40 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87o9sth2oi.fsf@jidanni.org> <8737a0yjbg.fsf@calancha-pc> Date: Wed, 02 Aug 2017 13:30:40 -0400 In-Reply-To: <8737a0yjbg.fsf@calancha-pc> (Tino Calancha's message of "Thu, 13 Jul 2017 14:52:51 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6085=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6085> : inlines <6005> : streams <1756873> : uri <2475005> X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> Maybe make dired and list-directory deal with wildcards in positions like >> ~/.config/chromium/Default/*/menkifleemblimdogmoihpfopnplikde/ > Thank you for the report. > IMO, this is a nice thing to have. > It must be possible to extend the current code so that > dired might handle wildcards in the directory part. I'm not sure the recent patch for this fix is the right approach. The old code already used the shell to do the wildcard expansion, so why not just adjust the old code. Here's some starting patch. Stefan diff --git a/lisp/dired.el b/lisp/dired.el index 24759c6c9b..29755712cf 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1089,25 +1038,31 @@ dired-readin (defun dired-readin-insert () ;; Insert listing for the specified dir (and maybe file list) ;; already in dired-directory, assuming a clean buffer. - (let (dir file-list) - (if (consp dired-directory) - (setq dir (car dired-directory) - file-list (cdr dired-directory)) - (setq dir dired-directory - file-list nil)) - (setq dir (expand-file-name dir)) + (let* ((dir (expand-file-name + (if (consp dired-directory) + (car dired-directory) + dired-directory))) + (file-list (cdr-safe dired-directory)) + (wildcard (not file-list))) + (unless (file-directory-p dir) + (unless file-list (setq file-list '(""))) + (while (not (file-directory-p dir)) + (setq dir (directory-file-name dir)) + (let ((n (file-name-nondirectory dir))) + (setq file-list (mapcar (lambda (f) (concat n "/" f)) file-list))) + (setq dir (file-name-directory dir))) + (setq default-directory dir)) (if (and (equal "" (file-name-nondirectory dir)) (not file-list)) ;; If we are reading a whole single directory... (dired-insert-directory dir dired-actual-switches nil nil t) - (if (and (not (insert-directory-wildcard-in-dir-p dir)) - (not (file-readable-p - (directory-file-name (file-name-directory dir))))) - (error "Directory %s inaccessible or nonexistent" dir)) - ;; Else treat it as a wildcard spec - ;; unless we have an explicit list of files. - (dired-insert-directory dir dired-actual-switches - file-list (not file-list) t)))) + (if (not (file-readable-p + (directory-file-name (file-name-directory dir)))) + (error "Directory %s inaccessible or nonexistent" dir) + ;; Else treat it as a wildcard spec + ;; unless we have an explicit list of files. + (dired-insert-directory dir dired-actual-switches + file-list wildcard t))))) (defun dired-align-file (beg end) "Align the fields of a file to the ones of surrounding lines. @@ -1252,56 +1207,29 @@ dired-insert-directory ;; as indicated by `ls-lisp-use-insert-directory-program'. (not (and (featurep 'ls-lisp) (null ls-lisp-use-insert-directory-program))) - (not (and (featurep 'eshell) - (bound-and-true-p eshell-ls-use-in-dired))) - (or (file-remote-p dir) - (if (eq dired-use-ls-dired 'unspecified) + (or (if (eq dired-use-ls-dired 'unspecified) ;; Check whether "ls --dired" gives exit code 0, and ;; save the answer in `dired-use-ls-dired'. (or (setq dired-use-ls-dired (eq 0 (call-process insert-directory-program - nil nil nil "--dired"))) + nil nil nil "--dired"))) (progn (message "ls does not support --dired; \ see `dired-use-ls-dired' for more details.") nil)) - dired-use-ls-dired))) + dired-use-ls-dired) + (file-remote-p dir))) (setq switches (concat "--dired " switches))) - ;; Expand directory wildcards and fill file-list. - (let ((dir-wildcard (insert-directory-wildcard-in-dir-p dir))) - (cond (dir-wildcard - (setq switches (concat "-d " switches)) - ;; We don't know whether the remote ls supports - ;; "--dired", so we cannot add it to the `process-file' - ;; call for wildcards. - (when (file-remote-p dir) - (setq switches (dired-replace-in-string "--dired" "" switches))) - (let* ((default-directory (car dir-wildcard)) - (script (format "ls %s %s" switches (cdr dir-wildcard))) - (remotep (file-remote-p dir)) - (sh (or (and remotep "/bin/sh") - (and (bound-and-true-p explicit-shell-file-name) - (executable-find explicit-shell-file-name)) - (executable-find "sh"))) - (switch (if remotep "-c" shell-command-switch))) - (unless - (zerop - (process-file sh nil (current-buffer) nil switch script)) - (user-error - "%s: No files matching wildcard" (cdr dir-wildcard))) - (insert-directory-clean (point) switches))) - (t - ;; We used to specify the C locale here, to force English - ;; month names; but this should not be necessary any - ;; more, with the new value of - ;; `directory-listing-before-filename-regexp'. - (if file-list - (dolist (f file-list) - (let ((beg (point))) - (insert-directory f switches nil nil) - ;; Re-align fields, if necessary. - (dired-align-file beg (point)))) - (insert-directory dir switches wildcard (not wildcard)))))) + ;; We used to specify the C locale here, to force English month names; + ;; but this should not be necessary any more, + ;; with the new value of `directory-listing-before-filename-regexp'. + (if file-list + (dolist (f file-list) + (let ((beg (point))) + (insert-directory f switches wildcard nil) + ;; Re-align fields, if necessary. + (dired-align-file beg (point)))) + (insert-directory dir switches wildcard (not wildcard))) ;; Quote certain characters, unless ls quoted them for us. (if (not (dired-switches-escape-p dired-actual-switches)) (save-excursion diff --git a/lisp/files.el b/lisp/files.el index 96647fb262..1f69391d51 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6683,19 +6608,15 @@ insert-directory default-file-name-coding-system)))) (setq result (if wildcard - ;; If the wildcard is just in the file part, then run ls in - ;; the directory part of the file pattern using the last - ;; component as argument. Otherwise, run ls in the longest - ;; subdirectory of the directory part free of wildcards; use - ;; the remaining of the file pattern as argument. - (let* ((dir-wildcard (insert-directory-wildcard-in-dir-p file)) - (default-directory - (cond (dir-wildcard (car dir-wildcard)) - (t - (if (file-name-absolute-p file) - (file-name-directory file) - (file-name-directory (expand-file-name file)))))) - (pattern (if dir-wildcard (cdr dir-wildcard) (file-name-nondirectory file)))) + ;; Run ls in the directory part of the file pattern + ;; using the last component as argument. + (let ((default-directory + (if (file-name-absolute-p file) + (file-name-directory file) + default-directory)) + (pattern (if (file-name-absolute-p file) + (file-name-nondirectory file) + file))) ;; NB since switches is passed to the shell, be ;; careful of malicious values, eg "-l;reboot". ;; See eg dired-safe-switches-p. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Aug 2017 17:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 27631@debbugs.gnu.org, jidanni@jidanni.org, tino.calancha@gmail.com Reply-To: Eli Zaretskii Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150169618519627 (code B ref 27631); Wed, 02 Aug 2017 17:50:01 +0000 Received: (at 27631) by debbugs.gnu.org; 2 Aug 2017 17:49:45 +0000 Received: from localhost ([127.0.0.1]:38712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcxmD-00056V-Jq for submit@debbugs.gnu.org; Wed, 02 Aug 2017 13:49:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcxmC-00056I-2M for 27631@debbugs.gnu.org; Wed, 02 Aug 2017 13:49:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcxm5-0000lq-Uq for 27631@debbugs.gnu.org; Wed, 02 Aug 2017 13:49:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcxm0-0000jX-Ez; Wed, 02 Aug 2017 13:49:32 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2017 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dcxlz-0006FH-JQ; Wed, 02 Aug 2017 13:49:32 -0400 Date: Wed, 02 Aug 2017 20:49:13 +0300 Message-Id: <83bmnxzwpy.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Stefan Monnier on Wed, 02 Aug 2017 13:30:40 -0400) References: <87o9sth2oi.fsf@jidanni.org> <8737a0yjbg.fsf@calancha-pc> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Stefan Monnier > Date: Wed, 02 Aug 2017 13:30:40 -0400 > Cc: 27631@debbugs.gnu.org, > 積丹尼 Dan Jacobson > > The old code already used the shell to do the wildcard expansion, so why > not just adjust the old code. I'm not sure I understand what you mean by "used the shell to do the wildcard expansion", but if you actually mean to let the shell do that, it's unportable to non-Posix shells. From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Aug 2017 01:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 27631@debbugs.gnu.org, jidanni@jidanni.org, tino.calancha@gmail.com Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150172353116853 (code B ref 27631); Thu, 03 Aug 2017 01:26:02 +0000 Received: (at 27631) by debbugs.gnu.org; 3 Aug 2017 01:25:31 +0000 Received: from localhost ([127.0.0.1]:39151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dd4tH-0004Nl-GF for submit@debbugs.gnu.org; Wed, 02 Aug 2017 21:25:31 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:47415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dd4tF-0004Nc-B4 for 27631@debbugs.gnu.org; Wed, 02 Aug 2017 21:25:30 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v731PP5K004744; Wed, 2 Aug 2017 21:25:26 -0400 Received: by ceviche.home (Postfix, from userid 20848) id AF11A66142; Wed, 2 Aug 2017 21:25:25 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87o9sth2oi.fsf@jidanni.org> <8737a0yjbg.fsf@calancha-pc> <83bmnxzwpy.fsf@gnu.org> Date: Wed, 02 Aug 2017 21:25:25 -0400 In-Reply-To: <83bmnxzwpy.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 02 Aug 2017 20:49:13 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6085=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6085> : inlines <6005> : streams <1756920> : uri <2475235> X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> The old code already used the shell to do the wildcard expansion, so why >> not just adjust the old code. > I'm not sure I understand what you mean by "used the shell to do the > wildcard expansion", Just what you think it means: if you requested M-x dired RET ~/foo/* RET it called "ls --dired -al *" from directory ~/foo. My patch just changes the code so that M-x dired RET ~/foo/*/bar RET is turned into "ls --dired -al */bar" from directory ~/foo. > but if you actually mean to let the shell do that, it's unportable to > non-Posix shells. I know. That's why ls-lisp advises the corresponding function. Stefan From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Aug 2017 04:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 27631@debbugs.gnu.org, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson , Michael Albinus , Eli Zaretskii , Tino Calancha Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.1501735129929 (code B ref 27631); Thu, 03 Aug 2017 04:39:01 +0000 Received: (at 27631) by debbugs.gnu.org; 3 Aug 2017 04:38:49 +0000 Received: from localhost ([127.0.0.1]:39214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dd7uL-0000Eu-KP for submit@debbugs.gnu.org; Thu, 03 Aug 2017 00:38:49 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:38464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dd7uJ-0000Eh-JF for 27631@debbugs.gnu.org; Thu, 03 Aug 2017 00:38:47 -0400 Received: by mail-pf0-f194.google.com with SMTP id e3so401577pfc.5 for <27631@debbugs.gnu.org>; Wed, 02 Aug 2017 21:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=/ZfC49Y3pdMe7h6m5KCaARyQcW5cq/O4OELEnCE+JkA=; b=Hveb8Fk0AZu4xM9QridFtG6gEOSyKpEi8/EmgJkia+KOWsPXlhgigxsqv7vRASR6KR uUjkhapMgliqewaEF125ErSsOlC56gKKUc2nowG29mT+MFlKmJA1Mi1VthIaSZMrTIEG Ir8FMiwgeqYe4Jm1atrRQBAwNBsN8EHqQuUbg8VDb+WrdGQnxaVXBW668dRl2trCJcLF 7EzkUHvS0sxlEk8l0BUthE2+YnVCVXcKsgJhwF82VRhv+IhfKkFs/1EvwAPyqVMZiGXO l3hT3vur5SJQGJ82rXeiIYcpOSumEPyvwxTy5+niXRh4lyZUCgdna+eP7CcgbRKnr4Gn 8A9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=/ZfC49Y3pdMe7h6m5KCaARyQcW5cq/O4OELEnCE+JkA=; b=rZO1fQ8d5wu2bCoORyUtGDOY06mQDSIy4Zz9CpQtW1G1oaVSVJiPH5oaNyU+4Ettnw tBwYl2b8T8W6ppCXNVJY13bIp8HDYgheMTh12cCVCdY+eHIngVxXzr90n5sTSJ/8vD6x Qg4OXqbwWR+7JFFwCUK4/N1wejUHfyR1k7Xi/nvrzG0aO6UwrCvf0RudsoQzMQJ5y1od nBoSC2+E8wbbvsh+lItAojZKG4s0nOdRs/prbQty4hxE88mkUxmMRco3dPBEF7LmTO/A 31VVMnE6cmT6Q5FnCViRcUDvpNqvRA18UGxWbQwTgY/rFJ2xOc0DOqd4N8cSyg04HhAM 47cw== X-Gm-Message-State: AIVw112ES/690gvgePhanBvPjfBIY3+L1sIbXE/8UhUrcu/oXXaI5Ez+ 2mng6dHI3HV36w== X-Received: by 10.84.232.15 with SMTP id h15mr437708plk.189.1501735121506; Wed, 02 Aug 2017 21:38:41 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id a16sm44395577pfe.161.2017.08.02.21.38.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Aug 2017 21:38:40 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Thu, 3 Aug 2017 13:38:37 +0900 (JST) X-X-Sender: calancha@calancha-pc In-Reply-To: Message-ID: References: <87o9sth2oi.fsf@jidanni.org> <8737a0yjbg.fsf@calancha-pc> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On Wed, 2 Aug 2017, Stefan Monnier wrote: >>> Maybe make dired and list-directory deal with wildcards in positions like >>> ~/.config/chromium/Default/*/menkifleemblimdogmoihpfopnplikde/ >> Thank you for the report. >> IMO, this is a nice thing to have. >> It must be possible to extend the current code so that >> dired might handle wildcards in the directory part. > > I'm not sure the recent patch for this fix is the right approach. > The old code already used the shell to do the wildcard expansion, so why > not just adjust the old code. > > Here's some starting patch. Thank you for the patch. Part of the complexity of the original patch is to provide this new feature in _tramp_ connections as well; your patch does the thing well (see patch below) in the local machine but it fails in remote ones. --8<-----------------------------cut here---------------start------------->8--- commit 21f02469bf5ef3733e3705e9836a7d91f625ce11 Author: Tino Calancha Date: Thu Aug 3 13:20:40 2017 +0900 Apply some minor tweaks diff --git a/lisp/dired.el b/lisp/dired.el index 211b622fd9..7862d0405c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1100,7 +1100,7 @@ dired-readin-insert (while (not (file-directory-p dir)) (setq dir (directory-file-name dir)) (let ((n (file-name-nondirectory dir))) - (setq file-list (mapcar (lambda (f) (concat n "/" f)) file-list))) + (setq file-list (mapcar (lambda (f) (concat n (and (not (string= "" f)) "/") f)) file-list))) (setq dir (file-name-directory dir))) (setq default-directory dir)) (if (and (equal "" (file-name-nondirectory dir)) @@ -1258,6 +1258,8 @@ dired-insert-directory ;; as indicated by `ls-lisp-use-insert-directory-program'. (not (and (featurep 'ls-lisp) (null ls-lisp-use-insert-directory-program))) + (not (and (featurep 'eshell) + (bound-and-true-p eshell-ls-use-in-dired))) (or (if (eq dired-use-ls-dired 'unspecified) ;; Check whether "ls --dired" gives exit code 0, and ;; save the answer in `dired-use-ls-dired'. @@ -1335,9 +1337,7 @@ dired-insert-directory (setq content-point (point))) (when wildcard ;; Insert "wildcard" line where "total" line would be for a full dir. - (insert " wildcard " (or (cdr-safe (insert-directory-wildcard-in-dir-p dir)) - (file-name-nondirectory dir)) - "\n"))) + (insert " wildcard " (car-safe file-list) "\n"))) (dired-insert-set-properties content-point (point))))) (defun dired-insert-set-properties (beg end) --8<-----------------------------cut here---------------end--------------->8--- From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Aug 2017 15:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 27631@debbugs.gnu.org, Michael Albinus , Eli Zaretskii , =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.15017753409302 (code B ref 27631); Thu, 03 Aug 2017 15:49:01 +0000 Received: (at 27631) by debbugs.gnu.org; 3 Aug 2017 15:49:00 +0000 Received: from localhost ([127.0.0.1]:40175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddIMu-0002Py-FR for submit@debbugs.gnu.org; Thu, 03 Aug 2017 11:49:00 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:49537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddIMs-0002Pp-GV for 27631@debbugs.gnu.org; Thu, 03 Aug 2017 11:48:59 -0400 Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v73FmuCr002996; Thu, 3 Aug 2017 11:48:56 -0400 Received: by lechazo.home (Postfix, from userid 20848) id 9A59560270; Thu, 3 Aug 2017 11:48:54 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87o9sth2oi.fsf@jidanni.org> <8737a0yjbg.fsf@calancha-pc> Date: Thu, 03 Aug 2017 11:48:54 -0400 In-Reply-To: (Tino Calancha's message of "Thu, 3 Aug 2017 13:38:37 +0900 (JST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6086=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6086> : inlines <6006> : streams <1757004> : uri <2475609> X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) > Part of the complexity of the original patch is to provide this new > feature in _tramp_ connections as well; your patch does the thing > well (see patch below) in the local machine but it fails in remote ones. I didn't adjust the Tramp code accordingly, indeed. My patch probably also fails for ls-lisp (aka Windows). Both of those will need corresponding adjustments. My point is that it seems like we can get the same end-result without changing the structure. > @@ -1100,7 +1100,7 @@ dired-readin-insert > (while (not (file-directory-p dir)) > (setq dir (directory-file-name dir)) > (let ((n (file-name-nondirectory dir))) > - (setq file-list (mapcar (lambda (f) (concat n "/" f)) file-list))) > + (setq file-list (mapcar (lambda (f) (concat n (and (not (string= "" f)) "/") f)) file-list))) > (setq dir (file-name-directory dir))) > (setq default-directory dir)) > (if (and (equal "" (file-name-nondirectory dir)) `n` represents a directory name, so isn't it OK to have "/" rather than ""? Or is the above tweak purely cosmetic? > @@ -1335,9 +1337,7 @@ dired-insert-directory > (setq content-point (point))) > (when wildcard > ;; Insert "wildcard" line where "total" line would be for a full dir. > - (insert " wildcard " (or (cdr-safe (insert-directory-wildcard-in-dir-p dir)) > - (file-name-nondirectory dir)) > - "\n"))) > + (insert " wildcard " (car-safe file-list) "\n"))) > (dired-insert-set-properties content-point (point))))) Yes, my patch needs a bunch more cleanups: it was a quick hack job, just to confirm my intuition. Stefan From unknown Sat Jun 21 10:45:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27631: dired a/*/b Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 05:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 27631@debbugs.gnu.org, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson , Michael Albinus , Eli Zaretskii , Tino Calancha Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.150182356515532 (code B ref 27631); Fri, 04 Aug 2017 05:13:02 +0000 Received: (at 27631) by debbugs.gnu.org; 4 Aug 2017 05:12:45 +0000 Received: from localhost ([127.0.0.1]:40683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddUuj-00042S-77 for submit@debbugs.gnu.org; Fri, 04 Aug 2017 01:12:45 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddUuh-00042C-HO for 27631@debbugs.gnu.org; Fri, 04 Aug 2017 01:12:43 -0400 Received: by mail-pf0-f195.google.com with SMTP id c65so805721pfl.0 for <27631@debbugs.gnu.org>; Thu, 03 Aug 2017 22:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=lmF3Le4BZogelay6sjxNh7wNrqJu1dN7oJWLXTH6sDM=; b=d24J9lN97aII/tCnhlda+3irQ2Id0bShfJv1lufooaGO4sGsIYbhS12q9W3Hcr7Lps tvEVd92zevwPZcPXasjyxiwIwhRNlEl2PbR+2xVNOVUggLOYrLHgdU/hxsDj0o3OQX5z yqJaoMSRgDMYYMpVX43lOnoaaQW1Cbi5k3XTbScCXKNXWuBh4/zCGxATbweDnEOx46au dCzwfI2XgQbxgP3b36Ayd9KMSlpZ+YD1M34H6cRvYJT4OnCNvYyCfiZwR+NQORf42cT9 2rPMsNOslvt8i+37idzw3jWOmA/UOWCIvTGB5vtBtirwhFeVxfeNH8Qejk9lEb9e3D0W Y9iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=lmF3Le4BZogelay6sjxNh7wNrqJu1dN7oJWLXTH6sDM=; b=C4XrhyTwHrdfBDjJbxhNjf4A9UILN790Av+OOymn8Q0Aw0NAggn2/2YJ+qGUudsafK Sagv0QHLdFlNb34R+brvoiJ0ltEN1C2dRqTWiwi3Pd6isBLGhyuC24K7s2pYxEeUJ7aA JcPTQcvCa491Pwu8X6pftF8cPRJjxEnGA4N6LkqxRuBSyUG6hv+sk4nWKRyApnAe1kp5 ZfNsfO5xCbk1479w2It08xQRlXSvaoLU2rNMWpWI6pkGB29PMHGnePQaB+rGp06k1qYs HeXsBJ6+r1BMbTMkuxt3oOYL7GZriFwDqtQC5DETwm9VFfp0H4Cnk5Z2hiG1/k2O/+8B QGOg== X-Gm-Message-State: AIVw113hCZIIJXW13PMecjSdS2j09XlAKqnDuWah7xSvId7Hpg/cEEEQ 8GZppxl3cBqk1A== X-Received: by 10.99.189.10 with SMTP id a10mr1095715pgf.271.1501823557768; Thu, 03 Aug 2017 22:12:37 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id y2sm880251pfy.119.2017.08.03.22.12.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 22:12:36 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 4 Aug 2017 14:12:32 +0900 (JST) X-X-Sender: calancha@calancha-pc In-Reply-To: Message-ID: References: <87o9sth2oi.fsf@jidanni.org> <8737a0yjbg.fsf@calancha-pc> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On Thu, 3 Aug 2017, Stefan Monnier wrote: >> Part of the complexity of the original patch is to provide this new >> feature in _tramp_ connections as well; your patch does the thing >> well (see patch below) in the local machine but it fails in remote ones. > > I didn't adjust the Tramp code accordingly, indeed. My patch probably > also fails for ls-lisp (aka Windows). Both of those will need > corresponding adjustments. > My point is that it seems like we can get the same end-result without > changing the structure. Maybe that's the reason why this feature didn't exit before: people found it wasn't straight to implemented it for everything: local and remote connections, external or emulated 'ls'. Now we have it, but you are very welcome to rewrite it so that it fits in the original structure. I am volunteer to be the patch tester! >> @@ -1100,7 +1100,7 @@ dired-readin-insert >> (while (not (file-directory-p dir)) >> (setq dir (directory-file-name dir)) >> (let ((n (file-name-nondirectory dir))) >> - (setq file-list (mapcar (lambda (f) (concat n "/" f)) file-list))) >> + (setq file-list (mapcar (lambda (f) (concat n (and (not (string= "" f)) "/") f)) file-list))) >> (setq dir (file-name-directory dir))) >> (setq default-directory dir)) >> (if (and (equal "" (file-name-nondirectory dir)) > > `n` represents a directory name, so isn't it OK to have "/" rather > than ""? Or is the above tweak purely cosmetic? No cosmetic, i need it, otherwise i get an error if i eval the form: (dired (expand-file-name "lisp/*.el" source-directory)) Debugger entered--Lisp error: (file-missing "Reading directory" "No such file or directory" "*.el/") access-file("*.el/" "Reading directory") insert-directory("*.el/" "--dired -al" t nil) dired-insert-directory("/home/calancha/soft/emacs-master/lisp/" "-al" ("*.el/") t t) dired-readin-insert() dired-readin() dired-internal-noselect("~/soft/emacs-master/lisp/*.el" nil) dired-noselect("/home/calancha/soft/emacs-master/lisp/*.el" nil) dired("/home/calancha/soft/emacs-master/lisp/*.el") eval((dired (expand-file-name "lisp/*.el" source-directory)) nil) elisp--eval-last-sexp(nil) eval-last-sexp(nil) funcall-interactively(eval-last-sexp nil) call-interactively(eval-last-sexp nil nil) command-execute(eval-last-sexp)