From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Nicer looking Info - html manual +css Date: Sun, 19 Jan 2020 21:13:52 +0200 Message-ID: <83iml7xnrj.fsf@gnu.org> References: <7930E155-E181-4D4C-B39E-5A05F732D667@traduction-libre.org> <83a76jzdd2.fsf@gnu.org> <83v9p7xuy4.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="69864"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefan@marxist.se, emacs-devel@gnu.org To: ndame Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 19 20:14:29 2020 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 1itG1l-000I99-Ag for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Jan 2020 20:14:29 +0100 Original-Received: from localhost ([::1]:52880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itG1k-0007oC-Cr for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Jan 2020 14:14:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36160) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itG17-00073Z-7u for emacs-devel@gnu.org; Sun, 19 Jan 2020 14:13:50 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1itG16-0006yN-EI; Sun, 19 Jan 2020 14:13:48 -0500 Original-Received: from [176.228.60.248] (port=3183 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1itG15-0005dF-JN; Sun, 19 Jan 2020 14:13:48 -0500 In-reply-to: (message from ndame on Sun, 19 Jan 2020 18:48:34 +0000 (GMT)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:244392 Archived-At: > Date: Sun, 19 Jan 2020 18:48:34 +0000 (GMT) > From: ndame > Cc: "emacs-devel@gnu.org" , > "stefan@marxist.se" > > Thinking about this it occurred to me there is a simple heuristic > solution without involving the Texinfo folks. > > Apparently @example is rendered after an empty line with a 5 spaces > indent. So it is easy to detect code sections, by looking for empty > lines followed by +5 spaces indented lines. The code section starts at > the empty line and ends when the indent is 5 spaces less again. That won't work in general, because there are other kinds of markup that end up indented like @example. And even @example is not always indented exactly 5 spaces, because the surrounding markup can affect that. E.g., look at the code fragment around line 127 of the "Time Conversion" node in the ELisp manual. We cannot build a feature on such shaky foundations. When 'makeinfo' produces the Info output, the markup information is all but lost, and nothing can bring it back.