From: chad <yandros@gmail.com>
To: 55877@debbugs.gnu.org
Subject: bug#55877: 29.0.50; list-directory doesn't allow globbing interactively
Date: Thu, 9 Jun 2022 14:56:24 -0400 [thread overview]
Message-ID: <CAO2hHWbWbT+Vta2Wcq5UzyoTE-4pMUnmJz00RYCm5vtMkkycpA@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 4358 bytes --]
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))
[-- Attachment #1.2: Type: text/html, Size: 5065 bytes --]
[-- Attachment #2: 0001-Tweak-list-directory.patch --]
[-- Type: application/octet-stream, Size: 734 bytes --]
From 9f6bf3a58d3bc558d1d38111a0f9b6460cc84714 Mon Sep 17 00:00:00 2001
From: Chad Brown <yandros@gmail.com>
Date: Mon, 23 May 2022 14:49:38 -0400
Subject: [PATCH] Tweak list-directory to allow globbing on interactive use.
---
lisp/files.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/files.el b/lisp/files.el
index a505f62af8..0277a76e4c 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -7385,7 +7385,7 @@ list-directory
(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)
--
2.30.2
next reply other threads:[~2022-06-09 18:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 18:56 chad [this message]
2022-06-09 19:20 ` bug#55877: 29.0.50; list-directory doesn't allow globbing interactively Drew Adams
2022-06-09 20:07 ` Lars Ingebrigtsen
2022-06-10 8:22 ` Lars Ingebrigtsen
2022-06-10 21:04 ` chad
2022-06-11 1:31 ` chad
2022-06-11 11:02 ` Lars Ingebrigtsen
2022-06-11 16:38 ` chad
2022-06-11 16:55 ` Eli Zaretskii
2022-06-11 17:03 ` chad
2022-06-11 17:05 ` Eli Zaretskii
2022-06-12 9:59 ` Lars Ingebrigtsen
2022-06-12 10:04 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAO2hHWbWbT+Vta2Wcq5UzyoTE-4pMUnmJz00RYCm5vtMkkycpA@mail.gmail.com \
--to=yandros@gmail.com \
--cc=55877@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.