From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Colorizing source code in Info manuals Date: Fri, 06 Dec 2024 13:42:33 +0200 Message-ID: <86h67hkpg6.fsf@gnu.org> References: <86zfl9l0rj.fsf@gnu.org> <18de1f26-7ae5-4155-bd34-4f2c98e82632@imayhem.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36213"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Cecilio Pardo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 06 12:43: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 1tJWjs-0009HJ-7W for ged-emacs-devel@m.gmane-mx.org; Fri, 06 Dec 2024 12:43:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJWjX-00029U-5G; Fri, 06 Dec 2024 06:42:55 -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 1tJWjV-00029F-QL for emacs-devel@gnu.org; Fri, 06 Dec 2024 06:42:53 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJWjT-0007NQ-Ul; Fri, 06 Dec 2024 06:42:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=DtbWgpfcuvuYS6OHztg2wuk14nPJO1DLsbamyn78+1s=; b=WOMT9abiTHeSWDq7AHiE t4OzCm/1Zc468m7jKxL1w0oSqTIk9YWQbwcQT5UbN0msyeUp+MTYynITL6VGy6SOL7H1nODAVDhi8 z2tdLq8W0TfRjREuwRTTPAGdnaQff0OUDv1DfKz7iAZHUlyHQt8u+CwOiQRHKZs4bHXKAOquVQGkX yfl+1xeN49UpLWt/XlmB5/DuX+OFcJa00U028yygXFc2uHH80i+rmcH6zurKKZ6GSXTr4p3FIxWwE +/MfkFDLLYBMIZAxF7GqSk4AoPRKijaECBnEWaOvx4GKJjg73eRJbRvr/pn8M8g1ZE8hF2sMvrsS4 cQQS6P7FH4iTCg==; In-Reply-To: <18de1f26-7ae5-4155-bd34-4f2c98e82632@imayhem.com> (message from Cecilio Pardo on Fri, 6 Dec 2024 09:52:41 +0100) 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:326132 Archived-At: > Date: Fri, 6 Dec 2024 09:52:41 +0100 > Cc: emacs-devel@gnu.org > From: Cecilio Pardo > > 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'. The "^@^H[NAME CONTENTS ^@^H]" cookies are already in the Info format, so I'm not necessarily talking about extensions. > > 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. Thanks.