[Top][All Lists]

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

Re: Convert README.org to plain text README while installing package

From: Ihor Radchenko
Subject: Re: Convert README.org to plain text README while installing package
Date: Mon, 06 Jun 2022 08:59:09 +0800

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Ihor Radchenko <yantar92@gmail.com> writes:
>> We, Org devs, are working on modularizing Org.
>> Currently, extracting fontification is not trivial because it depends on
>> most of Org being loaded.
>> If everything goes as planned (famous last words), fontification will
>> only require Org parser and Org fontification library.
> Perhaps it would be a smaller project to just make a super-simple Org
> parser/displayer to handle what we typically see in a README.org file?
> I.e., something that does nice fontification of #+ blocks and ***
> headings and =this= (etc.), and then just removes all the rest of the
> markup.
> I mean, it sounds like it could be a very small, lightweight library to
> get to a 90% solution that would be acceptable to show in the *Help*
> buffer.  And then we wouldn't have to convert anything.

In short, no.

Org is not context free, so we at least need org-element.el parser to
handle various edge cases. In particular, there are quite annoying edge
cases with fontification of links containing */- markup symbols.

One could extract a subset of allowed Org elements from org-element.el,
but it would also involve refactoring org-element--current-element,
making the whole effort a maintenance burden against future changes in

And even if that job is done, we cannot remove links from the parser.
Yet, according to the previous benchmarks in this thread, loading links
(that is what org-modules contains by default) is giving the largest

IMHO, the proposed lightweight library will require similar efforts to
modularizing Org + loading it with some minimal variable settings (for
example, org-modules set to nil).


reply via email to

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