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 14:27:44 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.0.1


On 10/28/13, 2:12 PM, Achim Gratz wrote:
Peter Davis writes:
	    # hyperlinks
	    s/\[\[([^]]*)\]\]/[[file:$1.org][$1]]/g;
Try this to fix the links maybe:

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

Excellent! I modified it slightly to keep the spaces in the display string:

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

Thanks, Achim!

-pd

-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

reply via email to

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