unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Cecilio Pardo <cpardo@imayhem.com>
Cc: emacs-devel@gnu.org
Subject: Re: Colorizing source code in Info manuals
Date: Fri, 06 Dec 2024 09:38:08 +0200	[thread overview]
Message-ID: <86zfl9l0rj.fsf@gnu.org> (raw)
In-Reply-To: <e264c217-9b3d-4dbc-8d7e-5a772b73d9d1@imayhem.com> (message from Cecilio Pardo on Thu, 5 Dec 2024 23:06:37 +0100)

> Date: Thu, 5 Dec 2024 23:06:37 +0100
> From: Cecilio Pardo <cpardo@imayhem.com>
> 
> As texinfo is not going to add features like color to the Info format,
> I think maybe emacs could add some itself.

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.

> For example, the Emacs Lisp Intro uses @smallexample blocks for
> presenting lisp code. I modified makeinfo more or less successfully to
> generate a file with the line numbers where these blocks start. With
> this kind of information, emacs could fontify the source code.
> 
> Does this sound good?

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



  parent reply	other threads:[~2024-12-06  7:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05 22:06 Colorizing source code in Info manuals Cecilio Pardo
2024-12-05 22:33 ` Dr. Arne Babenhauserheide
2024-12-06  0:31   ` Arsen Arsenović
2024-12-06  8:39   ` Cecilio Pardo
2024-12-08  5:17     ` Richard Stallman
2024-12-08 18:08       ` Cecilio Pardo
2024-12-08 19:58         ` Björn Bidar
2024-12-11  4:33         ` Richard Stallman
2024-12-11 10:41           ` Cecilio Pardo
2024-12-11 21:04             ` chad
2024-12-11  4:33         ` Richard Stallman
2024-12-11 11:01           ` Cecilio Pardo
2024-12-11 17:14             ` [External] : " Drew Adams
2024-12-06  7:38 ` Eli Zaretskii [this message]
2024-12-06  8:52   ` Cecilio Pardo
2024-12-06 11:42     ` Eli Zaretskii
2024-12-09  4:56 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86zfl9l0rj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=cpardo@imayhem.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).