[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] regexp link on windows problem
From: |
Bastien |
Subject: |
Re: [O] regexp link on windows problem |
Date: |
Fri, 11 Mar 2011 09:45:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi Rafal,
"Rafal Florek" <address@hidden> writes:
> The `org-insert-link' function destroys my regexp by changing all
> backslashes to slashes.
Can you give an example?
> (I construct the regexp like this: (concat token1 "[ \\t]*" token2))
> It happens only under windows, under linux it is ok.
> The culprit is the `expand-file-name' function, eg.
>
> for a C source line - a_struct.a_field = 1;
>
> on linux:
> (expand-file-name "~/file.h::/a_struct[ \\t]*\\.[ \\t]*a_field[ \\t]*=[
> \\t]*1[ \\t]*;/"))
> becomes:
> /home/user/file.h::/a_struct[ \t]*\.[ \t]*a_field[ \t]*=[ \t]*1[ \t]*;/
>
> on windows:
> d:/Profiles/user/Application Data/file.h::/a_struct[ /t]*/.[ /t]*a_field[
> /t]*=[ /t]*1[ /t]*;/
AFAIK expand-file-name doesn't take a regexp as its argument.
HTH,
--
Bastien