all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#550: 23.0.60; A case where file-truename ignores case on w32
@ 2008-07-11 21:16 Lennart Borgman (gmail)
  2008-07-11 21:50 ` Jason Rumney
  2008-07-11 23:30 ` bug#550: marked as done (23.0.60; A case where file-truename ignores case on w32) Emacs bug Tracking System
  0 siblings, 2 replies; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2008-07-11 21:16 UTC (permalink / raw)
  To: emacs-pretest-bug

I got a bug report from a user concerning nXhtml. The problem seems to 
be that Emacs ignores case in an existing directory name. Here is my 
reply (I can reproduce the problem):


richard6905 wrote:
 >
 >
 > Hi Lennart,
 > thanks for your reply. Here's the output of the lines you've listed:
 >
 > (html-site-dir-contains "c:/temp" "c:/temp/in/hej.html"):
 > nil
 >
 > (html-site-looks-like-local-url "c:/temp/in/hej.html"):
 > t
 >
 > (html-site-looks-like-local-url "c:/temp"):
 > t
 >
 > (file-truename (expand-file-name "c:/temp/in/hej.html")):
 > c:/temp/in/hej.html

Yes, great, this information helps. It looks like there is a bug in 
file-truename. At least I expect the result here to be

   c:/Temp/in/hej.html

since you have a directory named "C:\Temp" with uppercase T. I will file 
a bug report.

 > (file-name-as-directory (file-truename (expand-file-name "c:/temp/"))):
 > c:/Temp/
 >
 > There is a c:\Temp directory, but as far as I'm aware, this doesn't
 > have any specific Emacs related content.
 >
 > Hope this information helps.
 >
 > regards
 >
 > Richard




In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
  of 2008-06-29
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags 
-Ic:/g/include -fno-crossjumping'






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#550: 23.0.60; A case where file-truename ignores case on w32
  2008-07-11 21:16 bug#550: 23.0.60; A case where file-truename ignores case on w32 Lennart Borgman (gmail)
@ 2008-07-11 21:50 ` Jason Rumney
  2008-07-11 22:46   ` Lennart Borgman (gmail)
  2008-07-11 23:30 ` bug#550: marked as done (23.0.60; A case where file-truename ignores case on w32) Emacs bug Tracking System
  1 sibling, 1 reply; 6+ messages in thread
From: Jason Rumney @ 2008-07-11 21:50 UTC (permalink / raw)
  To: Lennart Borgman (gmail), 550; +Cc: emacs-pretest-bug

Lennart Borgman (gmail) wrote:
> I got a bug report from a user concerning nXhtml. The problem seems to
> be that Emacs ignores case in an existing directory name.

Only when the file does not exist. In that case, w32-long-file-name
returns nil and the original string that was passed in to file-truename
is used. The solution is probably to recursively descend the directory
heirarchy until we find a directory that exists, and call
w32-long-file-name on that.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#550: 23.0.60; A case where file-truename ignores case on w32
  2008-07-11 21:50 ` Jason Rumney
@ 2008-07-11 22:46   ` Lennart Borgman (gmail)
  2008-07-11 23:23     ` Jason Rumney
  0 siblings, 1 reply; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2008-07-11 22:46 UTC (permalink / raw)
  To: Jason Rumney; +Cc: 550, emacs-pretest-bug

Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
>> I got a bug report from a user concerning nXhtml. The problem seems to
>> be that Emacs ignores case in an existing directory name.
> 
> Only when the file does not exist. In that case, w32-long-file-name
> returns nil and the original string that was passed in to file-truename
> is used. The solution is probably to recursively descend the directory
> heirarchy until we find a directory that exists, and call
> w32-long-file-name on that.

I suggest replacing

   (or (w32-long-file-name filename) filename)))

in `true-filename' with

   (let ((w32-filename (w32-long-file-name filename))
         (root filename)
         w32-root)
     (while (not w32-filename)
       (when (eq ?/ (car (last (append root nil))))
         (setq root (substring root 0 -1)))
       (setq root (file-name-directory root))
       (if (not root)
           (setq w32-filename filename)
         (setq w32-root (w32-long-file-name root))
         (when w32-root
           (setq w32-filename
                 (concat w32-root
                         (substring filename (length w32-root)))))))
     w32-filename)






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#550: 23.0.60; A case where file-truename ignores case on w32
  2008-07-11 22:46   ` Lennart Borgman (gmail)
@ 2008-07-11 23:23     ` Jason Rumney
  2008-07-11 23:49       ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Rumney @ 2008-07-11 23:23 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-pretest-bug, 550-done

Lennart Borgman (gmail) wrote:

> I suggest replacing
> 
>   (or (w32-long-file-name filename) filename)))

I just checked in a similar fix.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#550: marked as done (23.0.60; A case where file-truename  ignores case on w32)
  2008-07-11 21:16 bug#550: 23.0.60; A case where file-truename ignores case on w32 Lennart Borgman (gmail)
  2008-07-11 21:50 ` Jason Rumney
@ 2008-07-11 23:30 ` Emacs bug Tracking System
  1 sibling, 0 replies; 6+ messages in thread
From: Emacs bug Tracking System @ 2008-07-11 23:30 UTC (permalink / raw)
  To: Jason Rumney

[-- Attachment #1: Type: text/plain, Size: 876 bytes --]


Your message dated Sat, 12 Jul 2008 00:23:09 +0100
with message-id <4877EB5D.7080804@gnu.org>
and subject line Re: bug#550: 23.0.60; A case where file-truename ignores case on w32
has caused the Emacs bug report #550,
regarding 23.0.60; A case where file-truename ignores case on w32
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
550: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=550
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3714 bytes --]

From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: 23.0.60; A case where file-truename ignores case on w32
Date: Fri, 11 Jul 2008 23:16:12 +0200
Message-ID: <4877CD9C.5070705@gmail.com>

I got a bug report from a user concerning nXhtml. The problem seems to 
be that Emacs ignores case in an existing directory name. Here is my 
reply (I can reproduce the problem):


richard6905 wrote:
 >
 >
 > Hi Lennart,
 > thanks for your reply. Here's the output of the lines you've listed:
 >
 > (html-site-dir-contains "c:/temp" "c:/temp/in/hej.html"):
 > nil
 >
 > (html-site-looks-like-local-url "c:/temp/in/hej.html"):
 > t
 >
 > (html-site-looks-like-local-url "c:/temp"):
 > t
 >
 > (file-truename (expand-file-name "c:/temp/in/hej.html")):
 > c:/temp/in/hej.html

Yes, great, this information helps. It looks like there is a bug in 
file-truename. At least I expect the result here to be

   c:/Temp/in/hej.html

since you have a directory named "C:\Temp" with uppercase T. I will file 
a bug report.

 > (file-name-as-directory (file-truename (expand-file-name "c:/temp/"))):
 > c:/Temp/
 >
 > There is a c:\Temp directory, but as far as I'm aware, this doesn't
 > have any specific Emacs related content.
 >
 > Hope this information helps.
 >
 > regards
 >
 > Richard




In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
  of 2008-06-29
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags 
-Ic:/g/include -fno-crossjumping'



[-- Attachment #3: Type: message/rfc822, Size: 2160 bytes --]

From: Jason Rumney <jasonr@gnu.org>
To: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
Cc: 550-done@emacsbugs.donarmstrong.com, emacs-pretest-bug@gnu.org
Subject: Re: bug#550: 23.0.60; A case where file-truename ignores case on w32
Date: Sat, 12 Jul 2008 00:23:09 +0100
Message-ID: <4877EB5D.7080804@gnu.org>

Lennart Borgman (gmail) wrote:

> I suggest replacing
> 
>   (or (w32-long-file-name filename) filename)))

I just checked in a similar fix.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#550: 23.0.60; A case where file-truename ignores case on w32
  2008-07-11 23:23     ` Jason Rumney
@ 2008-07-11 23:49       ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2008-07-11 23:49 UTC (permalink / raw)
  To: Jason Rumney; +Cc: emacs-pretest-bug, 550-done

Thanks.

Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
> 
>> I suggest replacing
>>
>>   (or (w32-long-file-name filename) filename)))
> 
> I just checked in a similar fix.
> 






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-11 23:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-11 21:16 bug#550: 23.0.60; A case where file-truename ignores case on w32 Lennart Borgman (gmail)
2008-07-11 21:50 ` Jason Rumney
2008-07-11 22:46   ` Lennart Borgman (gmail)
2008-07-11 23:23     ` Jason Rumney
2008-07-11 23:49       ` Lennart Borgman (gmail)
2008-07-11 23:30 ` bug#550: marked as done (23.0.60; A case where file-truename ignores case on w32) Emacs bug Tracking System

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.