all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Po Lu <luangruo@yahoo.com>, Juri Linkov <juri@linkov.net>
Cc: Yuan Fu <casouri@gmail.com>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	"tsdh@gnu.org" <tsdh@gnu.org>, Eli Zaretskii <eliz@gnu.org>,
	Lars Ingebrigtsen <larsi@gnus.org>
Subject: RE: [External] : Re: HTML info
Date: Fri, 24 Dec 2021 19:16:51 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488B6387E7DDF5CF8293D25F37F9@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87czlme40c.fsf@yahoo.com>

> Doesn't Drew Adams (copied in) maintain a package that allows displaying
> Info documentation in a variable pitch face?

Well, not really.  Sort of.

I tried to base guessing whether something might
be a candidate for using a fixed-width font on
indentation level.  The idea is to use that for
code, ASCII art, tables, etc.

But as Eli, and experimentation with more Info
manuals, pointed out, that heuristic isn't very
reliable.

As Eli has also said here, though Texinfo might
have some useful information about such things,
much of that gets lost in the translation to
Info output.  Just like vanilla `info.el', my
code works with the Info output.
___

However, what my code does can be useful for
some manuals, such as the Elisp manual.  Its
guesses based on indentation level do a pretty
good job there.

The code is in `info+.el'.  To try it, turn on
option `Info-fontify-indented-text-chars'.  Then
text indented at least that many chars gets face
`info-indented-text'.  If you then also turn on
minor mode `Info-variable-pitch-text-mode', the
rest of the text will be variable pitch.

In the Elisp manual this generally means blocks
of code and ASCII-art diagrams use fixed-pitch.
But in general there's no telling what might be
indented at any given level, so caveat emptor.

Option `Info-fontify-indented-text-manuals'
lets you specify which manuals fontify indented
text with a fixed-pitch face.  The default is
just the Elisp manual.

Think of this as an experimental feature.  Try
it, to see the effect.  If you like it, you can
have it turned on only in particular manuals.

Doc string of `Info-fontify-indented-text-chars':
___

A number means fontify text indented at least that many chars.
The default value is nil, which does nothing - no such fontifying.

The indented text is fontified with face `info-indented-text', which
by default uses a fixed-pitch font.

This can be useful especially if minor mode
`Info-variable-pitch-text-mode' is enabled, by keeping indented code
block, ASCII-art diagrams etc. in a fixed-pitch font.

A value of 10 works well for the Elisp manual.  But be aware that no
number works well across multiple manuals, because indented text at
any level is not necessarily something you want to fontify.

This fontification is not done for nodes named `Top', in order to
avoid fontifying continuation lines of menu-item descriptions.
___

Code:

https://www.emacswiki.org/emacs/download/info%2b.el

  reply	other threads:[~2021-12-24 19:16 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 13:14 Variable pitch mode line Lars Ingebrigtsen
2021-12-22 14:01 ` Eli Zaretskii
2021-12-22 15:21 ` Stefan Kangas
2021-12-22 17:34 ` Juri Linkov
2021-12-22 20:14   ` Tassilo Horn
2021-12-22 20:42     ` Lars Ingebrigtsen
2021-12-22 20:49       ` Tassilo Horn
2021-12-23 17:16     ` Juri Linkov
2021-12-23 17:52       ` Stefan Kangas
2021-12-23 18:26         ` Eli Zaretskii
2021-12-23 18:38           ` Juri Linkov
2021-12-23 19:20             ` Eli Zaretskii
2021-12-23 19:39               ` Juri Linkov
2021-12-23 19:48                 ` Eli Zaretskii
2021-12-23 19:55                   ` Juri Linkov
2021-12-23 18:27       ` Lars Ingebrigtsen
2021-12-23 18:35         ` Juri Linkov
2021-12-23 18:47           ` Lars Ingebrigtsen
2021-12-23 19:00             ` Juri Linkov
2021-12-23 19:50               ` Stefan Monnier
2021-12-23 19:56                 ` Eli Zaretskii
2021-12-23 20:12                   ` Stefan Monnier
2021-12-23 20:17                     ` Eli Zaretskii
2021-12-23 20:48                       ` HTML info Yuan Fu
2021-12-24  8:34                         ` Juri Linkov
2021-12-24  8:48                           ` Eli Zaretskii
2021-12-24  9:02                           ` Lars Ingebrigtsen
2021-12-24  9:38                           ` Po Lu
2021-12-24 19:16                             ` Drew Adams [this message]
2021-12-25 18:01                           ` Juri Linkov
2021-12-26  9:50                             ` Yuan Fu
2021-12-26 10:20                               ` Eli Zaretskii
2021-12-26 17:30                                 ` Juri Linkov
2021-12-27 18:32                                   ` Juri Linkov
2021-12-26 11:48                               ` Lars Ingebrigtsen
2021-12-26 11:53                                 ` Eli Zaretskii
2021-12-26 11:57                                   ` Lars Ingebrigtsen
2021-12-26 12:07                                     ` Eli Zaretskii
2021-12-24  8:21                 ` Variable pitch mode line Juri Linkov
2021-12-24 11:42                   ` Eli Zaretskii
2021-12-24 12:08                     ` Eli Zaretskii
2021-12-24 12:27                     ` Lars Ingebrigtsen
2021-12-24 12:32                       ` Po Lu
2021-12-24 12:53                         ` Lars Ingebrigtsen
2021-12-24 13:12                           ` Po Lu
2021-12-24 13:34                             ` Lars Ingebrigtsen
2021-12-24 13:36                               ` Po Lu
2021-12-24 13:45                               ` Eli Zaretskii
2021-12-24 13:48                                 ` Lars Ingebrigtsen
2021-12-24 13:57                                   ` Eli Zaretskii
2021-12-24 14:01                                     ` Lars Ingebrigtsen
2021-12-24 14:33                                       ` Eli Zaretskii
2021-12-24 15:05                                         ` Lars Ingebrigtsen
2021-12-24 15:16                                           ` Eli Zaretskii
2021-12-24 15:43                                             ` Lars Ingebrigtsen
2021-12-24 15:44                                               ` Lars Ingebrigtsen
2021-12-24 17:03                                               ` Eli Zaretskii
2021-12-25 11:59                                                 ` Lars Ingebrigtsen
2021-12-25 12:07                                                   ` Eli Zaretskii
2021-12-26 11:28                                                     ` Lars Ingebrigtsen
2021-12-26 11:43                                                       ` Eli Zaretskii
2021-12-26 11:51                                                         ` Lars Ingebrigtsen
2021-12-26 11:56                                                           ` Eli Zaretskii
2021-12-26 12:02                                                             ` Lars Ingebrigtsen
2021-12-26 12:11                                                               ` Eli Zaretskii
2021-12-26 12:25                                                                 ` Lars Ingebrigtsen
2021-12-26 12:59                                                                   ` Eli Zaretskii
2021-12-27 10:32                                                                     ` Lars Ingebrigtsen
2021-12-27 14:52                                                                       ` Eli Zaretskii
2021-12-26 15:32                                                       ` Stefan Monnier
2021-12-25 17:54                             ` Juri Linkov
2021-12-26  1:27                               ` Po Lu
2021-12-26  7:39                                 ` Juri Linkov
2021-12-26  8:46                                   ` Eli Zaretskii
2021-12-23 19:27       ` Tassilo Horn
2021-12-23 19:39         ` Eli Zaretskii
2021-12-23 19:48           ` Tassilo Horn
2021-12-23 20:02             ` Eli Zaretskii
2021-12-23 20:13               ` Eli Zaretskii
2021-12-23 19:45         ` Juri Linkov
2021-12-23 20:41       ` Tomas Hlavaty
2021-12-23 20:51         ` Yuan Fu
2021-12-23 20:56           ` Tomas Hlavaty
2021-12-23 21:00             ` Yuan Fu
2021-12-23 21:24               ` Tomas Hlavaty
2021-12-23 21:41                 ` Yuan Fu
2021-12-23 23:00                   ` Tomas Hlavaty
2021-12-23 23:28                     ` Yuan Fu
2021-12-24  7:14                       ` Tomas Hlavaty
2021-12-24  7:05                     ` Eli Zaretskii
2021-12-24  0:50                   ` [External] : " Drew Adams
2021-12-24  3:58                     ` Yuan Fu
2021-12-24  5:00                       ` Drew Adams
2021-12-24  6:53             ` Eli Zaretskii
2021-12-24  6:50         ` Eli Zaretskii
2021-12-24  7:55           ` Tomas Hlavaty

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

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

  git send-email \
    --in-reply-to=SJ0PR10MB5488B6387E7DDF5CF8293D25F37F9@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=tsdh@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.