emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacsclient: support `/' directory separator on w32


From: Stuart D. Herring
Subject: Re: emacsclient: support `/' directory separator on w32
Date: Mon, 27 Nov 2006 11:16:48 -0800 (PST)
User-agent: SquirrelMail/1.4.6-7.el3.7lanl

>> Index: emacs/lib-src/emacsclient.c
>> ===================================================================
>> RCS file: /cvsroot/emacs/emacs/lib-src/emacsclient.c,v
>> retrieving revision 1.93
>> diff -c -r1.93 emacsclient.c
>> *** emacs/lib-src/emacsclient.c      23 Nov 2006 01:50:59 -0000      1.93
>> --- emacs/lib-src/emacsclient.c      24 Nov 2006 05:30:32 -0000
>> ***************
>> *** 452,461 ****
>>   #ifdef WINDOWSNT
>>     /* X:\xxx is always absolute; X:xxx is an error and will fail.  */
>>     if (islower (tolower (filename[0]))
>> !       && filename[1] == ':' && filename[2] == '\\')
>>       return TRUE;
>>
>>     /* Both \xxx and \\xxx\yyy are absolute.  */
>>     if (filename[0] == '\\') return TRUE;
>>   #endif
>>
>> --- 452,462 ----
>>   #ifdef WINDOWSNT
>>     /* X:\xxx is always absolute; X:xxx is an error and will fail.  */
>>     if (islower (tolower (filename[0]))
>> !       && filename[1] == ':' && (filename[2] == '\\' || filename[2] ==
>> '/'))
>>       return TRUE;
>>
>>     /* Both \xxx and \\xxx\yyy are absolute.  */
>> +   /* (The forward slash case is handled previously.) */
>>     if (filename[0] == '\\') return TRUE;
>>   #endif

This is OT, but "X:xxx" is not an error for the filesystem; at least in
many cases, Windows maintains a notion of a current directory per drive,
which means that you get this behavior:

C:\> cd books
C:\BOOKS> cd d:\rocks
C:\BOOKS> rem Note that we haven't gone anywhere...
C:\BOOKS> d:
D:\ROCKS> rem but the command had an effect anyway.
D:\ROCKS> type c:warandpeace.txt
...
D:\ROCKS> rem That was c:\books\warandpeace.txt, not c:\warandpeace.txt:
D:\ROCKS> type c:\warandpeace.txt
File not found
D:\ROCKS> rem Other relative paths can be used:
D:\ROCKS> cd c:nonfiction
D:\ROCKS> c:
C:\BOOKS\NONFICTION> exit

I understand if emacsclient can't use this style of filename (because of
technical limitations, or just for simplicity), or if I'm misunderstanding
the intent of the code, but I thought it important that its existence be
known.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]