GNU bug report logs - #25807
24.5; List-Directory closes with error when invalid path is typed instead of prompting the user to fix it

Previous Next

Package: emacs;

Reported by: Colin <my.old.email.sucked <at> gmail.com>

Date: Mon, 20 Feb 2017 06:38:02 UTC

Severity: normal

Found in version 24.5

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25807 in the body.
You can then email your comments to 25807 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25807; Package emacs. (Mon, 20 Feb 2017 06:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin <my.old.email.sucked <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 20 Feb 2017 06:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Colin <my.old.email.sucked <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; List-Directory closes with error when invalid path is typed
 instead of prompting the user to fix it
Date: Mon, 20 Feb 2017 17:20:10 +1100
[Message part 1 (text/plain, inline)]
If I hit `C-x C-d`, I receive the prompt `List directory (breif): ~/` - if I
type `/tmp/foo` and hit Enter my message buffer shows `insert-directory:
Reading directory: no such file or directory, /tmp/foo` - the prompt has
now gone and I'm unable to fix my mistake without repeating the entire
process.

Originally posted on reddit, other users appear to think this is a bug.
Was requested by redit Eli-Zaretskii to report this as a bug.
Thread at:
https://www.reddit.com/r/emacs/comments/5uxf0x/pet_hate_dired_autocomplete/
--------------------------

In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.9)
 of 2016-12-13 on hostname='clin'
Windowing system distributor `The X.Org Foundation', version 11.0.11804000
System Description: NAME=Gentoo

Configured using:
 `configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --disable-dependency-tracking
 --disable-silent-rules --docdir=/usr/share/doc/emacs-24.5-r3
 --htmldir=/usr/share/doc/emacs-24.5-r3/html --libdir=/usr/lib64
 --program-suffix=-emacs-24 --infodir=/usr/share/info/emacs-24
 --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --with-gameuser=:gamestat --without-compress-install
 --with-file-notification=inotify --enable-acl --with-dbus --with-gpm
 --without-hesiod --without-kerberos --without-kerberos5 --without-xml2
 --without-selinux --with-gnutls --without-wide-int --with-zlib
 --with-sound=alsa --with-x --without-ns --without-gconf
 --without-gsettings --without-toolkit-scroll-bars --with-gif
 --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm
 --with-imagemagick --with-xft --without-libotf --without-m17n-flt
 --with-x-toolkit=gtk3 GENTOO_PACKAGE=app-editors/emacs-24.5-r3
 'CFLAGS=-O2 -pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  global-flycheck-mode: t
  flycheck-mode: t
  pyvenv-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
[yas] Reloaded everything (snippets will load just-in-time)....
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils py-autopep8 flycheck find-func rx subr-x seq
seq-24 dash cl-extra yasnippet help-mode highlight-indentation flymake
eldoc company edmacro kmacro pcase elpy advice help-fns pyvenv
elpy-refactor python json ido grep compile comint ansi-color files-x
etags ring cus-edit easymenu cus-start cus-load wid-edit cl-loaddefs
cl-lib spacemacs-dark-theme spacemacs-common package epg-config
site-gentoo time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind inotify
dynamic-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

Memory information:
((conses 16 216581 46561)
 (symbols 48 28891 1)
 (miscs 40 61 150)
 (strings 32 48000 30244)
 (string-bytes 1 1368199)
 (vectors 16 21744)
 (vector-slots 8 503564 4880)
 (floats 8 145 328)
 (intervals 56 265 131)
 (buffers 960 11)
 (heap 1024 52296 909))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25807; Package emacs. (Fri, 24 Feb 2017 14:17:01 GMT) Full text and rfc822 format available.

Message #8 received at 25807 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Colin <my.old.email.sucked <at> gmail.com>
Cc: 25807 <at> debbugs.gnu.org
Subject: Re: bug#25807: 24.5;
 List-Directory closes with error when invalid path is typed instead
 of prompting the user to fix it
Date: Fri, 24 Feb 2017 16:15:45 +0200
> From: Colin <my.old.email.sucked <at> gmail.com>
> Date: Mon, 20 Feb 2017 17:20:10 +1100
> 
> If I hit `C-x C-d`, I receive the prompt `List directory (breif): ~/` - if I
> type `/tmp/foo` and hit Enter my message buffer shows `insert-directory:
> Reading directory: no such file or directory, /tmp/foo` - the prompt has
> now gone and I'm unable to fix my mistake without repeating the entire
> process.

Could someone knowledgeable about completion please suggest a way to
do better in these use cases, or perhaps propose a patch?  We are
looking for a way to reject non-existing directories, but accept
existing ones and wildcards, when the user types RET in these cases.

There is "permissive completion with confirmation", but that requires
the user to type TAB before it kicks in, which IMO is sub-optimal (and
counter-intuitive) in this case.

TIA




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25807; Package emacs. (Sat, 04 Mar 2017 10:24:01 GMT) Full text and rfc822 format available.

Message #11 received at 25807 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 25807 <at> debbugs.gnu.org, my.old.email.sucked <at> gmail.com
Subject: Re: bug#25807: 24.5;
 List-Directory closes with error when invalid path is typed instead
 of prompting the user to fix it
Date: Sat, 04 Mar 2017 12:23:04 +0200
Ping!

> Date: Fri, 24 Feb 2017 16:15:45 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 25807 <at> debbugs.gnu.org
> 
> > From: Colin <my.old.email.sucked <at> gmail.com>
> > Date: Mon, 20 Feb 2017 17:20:10 +1100
> > 
> > If I hit `C-x C-d`, I receive the prompt `List directory (breif): ~/` - if I
> > type `/tmp/foo` and hit Enter my message buffer shows `insert-directory:
> > Reading directory: no such file or directory, /tmp/foo` - the prompt has
> > now gone and I'm unable to fix my mistake without repeating the entire
> > process.
> 
> Could someone knowledgeable about completion please suggest a way to
> do better in these use cases, or perhaps propose a patch?  We are
> looking for a way to reject non-existing directories, but accept
> existing ones and wildcards, when the user types RET in these cases.
> 
> There is "permissive completion with confirmation", but that requires
> the user to type TAB before it kicks in, which IMO is sub-optimal (and
> counter-intuitive) in this case.
> 
> TIA




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25807; Package emacs. (Sat, 25 Mar 2017 16:17:01 GMT) Full text and rfc822 format available.

Message #14 received at 25807 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: monnier <at> iro.umontreal.ca, dgutov <at> yandex.ru
Cc: 25807 <at> debbugs.gnu.org, my.old.email.sucked <at> gmail.com
Subject: Re: bug#25807: 24.5;
 List-Directory closes with error when invalid path is typed instead
 of prompting the user to fix it
Date: Sat, 25 Mar 2017 19:16:04 +0300
Ping!  Ping!

> Date: Sat, 04 Mar 2017 12:23:04 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 25807 <at> debbugs.gnu.org, my.old.email.sucked <at> gmail.com
> 
> Ping!
> 
> > Date: Fri, 24 Feb 2017 16:15:45 +0200
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > Cc: 25807 <at> debbugs.gnu.org
> > 
> > > From: Colin <my.old.email.sucked <at> gmail.com>
> > > Date: Mon, 20 Feb 2017 17:20:10 +1100
> > > 
> > > If I hit `C-x C-d`, I receive the prompt `List directory (breif): ~/` - if I
> > > type `/tmp/foo` and hit Enter my message buffer shows `insert-directory:
> > > Reading directory: no such file or directory, /tmp/foo` - the prompt has
> > > now gone and I'm unable to fix my mistake without repeating the entire
> > > process.
> > 
> > Could someone knowledgeable about completion please suggest a way to
> > do better in these use cases, or perhaps propose a patch?  We are
> > looking for a way to reject non-existing directories, but accept
> > existing ones and wildcards, when the user types RET in these cases.
> > 
> > There is "permissive completion with confirmation", but that requires
> > the user to type TAB before it kicks in, which IMO is sub-optimal (and
> > counter-intuitive) in this case.
> > 
> > TIA




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25807; Package emacs. (Sat, 25 Mar 2017 19:29:01 GMT) Full text and rfc822 format available.

Message #17 received at 25807 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Politz <politza <at> hochschule-trier.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25807 <at> debbugs.gnu.org, Colin <my.old.email.sucked <at> gmail.com>
Subject: Re: bug#25807: 24.5;
 List-Directory closes with error when invalid path is typed instead
 of prompting the user to fix it
Date: Sat, 25 Mar 2017 20:28:18 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> [...] We are looking for a way to reject non-existing directories, but
> accept existing ones and wildcards, when the user types RET in these
> cases.

I think in order to do that we would have to figure out whether a given
filename expands to some existing filenames or not, and this also for
handled ones.  The last part of which seems to be difficult.

A more simpler and less general approach would be the addition of a
user-option, i.e.  list-directory-use-wildcards.

-ap




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25807; Package emacs. (Sat, 25 Mar 2017 19:46:01 GMT) Full text and rfc822 format available.

Message #20 received at 25807 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Politz <politza <at> hochschule-trier.de>
Cc: 25807 <at> debbugs.gnu.org, my.old.email.sucked <at> gmail.com
Subject: Re: bug#25807: 24.5;
 List-Directory closes with error when invalid path is typed instead
 of prompting the user to fix it
Date: Sat, 25 Mar 2017 22:45:14 +0300
> From: Andreas Politz <politza <at> hochschule-trier.de>
> Cc: Colin <my.old.email.sucked <at> gmail.com>,  25807 <at> debbugs.gnu.org
> Date: Sat, 25 Mar 2017 20:28:18 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > [...] We are looking for a way to reject non-existing directories, but
> > accept existing ones and wildcards, when the user types RET in these
> > cases.
> 
> I think in order to do that we would have to figure out whether a given
> filename expands to some existing filenames or not, and this also for
> handled ones.  The last part of which seems to be difficult.

Why is the last part difficult?  directory-files already supports
that, doesn't it?  And completion examines matching files as part of
its thing, so I hoped there's already an option to get that for free.

> A more simpler and less general approach would be the addition of a
> user-option, i.e.  list-directory-use-wildcards.

The function in question already supports widlcards, so moving that
support to a new option would be a step backward, I think.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25807; Package emacs. (Wed, 01 Dec 2021 19:17:01 GMT) Full text and rfc822 format available.

Message #23 received at 25807 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Colin <my.old.email.sucked <at> gmail.com>
Cc: 25807 <at> debbugs.gnu.org
Subject: Re: bug#25807: 24.5; List-Directory closes with error when invalid
 path is typed instead of prompting the user to fix it
Date: Wed, 01 Dec 2021 20:16:43 +0100
Colin <my.old.email.sucked <at> gmail.com> writes:

> If I hit `C-x C-d`, I receive the prompt `List directory (breif): ~/` - if I
> type `/tmp/foo` and hit Enter my message buffer shows `insert-directory:
> Reading directory: no such file or directory, /tmp/foo` - the prompt has
> now gone and I'm unable to fix my mistake without repeating the entire
> process.

I've now fixed this in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 25807 <at> debbugs.gnu.org and Colin <my.old.email.sucked <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 01 Dec 2021 19:17:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 30 Dec 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 79 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.