emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* regexp link on windows problem
@ 2011-03-08 14:54 Rafal Florek
  2011-03-11  8:45 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Rafal Florek @ 2011-03-08 14:54 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

While writing custom function to set regexp search string for c/c++ code I 
stumbled upon a backslash to slash translation problem.
The `org-insert-link' function destroys my regexp by changing all 
backslashes to slashes. 
(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]*;/

Is this an expected behavior or a bug? Can you recommend a solution or a 
workaround?

regards,
Rafal

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

end of thread, other threads:[~2011-03-21  7:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-08 14:54 regexp link on windows problem Rafal Florek
2011-03-11  8:45 ` Bastien
2011-03-11 13:41   ` Rafal
2011-03-20 17:01     ` David Maus
2011-03-21  7:28       ` Rafal

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).