* case-sensitize filename
@ 2008-09-18 8:00 lode leroy
2008-09-18 14:04 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 3+ messages in thread
From: lode leroy @ 2008-09-18 8:00 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
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 version?
I have the following usecase:
cl /c C:\Projects\MyProject\MyProgramFile.cpp
c:\projects\myproject\myprogramfile.cpp(42): error C1234: 'CMyClass': undeclared
next-error -> c:\projects\myproject\myprogramfile.cpp
now next-error opens the correct file, but with the wrong buffer name ...
I'd like to compensate for that...
next-error -> C:\Projects\MyProject\src\MyProgramFile.cpp
Actually, the build files copy everything into "build" first,
and emacs should open the file in "src", but I already got some elisp to take care of that...
cl /c C:\Projects\MyProject\build\MyProgramFile.cpp
c:\projects\myproject\build\myprogramfile.cpp(42): error C1234: 'CMyClass': undeclared
next-error -> C:\Projects\MyProject\src\MyProgramFile.cpp
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: case-sensitize filename
2008-09-18 8:00 case-sensitize filename lode leroy
@ 2008-09-18 14:04 ` Lennart Borgman (gmail)
2008-09-19 7:27 ` lode leroy
0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-18 14:04 UTC (permalink / raw)
To: lode leroy; +Cc: help-gnu-emacs
lode leroy wrote:
> Hello,
>
> 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 version?
>
> I have the following usecase:
>
> cl /c C:\Projects\MyProject\MyProgramFile.cpp
> c:\projects\myproject\myprogramfile.cpp(42): error C1234: 'CMyClass': undeclared
>
> next-error -> c:\projects\myproject\myprogramfile.cpp
>
> now next-error opens the correct file, but with the wrong buffer name ...
Looks like a bug somewhere. What version of Emacs are you using?
> I'd like to compensate for that...
>
> next-error -> C:\Projects\MyProject\src\MyProgramFile.cpp
>
>
> Actually, the build files copy everything into "build" first,
> and emacs should open the file in "src", but I already got some elisp to take care of that...
>
> cl /c C:\Projects\MyProject\build\MyProgramFile.cpp
> c:\projects\myproject\build\myprogramfile.cpp(42): error C1234: 'CMyClass': undeclared
>
> next-error -> C:\Projects\MyProject\src\MyProgramFile.cpp
>
>
> _________________________________________________________________
> News, entertainment and everything you care about at Live.com. Get it now!
> http://www.live.com/getstarted.aspx
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: case-sensitize filename
2008-09-18 14:04 ` Lennart Borgman (gmail)
@ 2008-09-19 7:27 ` lode leroy
0 siblings, 0 replies; 3+ messages in thread
From: lode leroy @ 2008-09-19 7:27 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: help-gnu-emacs
> 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 version?
>>
>> I have the following usecase:
>>
>> cl /c C:\Projects\MyProject\MyProgramFile.cpp
>> c:\projects\myproject\myprogramfile.cpp(42): error C1234: 'CMyClass': undeclared
>>
>> next-error -> c:\projects\myproject\myprogramfile.cpp
>>
>> now next-error opens the correct file, but with the wrong buffer name ...
>
> 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-69DE564)
Well, for me, 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, 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\\\\" result))
(setq result (expand-file-name result))
(setq result (convert-standard-filename result))
(setq result (file-truename result))
result
)
)
(setq compilation-parse-errors-filename-function
'filepath-transform-build-to-src)
-- lode
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-19 7:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-18 8:00 case-sensitize filename lode leroy
2008-09-18 14:04 ` Lennart Borgman (gmail)
2008-09-19 7:27 ` lode leroy
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.