🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99451

Re: dired-find-file finds the wrong file.

#99451
From: Rodney Peck II
Date: Wed, 12 Sep 1990 18:06
39 lines
2223 bytes
In article <9009121709.AA00959@noname> eric%yamada-sun@CSE.OGI.EDU writes:
>GNU Emacs 18.55.2 of Wed Jan  3 1990 on ptl (berkeley-unix)
>
>I have created a file named `who, me?' by doing
>	% touch who,\ me\?
>
>I see on the screen (along with other files in the directory):
>	  -rw-r--r--   1 eric     engineer        0 Sep 12 09:34 who, me?
>
>Harrumph, I say -- I wanted a file named `who, me?', not one named
>`who,'.  For what it's worth, I can find the file with C-x C-f w TAB.
>
>The "problem" seems to be in dired-get-filename.  There's some code
>that looks for the end of the filename, and it looks like this
>	(skip-chars-forward "^ \n")
>
>This code clearly thinks that a space marks the end of the file name,
>which of course is reasonable 99% of the time.  In my case, it didn't
>work.
>
>So if I get rid of the space in the string argument to
>skip-chars-forward, dired does what I want.
>
>I don't understand why that space is there anyway. Should it be?

I played with this awhile ago when I had a lot of files created by our ethernetted
macintosh on the sun filesystem.  Mac's really like filenames with spaces in them.

If you remove the space, you will not be able to work with symbolic links properly.
They look like this:
      -blahblah----     1 eric   engineer       0 somedate   imalink -> realfile

so, if you take out the space, you will get "imalink -> realfile" for your f command.
You want "imalink".  Maybe the expression should look for ^, \n or "->".  This would
make files with "->" unreadable, but that sort of filename is confusing anyway.


-- 
Rodney
Technical Details
Message-ID: <S7B%2-%@rpi.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wuarchive!zaphod.mps.ohio-state.edu!rpi!rodney
References: <9009121709.AA00959@noname>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,371817112623f8aa
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-09-12 11:06:10 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wuarchive!zaphod.mps.ohio-state.edu!rpi!rodney
From: rodney@sun.ipl.rpi.edu (Rodney Peck II)
Newsgroups: gnu.emacs.bug
Subject: Re: dired-find-file finds the wrong file.
Message-ID: <S7B%2-%@rpi.edu>
Date: 12 Sep 90 18:06:10 GMT
References: <9009121709.AA00959@noname>
Distribution: gnu
Organization: Rensselaer Polytechnic Institute, Troy NY
Lines: 39
Posted: Wed Sep 12 19:06:10 1990