Article View: gnu.emacs.help
Article #2246Re: Allowing SPACE in filename (find-file, dired, etc)
From: Viktor Haag
Date: Thu, 28 Jan 1993 16:44
Date: Thu, 28 Jan 1993 16:44
48 lines
2394 bytes
2394 bytes
In article <SHENTON.93Jan26134727@troll.gsfc.nasa.gov> shenton@troll.gsfc.nasa.gov (Chris Shenton) writes:
>I'm editing files which frequently have space in their filename, and
>would like the find-file functions in -- for example -- dired to
>recognize the fullname, not just up to the first space.
>
>Anyone have ideas on how to do this?
>
>Thanks.
>--
>-- Chris Shenton shenton@nsisrv.gsfc.nasa.gov NASA/GSFC/HSTX 301-286-7905
Well, I'm not saying it can't be done, but as far as I can see
dired-find-file (dired.el) uses find-file (files.el)
find-file takes a filename as an arg and calls find-file-noselect,
which finds the file, reads it into a buffer and returns the buffer.
find-file-noselect sets the filename to (expand-file-name filename),
and I can't find any source for expand-file-name. Describe-function
gives the following info on expand-file-name:
expand-file-name:
Convert FILENAME to absolute, and canonicalize it.
Second arg DEFAULT is directory to start with if FILENAME is relative
(does not start with slash); if DEFAULT is nil or missing,
the current buffer's value of default-directory is used.
Filenames containing . or .. as components are simplified;
initial ~ is expanded. See also the function
substitute-in-file-name.
From this explanation, it seems that expand-file-name takes the
filename which might include relative references and expands it to a
full path name. This may involve disregarding spaces internal to the
filename arg passed to expand-file-name. Of course, I'm no expert --
anyone out there with an expert's explanation of this problem?
--
Viktor Haag viktor@mks.com
Mortice Kern Systems (519) 884-8469
35 King North, Waterloo, Ontario ext. 241
"we are not thugs. we are vitamin supplements to justice ..." | a selector
Technical Details
Message-ID:
<1993Jan28.164413.504@mks.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!mks.com!viktorReferences:
<SHENTON.93Jan26134727@troll.gsfc.nasa.gov>Show Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.help Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!mks.com!viktor From: viktor@mks.com (Viktor Haag) Subject: Re: Allowing SPACE in filename (find-file, dired, etc) Message-ID: <1993Jan28.164413.504@mks.com> Organization: Mortice Kern Systems Inc., Waterloo, Ontario, CANADA References: <SHENTON.93Jan26134727@troll.gsfc.nasa.gov> Date: Thu, 28 Jan 1993 16:44:13 GMT Lines: 48