all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20205: 24.4; lgrep will not accept a directory of ~ to search; problem with read-file-name?
@ 2015-03-26  4:58 Mark Lillibridge
  2015-03-26 16:31 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mark Lillibridge @ 2015-03-26  4:58 UTC (permalink / raw
  To: 20205


(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))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#20205: 24.4; lgrep will not accept a directory of ~ to search; problem with read-file-name?
  2015-03-26  4:58 bug#20205: 24.4; lgrep will not accept a directory of ~ to search; problem with read-file-name? Mark Lillibridge
@ 2015-03-26 16:31 ` Eli Zaretskii
  2015-03-29 17:50 ` Mark Lillibridge
  2019-09-30  0:41 ` Stefan Kangas
  2 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2015-03-26 16:31 UTC (permalink / raw
  To: Mark Lillibridge; +Cc: 20205

> From: Mark Lillibridge <mdl@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#20205: 24.4; lgrep will not accept a directory of ~ to search; problem with read-file-name?
  2015-03-26  4:58 bug#20205: 24.4; lgrep will not accept a directory of ~ to search; problem with read-file-name? Mark Lillibridge
  2015-03-26 16:31 ` Eli Zaretskii
@ 2015-03-29 17:50 ` Mark Lillibridge
  2019-09-30  0:41 ` Stefan Kangas
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Lillibridge @ 2015-03-29 17:50 UTC (permalink / raw
  To: 20205, eliz


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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#20205: 24.4; lgrep will not accept a directory of ~ to search; problem with read-file-name?
  2015-03-26  4:58 bug#20205: 24.4; lgrep will not accept a directory of ~ to search; problem with read-file-name? Mark Lillibridge
  2015-03-26 16:31 ` Eli Zaretskii
  2015-03-29 17:50 ` Mark Lillibridge
@ 2019-09-30  0:41 ` Stefan Kangas
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2019-09-30  0:41 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: 20205, Mark Lillibridge

tags 20205 + notabug
close 20205
quit

Eli Zaretskii <eliz@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-30  0:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26  4:58 bug#20205: 24.4; lgrep will not accept a directory of ~ to search; problem with read-file-name? Mark Lillibridge
2015-03-26 16:31 ` Eli Zaretskii
2015-03-29 17:50 ` Mark Lillibridge
2019-09-30  0:41 ` Stefan Kangas

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.