[Top][All Lists]

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

Re: Differences between Org-Mode and Hyperbole

From: Joost Kremers
Subject: Re: Differences between Org-Mode and Hyperbole
Date: Sat, 02 Jul 2016 11:00:14 +0200
User-agent: mu4e 0.9.17; emacs

On Fri, Jul 01 2016, Eli Zaretskii wrote:
> I tried to give a few specific examples up-thread.

I had started a reply to that message but got side-tracked and never
finished it. The TL;DR is that there are aspects of Org that I suspect
can't really be separated out, there are aspects that probably could and
there are aspects that already are. (So the situation isn't as bad as
one might think after reading this thread.)

The longer version: exporting (your first example) would probably be
difficult to separate from Org mode. Although Org files are essentially
just plain text files, in order for the exporters to know which parts of
the text are headers, which are lists, which phrases need to be set in
italic or bold, etc. etc., the source file needs some markup, and this
markup happens to be Org's markup. (Personally, I would have preferred
something Markdown-based, but that's just me. Currently, it *is*
possible to change the visual appearance of markup elements in Org, so
you can define *text* to appear as italic instead of bold, but the
exporters ignore such configurations, unfortunately.)

In order to separate the exporters from the actual markup, you'd need
something similar to Pandoc[1], which has an internal
(markup-independent) representation of a document's structure and can
therefore translate X different markup languages into Y different markup
languages, but AFAIK Org doesn't have such an internal representation,
so the exporters need to rely on the markup itself.

For other parts of Org (I think you also mentioned Babel), it would
probably be easier to convert them into minor modes that aren't
dependent on Org (or on the file they're used with being an Org file).
In fact, this has already been done for at least one feature: table
editing. There's an orgtbl-mode that provides Org's table editing
facilities and that can be used outside of org-mode. (I use it
occasionally in Markdown files, for example). I think there's also
orgstruct-mode or something similar, a minor mode that provides Org's
structure handling in non-Org files (i.e., headers and lists).

The agenda (another example that came up here) is very much bound to Org
if only because the agenda information (appointments, deadlines, etc.
etc.) are stored in Org files. But that could of course be hidden from
the user entirely, if so desired.

In sum, although I know little about Org's internals, I guess it should
be possible to turn Org into a small base system containing the major
mode, combined with a number of minor modes that provide additional
functionality, which are not tied directly to org-mode itself. Such a
design might even benefit Org mode itself, because not every Org user
uses all features.

I haven't got a clue as to the amount of work that would be involved,
though, to turn Org into such a modular system.

[1]  http://www.pandoc.org

Joost Kremers
Life has its moments

reply via email to

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