From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: lode leroy Newsgroups: gmane.emacs.help Subject: RE: case-sensitize filename Date: Fri, 19 Sep 2008 09:27:09 +0200 Message-ID: References: <48D25FEC.60809@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1221809270 24278 80.91.229.12 (19 Sep 2008 07:27:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2008 07:27:50 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Lennart Borgman (gmail)" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 19 09:28:47 2008 Return-path: Envelope-to: geh-help-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 1KgaQ2-0007Ob-0g for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Sep 2008 09:28:46 +0200 Original-Received: from localhost ([127.0.0.1]:55648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgaP0-0001uh-Cs for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Sep 2008 03:27:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgaOZ-0001uc-59 for help-gnu-emacs@gnu.org; Fri, 19 Sep 2008 03:27:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgaOW-0001uQ-NU for help-gnu-emacs@gnu.org; Fri, 19 Sep 2008 03:27:13 -0400 Original-Received: from [199.232.76.173] (port=54969 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgaOW-0001uN-Gf for help-gnu-emacs@gnu.org; Fri, 19 Sep 2008 03:27:12 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:26516) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KgaOV-0001o9-Ri for help-gnu-emacs@gnu.org; Fri, 19 Sep 2008 03:27:12 -0400 Original-Received: from bay0-omc2-s33.bay0.hotmail.com ([65.54.246.169]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KgaOV-0004Yd-14 for help-gnu-emacs@gnu.org; Fri, 19 Sep 2008 03:27:11 -0400 Original-Received: from BAY105-W39 ([65.54.224.139]) by bay0-omc2-s33.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 19 Sep 2008 00:27:09 -0700 X-Originating-IP: [213.246.200.66] Importance: Normal In-Reply-To: <48D25FEC.60809@gmail.com> X-OriginalArrivalTime: 19 Sep 2008 07:27:09.0515 (UTC) FILETIME=[205459B0:01C91A29] X-detected-kernel: by mx20.gnu.org: Windows 2000 SP4, XP SP1+ X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57784 Archived-At: > From: lennart.borgman@gmail.com > lode leroy wrote: >> I would like to know if there is an easy way to convert a file path >> that has been converted to all-lowercase back to the properly cased vers= ion? >>=20 >> I have the following usecase: >>=20 >> cl /c C:\Projects\MyProject\MyProgramFile.cpp >> c:\projects\myproject\myprogramfile.cpp(42): error C1234: 'CMyClass': un= declared >>=20 >> next-error -> c:\projects\myproject\myprogramfile.cpp >>=20 >> now next-error opens the correct file=2C but with the wrong buffer name = ... >=20 > Looks like a bug somewhere. What version of Emacs are you using? (GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-08-29 on LENNART-69DE5= 64) Well=2C for me=2C its a bug in vc90 (aka MS VisualC++ Express 2008) which is reporting the error as being in file tolower(filename) rather then= filename. in the mean time=2C I found out that the following does what I want: (defun filepath-transform-build-to-src (filepath) (progn (setq result (replace-regexp-in-string "\\\\build\\\\" "\\\\src\\\\" re= sult)) (setq result (expand-file-name result)) (setq result (convert-standard-filename result)) (setq result (file-truename result)) result ) ) (setq compilation-parse-errors-filename-function=20 'filepath-transform-build-to-src) -- lode _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Space= s. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=3Dcreate&wx_url=3D/friends.= aspx&mkt=3Den-us=