[gnu.emacs.bug] Filename handling problems and suggestions for GNU Emacs

gnu@hoptoad.uucp (John Gilmore) (04/08/89)

I tried inserting a file into a buffer with ^X-i, where I could read
the file itself but not its parent directory.  (I had execute permission
on the directory.)  Emacs would not read it -- it complains about
the directory being inaccessible but won't go on to actually try
opening the file under the name I specified to it.

I think filename completion is a fine thing, but I wish it wouldn't
get in my way so much.

Two more bugs with filename handling:

If I try to open "/tmp/1" and there is a file like "/tmp/11", it
prompts me for confirmation.  There seems to be no way to type a
command to Emacs such that it will really open exactly the filename
that I typed, without going through this extra prompt.  I find this
annoying.  It also took me a while to figure out what was going on,
since it seemed that at random times, it would prompt for confirmation,
with absolutely no message about why I needed to confirm this
particular file.  It was only a month later that i realized it
might be because this file's name is a prefix of another file's name.

If an argument in emacs's argv[] contains multiple slashes, it
discards the part of the filename to the left of the dup slash.
I can see doing this at the beginning of interactive input, (where
Emacs is already prompting you with a partial filename), but not
for full pathnames supplied intact to Emacs.  Such pathnames
get generated frequenly because I have environment variables
for commonly used directories, e.g.
	n=/usr/lib/news/
	ns=/usr/spool/news/
	b=/usr/spool/batch/
	ul=/usr/lib/uucp/
	us=/usr/spool/uucp/
	m=/u/gnu/Mail/inbox/
These have trailing slashes because some of them are symlinks;
"ls $n" will list the actual directory, not the symlink.  But
if I say "emacs $n/active" it expands to "emacs /usr/lib/news//active"
and Emacs tries to open a file called "/active".  Gonggggggg...

One request-for-enhancement with Emacs filename handling:

In interactive filename typing, it should notice and expand environment
variable references, so that I can type ^Xi/$ns/active and get to
/usr/lib/news/active.  I miss this feature of vi.
-- 
John Gilmore    {sun,pacbell,uunet,pyramid,amdahl}!hoptoad!gnu    gnu@toad.com
"Use the Source, Luke...."
Copyright 1989 John Gilmore; you may redistribute only if your recipients may.