emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Importing from Oddmuse?


From: Peter Davis
Subject: Re: [O] Importing from Oddmuse?
Date: Mon, 28 Oct 2013 16:33:02 -0400


On Mon, Oct 28, 2013 at 4:26 PM, Achim Gratz <address@hidden> wrote:
Peter Davis writes:
> That was the first thing I tried, and Perl complained about an
> undefined variable. I may have made a typo though.

Nope, my error.  $1 gets clobbered by the second replacement.  So you'd
want what you wrote or somewhat shorter:

# hyperlinks
s/\[\[([^]]*)\]\]/
  my ($l, $o) = ($1, $1);
  $l =~ s: :_:g;
  "[[file:$l.org][$o]]"/gex;


Yes, that works beautifully, and is nice and concise.

Thank you!

-pd

--
----
The Tech Curmudgeon
http://www.techcurmudgeon.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]