From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Hlavaty Newsgroups: gmane.emacs.devel Subject: Re: Variable pitch mode line Date: Fri, 24 Dec 2021 00:00:57 +0100 Message-ID: <87o857apue.fsf@logand.com> References: <87zgosdbo1.fsf@gnus.org> <86mtkszhnq.fsf@mail.linkov.net> <87o858e5r2.fsf@gnu.org> <86fsqjcqd8.fsf@mail.linkov.net> <87zgorawar.fsf@logand.com> <8B7890FE-9DFB-4282-8391-955032220234@gmail.com> <87wnjvavm2.fsf@logand.com> <87r1a3aubt.fsf@logand.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25178"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Tassilo Horn , Lars Ingebrigtsen , Emacs developers , Juri Linkov To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 24 00:03:14 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n0X7C-0006NJ-BV for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Dec 2021 00:03:14 +0100 Original-Received: from localhost ([::1]:40356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0X7A-0002y6-Ab for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Dec 2021 18:03:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0X59-00017k-LR for emacs-devel@gnu.org; Thu, 23 Dec 2021 18:01:07 -0500 Original-Received: from logand.com ([37.48.87.44]:54828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0X55-0002ug-PU; Thu, 23 Dec 2021 18:01:07 -0500 Original-Received: by logand.com (Postfix, from userid 1001) id 7233B19EC74; Fri, 24 Dec 2021 00:00:59 +0100 (CET) X-Mailer: emacs 27.2 (via feedmail 11-beta-1 I) In-Reply-To: Received-SPF: pass client-ip=37.48.87.44; envelope-from=tom@logand.com; helo=logand.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:283051 Archived-At: On Thu 23 Dec 2021 at 13:41, Yuan Fu wrote: >> On Dec 23, 2021, at 1:24 PM, Tomas Hlavaty wrote: >> On Thu 23 Dec 2021 at 13:00, Yuan Fu wrote: >>>> On Dec 23, 2021, at 12:56 PM, Tomas Hlavaty wrote: >>>> On Thu 23 Dec 2021 at 12:51, Yuan Fu wrote: >>>>> I=E2=80=99ve tried that. Info files are not complex, but they can=E2= =80=99t 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. >>>>=20 >>>> Why doesn't texinfo html output suffer from this problem? >>>=20 >>> 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 (or maybe
),
>>> paragraphs are wrapped in 

. >>=20 >> Sorry for not being clearer. >> The question is not about the difference between info and html. >>=20 >> 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=E2=80=99t be reliably parsed to code blocks, paragraph= s, > function definitions, etc. Hence my code only works 95% of the > time. Also I=E2=80=99m not converting info files to html files, I=E2=80= =99m just > parsing info files and trying to fontify it. Here is the code, maybe > that can explain better than my words. (I know it=E2=80=99s name conflicts > with another well-know package, it=E2=80=99s 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? 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?