emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Announcement: org-one-to-many


From: Marcin Borkowski
Subject: Re: [O] Announcement: org-one-to-many
Date: Tue, 21 Oct 2014 18:58:38 +0200

On 2014-10-21, at 18:10, Eric Abrahamsen wrote:

> Marcin Borkowski <address@hidden> writes:
>
>> Hi all,
>>
>> a long time ago I asked here about a way to split an Org file into a
>> bunch of smaller ones.  One of the answers I got was that the tricky
>> part is maintaining internal links in a reasonable way.
>>
>> It is probably overoptimistic on my side, but it seems that this problem
>> is solved now.  The code is not very elegant, and I will be actively
>> working on it (I want to write an org-to-e-learning exporter, based on
>> the HTML one, and this is a small part of that effort), but here it is
>> for testing/review/bug reports/feature requests/any other kind of
>> feedback.
>>
>> And here it is: https://github.com/mbork/org-one-to-many
>
> Oooh, cool. I'll look forward to reading it!

Thanks, but don't expect too much, I'm still learning Elisp.  I'll be
thankful for your feedback!

My idea to solve the problem of links is that I first mark the parts
which will be exported to various files using text property
:otm-filename, then walk all the internal links (in reverse order, which
is important, since I first gather them in a list, so I don't want to
mess the begin/end positions of the links) and change them according to
that property of their destination (unless they point to the same
portion, in which case they stay the same), and only then split the file
(again using the text property).  This might not be the most elegant
thing in the world, but it seems to work.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



reply via email to

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