From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cecilio Pardo Newsgroups: gmane.emacs.devel Subject: Re: Colorizing source code in Info manuals Date: Fri, 6 Dec 2024 09:52:41 +0100 Message-ID: <18de1f26-7ae5-4155-bd34-4f2c98e82632@imayhem.com> References: <86zfl9l0rj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30850"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 06 09:53:16 2024 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 1tJU5M-0007xI-7D for ged-emacs-devel@m.gmane-mx.org; Fri, 06 Dec 2024 09:53:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJU4u-0002oO-Eo; Fri, 06 Dec 2024 03:52:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJU4s-0002o4-MX for emacs-devel@gnu.org; Fri, 06 Dec 2024 03:52:46 -0500 Original-Received: from mail.imayhem.com ([82.223.54.191] helo=zealous-pike.82-223-54-191.plesk.page) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tJU4p-0002bI-TZ; Fri, 06 Dec 2024 03:52:46 -0500 Original-Received: from [192.168.68.104] (111.red-88-21-7.staticip.rima-tde.net [88.21.7.111]) by zealous-pike.82-223-54-191.plesk.page (Postfix) with ESMTPSA id 944FF80114; Fri, 6 Dec 2024 08:52:41 +0000 (UTC) Authentication-Results: zealous-pike.82-223-54-191.plesk.page; spf=pass (sender IP is 88.21.7.111) smtp.mailfrom=cpardo@imayhem.com smtp.helo=[192.168.68.104] Received-SPF: pass (zealous-pike.82-223-54-191.plesk.page: connection is authenticated) Content-Language: es-ES In-Reply-To: <86zfl9l0rj.fsf@gnu.org> Received-SPF: pass client-ip=82.223.54.191; envelope-from=cpardo@imayhem.com; helo=zealous-pike.82-223-54-191.plesk.page 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326124 Archived-At: On 06/12/2024 8:38, Eli Zaretskii wrote: > I'm not sure "is not going to add features like color to the Info > format" is correct. Texinfo does support syntax-highlighting of code > snippets in HTML output (for now as an experimental feature), so it is > not outlandish to assume something similar can be done for the Info > format as well. It says so in the texinfo manual: Can the Info format be extended to support fonts, colors or reflowable text? [...] Info's core purpose is to display documentation on text terminals. If you want more, you are recommended to use the HTML output from ‘texi2any’ instead. Maybe they can add a 'subformat'. > I think this should be discussed with the Texinfo developers, not > here. I can think about at least two possible ways of implementing > this in Texinfo: > > . makeinfo could mark the code blocks with special markers, similar > to what it already does with image specs and indices > . makeinfo could produce ANSI color escape sequences in the Info > output, driven by the same syntax-highlighting machinery already > used for HTML I'll take a look at what it does with images and take it to them. Will try to include a patch, but I can't really perl.