emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: emacs-orgmode@gnu.org
Subject: Re: Announcement: org-one-to-many
Date: Tue, 21 Oct 2014 18:58:38 +0200	[thread overview]
Message-ID: <87mw8pfjgh.fsf@wmi.amu.edu.pl> (raw)
In-Reply-To: <871tq1h08s.fsf@ericabrahamsen.net>


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

> Marcin Borkowski <mbork@wmi.amu.edu.pl> 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	other threads:[~2014-10-21 16:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-21 15:02 Announcement: org-one-to-many Marcin Borkowski
2014-10-21 16:10 ` Eric Abrahamsen
2014-10-21 16:58   ` Marcin Borkowski [this message]
2014-10-23 14:39 ` Daniel Clemente
2014-10-23 17:58   ` Marcin Borkowski
2014-10-24  4:06     ` Daniel Clemente
2015-02-12 22:33 ` Marcin Borkowski
2015-02-12 23:43   ` John Kitchin
2015-02-13  0:13     ` Marcin Borkowski
2015-02-13  0:34       ` John Kitchin
2015-02-13  8:44   ` Sebastien Vauban

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=87mw8pfjgh.fsf@wmi.amu.edu.pl \
    --to=mbork@wmi.amu.edu.pl \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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