[Bug: 21.4.19] Windows XP: can't open files like ~/My
Documents/foo.txt
Hans Muller
Hans.Muller at Sun.COM
Mon Jul 17 23:54:09 EDT 2006
Sorry to be glacial. It's been a busy summer :-). Here's the feedback
you asked for ...
Vin Shelton wrote:
> On 7/13/06, Hans Muller <Hans.Muller at sun.com> wrote:
>>
>> Thanks for the response. I left for vacation shortly after sending the
>> problem
>> report so this is a rather belated reply:
>>
>> Stephen J. Turnbull wrote:
>> >>>>>> "Hans" == Hans Muller <Hans.Muller at Sun.COM> writes:
>> >>>>>>
>> >
>> > Hans> On Windows XP, I'm unable to open files in common
>> > Hans> directories like "~/My Documents". If I had to guess, the
>> > Hans> problem is with filenames that contain spaces.
>> >
>> > How are you opening them? With C-x C-f, or with the Open File Dialog?
>> > Where exactly do you run into a problem?
>> >
>> Either approach for opening a file fails. I've found that opening "~/My
>> Documents" in dired, and
>> then creating a new subdirectory (with "+") and then opening a files in
>> the subdir, does work.
>> Maybe the problem (on XP) has to do with paths whose directory component
>> ends with a name that contains a space?
>> > With C-x C-f, as far as I know quoting the space with C-q should allow
>> > you to enter it in the minibuffer, and that should be sufficient to
>> > open the file. (Works for me on Linux for a file name.)
>> Doesn't work on XP. Result is: "File not found and directory write
>> protected".
>
> This Just Works For Me with either a cygwin or native build with a
> recent 21.4.19 build. Is your HOME environment variable set
> explicitly?
It's not set at all. I started with a pretty vanilla XP installation,
downloaded
and installed XEmacs, and didn't create any .foo config files.
> Mine is set to e:/acs, but I bet in your case, ~ expands
> to a name with a space in it (probably c:\Documents and
> Settings\hans). My guess is that expanding the home directory needs
> to be quoted somehow. What does this evaluate to:
>
> (getenv "HOME")
nil
>
> Does this work:
>
> C-x C-f c:\Documents and Settings\hans\My Documents\foo.txt
No; that just generates "file not found and directory write protected".
>
> Another experiment I'd like you to try, please, is to:
>
> (setq debug-on-error t)
> C-x C-f ~/My Documents/foo.txt
>
> and please send the backtrace to xemacs-beta.
That doesn't generate a backtrace. Emacs just creates a read-only
buffer called
foo.txt that points to the specified path. Same for this:
(setq debug-on-error t)
t
(find-file " ~/My Documents/foo.txt")
#<buffer "foo.txt">
I also get the same results for:
(find-file "c:\\Documents and Settings\\hans\\My Documents\\foo.txt") and
(find-file "c:/Documents and Settings/hans/My Documents/foo.txt")
If a setenv HOME to the ...\hans\My Documents path, then C-x C-f does work.
I've create a ~/.xemacs file that contains the following, and now all seems
copacetic:
(setenv "HOME" "c:\\Documents and Settings\\hans\\My Documents")
(message (concat "Loading " (getenv HOME) "\\.xemacs
<file://%5C%5C.xemacs>"))
I've been running XEmacs 21.4 (April 2001) on an XP machine for a year
or two
without having set the HOME env variable and did not see the problem
outlined
here.
Thanks for the help with this; I'm on the XEmacs road again.
- Hans
>
> Thanks,
> Vin
>
More information about the XEmacs-Beta
mailing list