From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: chad Newsgroups: gmane.emacs.bugs Subject: bug#55877: 29.0.50; list-directory doesn't allow globbing interactively Date: Thu, 9 Jun 2022 14:56:24 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="00000000000088bcb105e1086179" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7824"; mail-complaints-to="usenet@ciao.gmane.io" To: 55877@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 09 21:10:31 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nzNY7-0001qQ-3U for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 21:10:31 +0200 Original-Received: from localhost ([::1]:49384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzNY5-0007A7-Qx for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 15:10:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzNL4-0007b2-Ae for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 14:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53875) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzNL4-0001Ls-1f for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 14:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzNL4-0000We-0t for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 14:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: chad Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jun 2022 18:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55877 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16548010031992 (code B ref -1); Thu, 09 Jun 2022 18:57:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Jun 2022 18:56:43 +0000 Original-Received: from localhost ([127.0.0.1]:47772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzNKk-0000W4-Le for submit@debbugs.gnu.org; Thu, 09 Jun 2022 14:56:43 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:34908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzNKi-0000Vt-OP for submit@debbugs.gnu.org; Thu, 09 Jun 2022 14:56:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzNKi-00073t-Ew for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 14:56:40 -0400 Original-Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:41828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzNKg-0001Kk-D6 for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 14:56:40 -0400 Original-Received: by mail-lf1-x12d.google.com with SMTP id u26so38678577lfd.8 for ; Thu, 09 Jun 2022 11:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=M8mdEiw7bkeHG1bNejbNpe2FrNkpxhYytIqyuZewPxo=; b=Oi6zX4GpNKKk19Oqd0C0uTLe7BVn1Dowm0uot11TC7Z37BYJ+7BPmOQT12TjJfXNPm lIvuiPjb+GFD2v141GIv53n1eqyOfaEPAgfXWVpDdqHDT58CXpVmy1ZoawMq7peMYkID kHdTUiWhbBiLDH7woMga9qdr2j/U5c6C9fdBCyVYkX60vZz6ghBOZ/Lss45cYBGp0/rZ URvf8TnXkz57FLIqd7ijO/4vGI9ZMkVcEwS3tRXbiVs3hsU1042vMCpGTFCCOCMwEWFH Bv1S6iVZUDUa720AYOXULBaiWCyqTL/f+f9D9SHGjHWhvxNUNezYnypLXKTdRplI5JLS zwyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=M8mdEiw7bkeHG1bNejbNpe2FrNkpxhYytIqyuZewPxo=; b=PtctxCaad2SQBofmxmgg9tMcNFJG3ZsCZYykMlUb67NDz0kbMl9Y3hYxiJjxyGTRV0 zp5URtSskCzNCEgLvw2E8udGc1NgJWTq00T2oJ9rqJ7VpE6DB9XQuTga09HCHlMXEYis ihWprla4LZnsrtGOPhg44kFpV6qfUjj4tUU77oEgNkCCIMWGxF+X7aAIGEk0wQ/q3gX2 I7YzMhJiR4KLuPYpchNzyvt1ui19TUPYq2EYZcU3Xm/6eqFImdBlaptBxLSVPyFBsxBq fsb3lvGifaivnqfcMpw9r2NOkJIhHtM/XF5yHcqT1wmvGEzEkUYRBANXFZqoCtWzQBM9 KjFw== X-Gm-Message-State: AOAM533SgjtgPnVZnoSDkDVvpyfXuP5uZqC4oseNhnIjiaW4bA2Kfo5G s+kjx+e/gPc9nAH5G5w4D2qVSndf+b8nyrOAl9ZhUKPxVow= X-Google-Smtp-Source: ABdhPJzYOen4e2nWzBkVd+saPcj3HhAE7eTnzn1CJBYtVee79a2xFMZvTF6j4iCGIKxgJXczaeV6MCqpIyk+7GA5fXM= X-Received: by 2002:a05:6512:3f4:b0:478:ff65:7820 with SMTP id n20-20020a05651203f400b00478ff657820mr28254343lfq.367.1654800995880; Thu, 09 Jun 2022 11:56:35 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=yandros@gmail.com; helo=mail-lf1-x12d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:234156 Archived-At: --00000000000088bcb105e1086179 Content-Type: multipart/alternative; boundary="00000000000088bcaf05e1086177" --00000000000088bcaf05e1086177 Content-Type: text/plain; charset="UTF-8" >From emacs -Q, call list-directory ('C-x C-d'), and specify a glob pattern, such as "/usr/local/src/emacs/lisp/*.el". Emacs will accept this as the argument when called from lisp (following the behavior described in the docstring), but will not accept it interactively. This is due to passing t as the fourth (MUSTMATCH) argument to read-file-name inside list-directory. I believe that this should instead be 'confirm. I have tested the small attached patch for a couple weeks with no trouble. In case there is a problem with the attached patch via gmail, the change is around line 7385 of lisp/files.el: (list (read-file-name > (if pfx "List directory (verbose): " > "List directory (brief): ") > - nil default-directory t > + nil default-directory 'confirm > nil > (lambda (file) > (or (file-directory-p file) This is a tiny change, and also I have assigned copyright papers on file from past work on MH-e many moons ago, I believe under "yandros@mit.edu" (which has, sadly, moved to MS Exchange in the years since). Thanks, ~Chad In GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2022-06-09 built on penguin Repository revision: 0e401fa2670210c7a5c4424ef6ec6896fff7486e Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure --with-native-compilation --with-gnutls --without-xwidgets --without-pop' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_COLLATE: C value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: en_US.UTF-8 value of $LC_NUMERIC: en_US.UTF-8 value of $LC_TIME: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media rmc puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date seq gv subr-x byte-opt bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 56606 9544) (symbols 48 5724 0) (strings 32 16248 1701) (string-bytes 1 530792) (vectors 16 11364) (vector-slots 8 223293 17601) (floats 8 21 37) (intervals 56 234 3) (buffers 992 11)) --00000000000088bcaf05e1086177 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

From emacs -Q, call list-directory ('C-x C-d')= , and specify a glob
pattern, such as "/usr/local/src/emacs/lisp/*.= el". Emacs will accept
this as the argument when called from lisp (= following the behavior
described in the docstring), but will not accept = it interactively. This
is due to passing t as the fourth (MUSTMATCH) arg= ument to read-file-name
inside list-directory. I believe that this shoul= d instead be 'confirm. I
have tested the=C2=A0small attached patch f= or a couple weeks with no trouble.
In case there is a problem with the = attached patch via gmail, the=C2=A0
change is around line 7385 of= lisp/files.el:

=C2=A0 =C2=A0 =C2=A0 (list (read-file-name
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(if pfx "List directory (verbose): = "
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "List direc= tory (brief): ")
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 nil default-d= irectory t
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 nil default-directory &#= 39;confirm
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nil
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda (file)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(or (file-directory-p file)
This is a tiny change, and also I have assigned copyright papers = on
file from past work on MH-e many moons ago, I believe under
"= yandros@mit.edu" (which has, sa= dly, moved to MS Exchange in the years since).

Thanks,
~Chad
<= br>In GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.24= , cairo version 1.16.0)
=C2=A0of 2022-06-09 built on penguin
Reposito= ry revision: 0e401fa2670210c7a5c4424ef6ec6896fff7486e
Repository branch:= master
Windowing system distributor 'The X.Org Foundation', ver= sion 11.0.12008000
System Description: Debian GNU/Linux 11 (bullseye)
Configured using:
=C2=A0'configure --with-native-compilation --= with-gnutls --without-xwidgets
=C2=A0--without-pop'

Configure= d features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ J= PEG JSON
LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY I= NOTIFY
PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROL= L_BARS
X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
= =C2=A0 value of $LC_COLLATE: C
=C2=A0 value of $LC_CTYPE: en_US.UTF-8=C2=A0 value of $LC_MESSAGES: en_US.UTF-8
=C2=A0 value of $LC_NUMERIC: = en_US.UTF-8
=C2=A0 value of $LC_TIME: en_US.UTF-8
=C2=A0 value of $LA= NG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix

Major mod= e: Lisp Interaction

Minor modes in effect:
=C2=A0 tooltip-mode: t=
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode: t
=C2=A0 show-pare= n-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-sh= adow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t=
=C2=A0 blink-cursor-mode: t
=C2=A0 line-number-mode: t
=C2=A0 ind= ent-tabs-mode: t
=C2=A0 transient-mark-mode: t
=C2=A0 auto-compositio= n-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode= : t

Load-path shadows:
None found.

Features:
(shadow so= rt mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-lo= addefs rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-con= fig gnus-util text-property-search time-date seq gv
subr-x byte-opt byte= comp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231= mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc= 2045 ietf-drums mm-util mail-prsvr mail-utils
iso-transl tooltip eldoc p= aren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mw= heel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image r= egexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode p= rog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu tim= er select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-= colors frame minibuffer nadvice
simple cl-generic indonesian philippine = cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao = korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech euro= pean ethiopic indian
cyrillic chinese composite emoji-zwj charscript cha= rprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-= preloaded button
loaddefs faces cus-face macroexp files window text-prop= erties overlay
sha1 md5 base64 format env code-pages mule custom widget = keymap
hashtable-print-readable backquote threads dbusbind inotify
dy= namic-setting system-font-setting font-render-setting cairo
move-toolbar= gtk x-toolkit xinput2 x multi-tty make-network-process
native-compile e= macs)

Memory information:
((conses 16 56606 9544)
=C2=A0(symbo= ls 48 5724 0)
=C2=A0(strings 32 16248 1701)
=C2=A0(string-bytes 1 530= 792)
=C2=A0(vectors 16 11364)
=C2=A0(vector-slots 8 223293 17601)
= =C2=A0(floats 8 21 37)
=C2=A0(intervals 56 234 3)
=C2=A0(buffers 992 = 11))
--00000000000088bcaf05e1086177-- --00000000000088bcb105e1086179 Content-Type: application/octet-stream; name="0001-Tweak-list-directory.patch" Content-Disposition: attachment; filename="0001-Tweak-list-directory.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l47doqgc0 RnJvbSA5ZjZiZjNhNThkM2JjNTU4ZDFkMzgxMTFhMGY5YjY0NjBjYzg0NzE0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBDaGFkIEJyb3duIDx5YW5kcm9zQGdtYWlsLmNvbT4KRGF0ZTog TW9uLCAyMyBNYXkgMjAyMiAxNDo0OTozOCAtMDQwMApTdWJqZWN0OiBbUEFUQ0hdIFR3ZWFrIGxp c3QtZGlyZWN0b3J5IHRvIGFsbG93IGdsb2JiaW5nIG9uIGludGVyYWN0aXZlIHVzZS4KCi0tLQog bGlzcC9maWxlcy5lbCB8IDIgKy0KIDEgZmlsZSBjaGFuZ2VkLCAxIGluc2VydGlvbigrKSwgMSBk ZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL2xpc3AvZmlsZXMuZWwgYi9saXNwL2ZpbGVzLmVsCmlu ZGV4IGE1MDVmNjJhZjguLjAyNzdhNzZlNGMgMTAwNjQ0Ci0tLSBhL2xpc3AvZmlsZXMuZWwKKysr IGIvbGlzcC9maWxlcy5lbApAQCAtNzM4NSw3ICs3Mzg1LDcgQEAgbGlzdC1kaXJlY3RvcnkKICAg ICAgKGxpc3QgKHJlYWQtZmlsZS1uYW1lCiAgICAgICAgICAgICAoaWYgcGZ4ICJMaXN0IGRpcmVj dG9yeSAodmVyYm9zZSk6ICIKIAkgICAgICAiTGlzdCBkaXJlY3RvcnkgKGJyaWVmKTogIikKLQkg ICAgbmlsIGRlZmF1bHQtZGlyZWN0b3J5IHQKKwkgICAgbmlsIGRlZmF1bHQtZGlyZWN0b3J5ICdj b25maXJtCiAgICAgICAgICAgICBuaWwKICAgICAgICAgICAgIChsYW1iZGEgKGZpbGUpCiAgICAg ICAgICAgICAgIChvciAoZmlsZS1kaXJlY3RvcnktcCBmaWxlKQotLSAKMi4zMC4yCgo= --00000000000088bcb105e1086179--