emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <dmaus@ictsoc.de>
To: Rafal <raf@irmak.com.pl>
Cc: emacs-orgmode@gnu.org
Subject: Re: regexp link on windows problem
Date: Sun, 20 Mar 2011 18:01:50 +0100	[thread overview]
Message-ID: <87d3ll4tfl.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <loom.20110311T141204-597@post.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]

At Fri, 11 Mar 2011 13:41:45 +0000 (UTC),
Rafal wrote:
> Bastien <bzg <at> altern.org> writes:
> Hi Bastien,
> >
> > Can you give an example?
> >
> So I'm trying to write a custom function to set regexp search string for c/c++
> code by writing org-create-file-search-functions hook. (code #1 below )
> After using the hook by issuing org-store-link in c/c++ buffer, and
> org-insert-link in org-mode buffer I noticed that the link has slashes instead
> of backslashes in my regexp.
> So I delved into the org-insert-link code and found out that it calls
> expand-file-name on the whole link (filename::regexp) which translates my
> regexp's backslashes to slashes. It happens only on emacs on windows,
> under linux it is ok.
> I also experimented by changing the culprit lines of org-store-link and
> it helped (code #2 below) but it seems to be too destructive.
> So I'm wondering if it is a bug that may be fixed or my way of doing
> it is wrong?

I suppose more a glitch.  AFAIK there is currently no distinction
between real link target paths (files, directories etc.) and
expressions that would qualify as a query part of a link (e.g. like
the regexp).

Maybe fiddling with percent escaping (Cf. org-link-escape and
org-link-unescape) might provide a way to protect the slashes from

  -- David
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]

  reply	other threads:[~2011-03-20 17:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-03-21  7:28       ` Rafal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d3ll4tfl.wl%dmaus@ictsoc.de \
    --to=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=raf@irmak.com.pl \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).