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 15:28:40 -0800


> On Dec 23, 2021, at 3:00 PM, Tomas Hlavaty <tom@logand.com> wrote:
> 
> On Thu 23 Dec 2021 at 13:41, Yuan Fu <casouri@gmail.com> wrote:
>>> 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.)
> 
> I see, textinfo does not use info files for html conversion (it uses
> texi files) and the conversion from texi to info looses important
> information, is that right?

Yes.

> 
> btw, for example in slime.info, I see paragraphs delimited with empty
> line.  Also 3 spaces for indenting paragraphs and 5 spaces for code.  Is
> that not always the case?

Yes. But sometimes paragraphs are indented to 5 spaces, and we can’t tell if 
its code or paragraph. I don’t remember concert cases, but maybe a list in a 
paragraph, which indents more than the paragraph it is in. There are other 
breakages, of course. If you enable info-pretty-mode in info+.el and try to use 
it for a while, eventually you will encounter some breakage. In my case, I 
encountered some breakages and have no way to fix them. There is just not 
enough information.

Yuan




reply via email to

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