[Top][All Lists]

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

Re: Limitations on using Org mode in buffers mixing Org markup with non-

From: Eli Zaretskii
Subject: Re: Limitations on using Org mode in buffers mixing Org markup with non-Org markup (was: Convert README.org to plain text README while installing package)
Date: Sat, 18 Jun 2022 10:10:44 +0300

> From: Ihor Radchenko <yantar92@gmail.com>
> Cc: theophilusx@gmail.com,  acm@muc.de,  emacs-devel@gnu.org
> Date: Sat, 18 Jun 2022 12:40:10 +0800
> > Neither of the other markup modes is being proposed for viewing and
> > editing documents that were not originally edited under those modes.
> > By contrast, there's a fraction of Emacs contributors and developers
> > who repeatedly suggest to use Org for documents that were not
> > originally written in Org.  A notable example (not the only one) is
> > recent discussions of turning on Org when visiting NEWS files.
> Do I understand correctly that users would like to have some Org
> features (like fontification) in text that partially follows Org markup,
> but not fully?

It's more than that.  People suggest to start using Org for files that
were not written under Org mode, and the reason is not just
fontifications, but also Org outline-related and other commands.  IIUC
what you mean by "Org markup", it basically isn't used at all in those
files (but would probably "seep in" given enough time, if we indeed
begin using Org there).

> If so, Org mode cannot be used there as a major mode. non-Org parts of
> syntax will cause undefined behavior. Which is to be expected as
> major mode (every major mode) uses certain assumptions about the text in
> buffer. Even text-mode will behave weirdly if binary data is mixed with
> plain text. Org major mode expects text in buffers to be using Org
> markup.


> On the other hand, some parts of Org functionality are available in a
> form of minor modes or individual commands. As usual, minor modes are
> less demanding on the text in buffer.
> AFAIK, we have the following functionality exposed to non-Org buffers:
> - org-open-at-point-global/org-insert-link-global commands
> - orgtbl-mode to edit tables, which use Org table syntax outside Org mode
> - (ELPA) orgalist mode to edit lists written using Org list syntax outside 
> Org mode
> - (MELPA) org-msg mode to edit and send messages using Org markup (it
>   exports to html mime parts)
> - outline minor mode share a lot of functionality with Org without
>   relying on Org markup. AFAIK, some Org features have been ported back
>   to outline mode as well.

Indeed, files that currently use Outline mode are the ones where the
above proposals are voiced most frequently.

The other minor modes are not necessarily relevant; at least I don't
recall those parts of Org's functionality being used as the reasons
for using Org where it wasn't before.

> People who request Org mode to be used in non-Org buffers probably have
> a specific subset of useful Org features in mind. I'd ask them which
> features they want to and then consider exposing them out from Org mode
> into minor mode (if not yet covered by the above).

Thanks, will keep this in mind next time such an issue comes up.

> > If you think these ideas are problematic from the POV of Org
> > developers, please voice this opinion whenever such proposals are
> > brought up.  Those proposals, and in general the proposals to use Org
> > widely in unrelated contexts, is what I had in mind all the time in
> > this discussion.  Perhaps now you can better understand some of my
> > comments and responses.
> I do understand you comments now. However, I do not follow emacs-devel
> closely. So, it would be more efficient to CC Org ML in such
> discussions.

Fair enough.

> The convention for indicating "markup" in emails is associating the
> correct mime-type to the message part. If it is html, the mail agent
> should render html. If it is Org, Org can be rendered. If it is plain
> text, the behavior is undefined in principle - people sending plain text
> should make the text readable as plain text in text-mode (Org can be
> made readable usually, but same can be said for e.g. Markdown).

The difference between HTML and Org is that all MUAs support the
former, whereas Org can only be supported by Emacs-based MUA (and is
not supported by all Emacs-based MUA: e.g., Rmail doesn't currently
support it), and then only if the mime-type has been set correctly.

reply via email to

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