GNU bug report logs - #20205
24.4; lgrep will not accept a directory of ~ to search; problem with read-file-name?

Previous Next

Package: emacs;

Reported by: Mark Lillibridge <mdl <at> foil.strangled.net>

Date: Thu, 26 Mar 2015 05:52:01 UTC

Severity: minor

Tags: notabug

Found in version 24.4

Done: Stefan Kangas <stefan <at> marxist.se>

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 20205 in the body.
You can then email your comments to 20205 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#20205; Package emacs. (Thu, 26 Mar 2015 05:52:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mark Lillibridge <mdl <at> foil.strangled.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 26 Mar 2015 05:52:01 GMT) Full text and rfc822 format available.

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

From: Mark Lillibridge <mdl <at> foil.strangled.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4; lgrep will not accept a directory of ~ to search;
 problem with read-file-name?
Date: Wed, 25 Mar 2015 21:58:30 -0700
(found also in Emacs 24.3, not in 24.2)

Recipe:
    emacs -q
    
    M-x lgrep enter
    target enter
    enter
    <edit mini-buffer to get ~; I had to backspace once then hit ~>
    enter

when you hit the last enter, Emacs gives you a completion buffer and
refuses to accept "~" as a valid directory to search.  "~/" does work,
however.

    I had time to do some limited debugging, following the lgrep code
forward, and found that the problem seems to be with:

    (read-file-name "In directory: " "~/Tmp" "~/Tmp"  t nil 'file-directory-p)

Here too, you cannot get it to accept "~".

- Mark



In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2015-03-11 on foil
Windowing system distributor `The Cygwin/X Project', version 11.0.11403000
System Description:	Debian GNU/Linux 7.8 (wheezy)

Configured using:
 `configure --prefix=/home/mdl/bin/emacs-24.4 --without-gif'

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

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: (only . t)

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <escape> 
x l g r e p <return> t a r g e t <return> <return> 
<backspace> ~ <return> <help-echo> <help-echo> <down-mouse-1> 
<mouse-movement> <mouse-movement> <drag-mouse-1> C-x 
o <return> / <return> <escape> x r e p o r t - b u 
<tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list... [2 times]
Grep exited abnormally with code 2

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
help-fns mail-prsvr mail-utils help-mode easymenu grep compile comint
ansi-color ring 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 inotify
dynamic-setting font-render-setting x-toolkit x multi-tty emacs)

Memory information:
((conses 16 81739 4603)
 (symbols 48 18122 0)
 (miscs 40 92 113)
 (strings 32 11738 5467)
 (string-bytes 1 331881)
 (vectors 16 9658)
 (vector-slots 8 389543 9347)
 (floats 8 69 192)
 (intervals 56 491 22)
 (buffers 960 14)
 (heap 1024 36912 537))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20205; Package emacs. (Thu, 26 Mar 2015 16:33:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mark Lillibridge <mdl <at> foil.strangled.net>
Cc: 20205 <at> debbugs.gnu.org
Subject: Re: bug#20205: 24.4; lgrep will not accept a directory of ~ to search;
 problem with read-file-name?
Date: Thu, 26 Mar 2015 18:31:38 +0200
> From: Mark Lillibridge <mdl <at> foil.strangled.net>
> Date: Wed, 25 Mar 2015 21:58:30 -0700
> 
> 
> (found also in Emacs 24.3, not in 24.2)
> 
> Recipe:
>     emacs -q
>     
>     M-x lgrep enter
>     target enter
>     enter
>     <edit mini-buffer to get ~; I had to backspace once then hit ~>
>     enter
> 
> when you hit the last enter, Emacs gives you a completion buffer and
> refuses to accept "~" as a valid directory to search.  "~/" does work,
> however.

It's a feature: "~" gets completed to "~USER" where USER are the users
known by the system.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20205; Package emacs. (Sun, 29 Mar 2015 17:47:02 GMT) Full text and rfc822 format available.

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

From: Mark Lillibridge <mdl <at> alum.mit.edu>
To: 20205 <at> debbugs.gnu.org, eliz <at> gnu.org
Subject: Re: bug#20205: 24.4; lgrep will not accept a directory of ~ to search;
 problem with read-file-name?
Date: Sun, 29 Mar 2015 10:50:12 -0700
Eli wrote:
> > From: Mark Lillibridge <mdl <at> foil.strangled.net>
> > Date: Wed, 25 Mar 2015 21:58:30 -0700
> > 
> > 
> > (found also in Emacs 24.3, not in 24.2)
> > 
> > Recipe:
> >     emacs -q
> >     
> >     M-x lgrep enter
> >     target enter
> >     enter
> >     <edit mini-buffer to get ~; I had to backspace once then hit ~>
> >     enter
> > 
> > when you hit the last enter, Emacs gives you a completion buffer and
> > refuses to accept "~" as a valid directory to search.  "~/" does work,
> > however.
> 
> It's a feature: "~" gets completed to "~USER" where USER are the users
> known by the system.

    I'd be fine if ~ got completed that way, but it doesn't because
there are other completions of ~.  The rules of UNIX (shells) say that ~
by itself is a perfectly valid file name that refers to ~USER/ (e.g.,
try "ls ~").  Emacs should resume supporting this rather than claiming
that ~ is not a valid directory name.

- Mark




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20205; Package emacs. (Mon, 30 Sep 2019 00:43:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 20205 <at> debbugs.gnu.org, Mark Lillibridge <mdl <at> foil.strangled.net>
Subject: Re: bug#20205: 24.4; lgrep will not accept a directory of ~ to
 search; problem with read-file-name?
Date: Mon, 30 Sep 2019 02:41:54 +0200
tags 20205 + notabug
close 20205
quit

Eli Zaretskii <eliz <at> gnu.org> writes:

>> (found also in Emacs 24.3, not in 24.2)
>>
>> Recipe:
>>     emacs -q
>>
>>     M-x lgrep enter
>>     target enter
>>     enter
>>     <edit mini-buffer to get ~; I had to backspace once then hit ~>
>>     enter
>>
>> when you hit the last enter, Emacs gives you a completion buffer and
>> refuses to accept "~" as a valid directory to search.  "~/" does work,
>> however.
>
> It's a feature: "~" gets completed to "~USER" where USER are the users
> known by the system.

With the above explanation, I'm closing this as notabug.

Best regards,
Stefan Kangas




Added tag(s) notabug. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 30 Sep 2019 00:43:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 20205 <at> debbugs.gnu.org and Mark Lillibridge <mdl <at> foil.strangled.net> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 30 Sep 2019 00:43: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. (Mon, 28 Oct 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 182 days ago.

Previous Next


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