From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#550: 23.0.60; A case where file-truename ignores case on w32 Date: Sat, 12 Jul 2008 00:46:49 +0200 Message-ID: <4877E2D9.7080303@gmail.com> References: <4877CD9C.5070705@gmail.com> <4877D5A9.3060107@gnu.org> Reply-To: "Lennart Borgman \(gmail\)" , 550@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1215817652 12768 80.91.229.12 (11 Jul 2008 23:07:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Jul 2008 23:07:32 +0000 (UTC) Cc: 550@emacsbugs.donarmstrong.com, emacs-pretest-bug@gnu.org To: Jason Rumney Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 12 01:08:19 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KHRis-00032w-BO for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Jul 2008 01:08:18 +0200 Original-Received: from localhost ([127.0.0.1]:50242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KHRi0-0007PA-L7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Jul 2008 19:07:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KHRhw-0007P1-7F for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2008 19:07:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KHRhu-0007ON-E9 for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2008 19:07:19 -0400 Original-Received: from [199.232.76.173] (port=48075 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KHRhu-0007OJ-9n for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2008 19:07:18 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:33383) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KHRht-0003OA-Om for bug-gnu-emacs@gnu.org; Fri, 11 Jul 2008 19:07:18 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m6BN7FxY029135; Fri, 11 Jul 2008 16:07:15 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m6BMt5g1024986; Fri, 11 Jul 2008 15:55:05 -0700 X-Loop: don@donarmstrong.com Resent-From: "Lennart Borgman (gmail)" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 11 Jul 2008 22:55:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 550 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 550-submit@emacsbugs.donarmstrong.com id=B550.121581642623650 (code B ref 550); Fri, 11 Jul 2008 22:55:05 +0000 Original-Received: (at 550) by emacsbugs.donarmstrong.com; 11 Jul 2008 22:47:06 +0000 Original-Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m6BMl0dJ023644 for <550@emacsbugs.donarmstrong.com>; Fri, 11 Jul 2008 15:47:02 -0700 Original-Received: from c83-254-145-59.bredband.comhem.se ([83.254.145.59]:61797 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KHROF-0000rf-9b; Sat, 12 Jul 2008 00:47:00 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <4877D5A9.3060107@gnu.org> X-Antivirus: avast! (VPS 080711-0, 2008-07-11), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.145.59 X-Scan-Result: No virus found in message 1KHROF-0000rf-9b. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KHROF-0000rf-9b 44e4281a4744749153d0857567e13382 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Fri, 11 Jul 2008 19:07:19 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:18690 gmane.emacs.pretest.bugs:22718 Archived-At: 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)