emacs-devel
[Top][All Lists]
Advanced

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

Re: Variable pitch mode line


From: Yuan Fu
Subject: Re: Variable pitch mode line
Date: Thu, 23 Dec 2021 13:41:38 -0800


> On Dec 23, 2021, at 1:24 PM, Tomas Hlavaty <tom@logand.com> wrote:
> 
> On Thu 23 Dec 2021 at 13:00, Yuan Fu <casouri@gmail.com> wrote:
>>> On Dec 23, 2021, at 12:56 PM, Tomas Hlavaty <tom@logand.com> wrote:
>>> On Thu 23 Dec 2021 at 12:51, Yuan Fu <casouri@gmail.com> wrote:
>>>> I’ve tried that. Info files are not complex, but they can’t be
>>>> reliably parsed 100% of the time. My code works for like 95% of the
>>>> nodes, but there are always some corner cases where it breaks.
>>> 
>>> Why doesn't texinfo html output suffer from this problem?
>> 
>> HTML are structured, where as Info is more like plain text. Just to
>> give an example, in an info file, four spaces indent text could be a
>> code block, or just an indented paragraph, there is no way telling
>> them apart. In HTML, code is wrapped in <code> (or maybe <pre>),
>> paragraphs are wrapped in <p>.
> 
> Sorry for not being clearer.
> The question is not about the difference between info and html.
> 
> The question is: why does your info to html conversion attempt work in
> 95% cases but textinfos info to html conversion work in 100% cases?

So I guess your question is about the difference between info and texinfo? 
Texinfo is also structured, makeinfo can parse a texinfo file (you probably 
already know that). Info files are, as I said, not structured and can’t be 
reliably parsed to code blocks, paragraphs, function definitions, etc. Hence my 
code only works 95% of the time. Also I’m not converting info files to html 
files, I’m just parsing info files and trying to fontify it. Here is the code, 
maybe that can explain better than my words. (I know it’s name conflicts with 
another well-know package, it’s only used by myself and not published.)

Attachment: info+.el
Description: Binary data


Yuan


reply via email to

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