unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Cecilio Pardo <cpardo@imayhem.com>, "rms@gnu.org" <rms@gnu.org>
Cc: "arne_bab@web.de" <arne_bab@web.de>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: Colorizing source code in Info manuals
Date: Wed, 11 Dec 2024 17:14:25 +0000	[thread overview]
Message-ID: <DS7PR10MB523264BC7BC0E82346D47F9BF33E2@DS7PR10MB5232.namprd10.prod.outlook.com> (raw)
In-Reply-To: <c080d342-d948-47a5-98b1-1cf49d1cb30a@imayhem.com>

[-- Attachment #1: Type: text/plain, Size: 2023 bytes --]

> > > I think some 'cheap' changes in info, such as the presentation of
> > > source code and emacs key sequences, in my unqualified opinion,
> > > are worth the effort at this point.
> >
> > Would you please say specifically what extensions you're suggesting?
> > How would one use them?  What jobs would they do?
> 
> I suggest modifying makinfo to generate markers around certain text in
> its Info output, so that we can find them (with lisp) and change text
> properties.
> 
> Those markers can be implemented using the construct that is used for
> images and indices, as Eli suggested.
> They are ignored by the standalone Info viewer when they are not
> recognized, so it will not be affected.

I'd welcome some such way to detect things in displayed
Info manuals.  A priori, it doesn't matter to me what's
used, (text properties, markers,...), as long as it works.

Picking up Lisp code examples is currently problematic.

I try doing that as an optional behavior in info+.el
(option `Info-fontify-indented-text-chars'), but because
indented contexts are different/various it's flaky.

Having code stand out, in a fixed-width font, is
especially useful if the main font for regular text is
variable-width.

> If you look at "A note for novices" on the Emacs lisp intro, which show
> many keys in the text, I think it its obvious that readability can be
> improved just by applying a different face to them.

FWIW, info+.el does that with no problem.  See attached.
(The "sunken" face is used for links to glossary terms,
so the word "region" in `indent-region' gets that face
instead of the face for code/keys.  Putting a face and
link on such glossary-term first occurrences is optional.)

Yes, fontifying such code/key occurrences uses hairy
regexps that look for different kinds of quotes and angle
brackets etc.  If Info included actual markup - whether
visible before final rendering or with text properties or
different kinds of markers, that would be preferable.

[-- Attachment #2: throw-info+-key-highlighting.png --]
[-- Type: image/png, Size: 98761 bytes --]

  reply	other threads:[~2024-12-11 17:14 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             ` Drew Adams [this message]
2024-12-06  7:38 ` Eli Zaretskii
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=DS7PR10MB523264BC7BC0E82346D47F9BF33E2@DS7PR10MB5232.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=arne_bab@web.de \
    --cc=cpardo@imayhem.com \
    --cc=emacs-devel@gnu.org \
    --cc=rms@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).