all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Óscar Fuentes" <ofv@wanadoo.es>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: minor mode for highlighting character classes such as non-ascii (bug 47455)
Date: Tue, 1 Jun 2021 16:49:21 +0000	[thread overview]
Message-ID: <SA2PR10MB447461FC5DCCF60138C502CFF33E9@SA2PR10MB4474.namprd10.prod.outlook.com> (raw)
In-Reply-To: <878s3tczpg.fsf@telefonica.net>

> > In the context of bug 47455 the idea emerged that it can be useful
> > to have a minor mode that highlights non-ascii characters.  I want
> > to ask hear for feedback: does such a mode already exist?  Can it be
> > useful to have this minor mode more general such that the highlighted
> > character classes become configurable?  Are there possible use cases
> > for this beyond non-ascii characters?

Eli> We already highlight some potentially confusing characters,
Eli> see no-break-char-display and faces nobreak-space and
Eli> nobreak-hyphen.

OF> Highlighting characters that does not belong to certain
OF> coding system would be useful to me.
OF>
OF> Sometimes I work on source code encoded as UTF-8 but they
OF> must not contain characters not encodable by windows-1252.
OF> More precisely, string literals must be composed of
OF> characters encodable by windows-1252.

That highlighting of no-break chars is limited.

1. You can't specify which no-break chars you want to highlight,
   and you can't highlight different such chars differently.

2. It is low-level highlighting, which doesn't use font-lock.

`whitespace.el' is similarly limited, e.g. coupling space and
hard-space chars, for highlighting.

More useful is something like what library `highlight-chars.el'
offers.  You can highlight any chars you like, in any way you
like.  You can highlight arbitrary chars, chars in char ranges,
char classes, or charsets.

https://www.emacswiki.org/emacs/ShowWhiteSpace#HighlightChars

https://www.emacswiki.org/emacs/download/highlight-chars.el




  parent reply	other threads:[~2021-06-01 16:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 16:16 minor mode for highlighting character classes such as non-ascii (bug 47455) Roland Winkler
2021-06-01 16:31 ` Eli Zaretskii
2021-06-01 16:32 ` Óscar Fuentes
2021-06-01 16:48   ` Eli Zaretskii
2021-06-01 16:49   ` Drew Adams [this message]
2021-06-01 16:53     ` [External] : " Eli Zaretskii
2021-06-01 18:07       ` Drew Adams
2021-06-01 18:20         ` Eli Zaretskii
2021-06-01 16:53 ` Daniel Martín
2021-06-01 17:34   ` Roland Winkler
2021-06-01 17:39     ` Eli Zaretskii
2021-06-01 17:56       ` Roland Winkler
2021-06-01 20:51 ` Juri Linkov
2021-06-01 21:45   ` Roland Winkler

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=SA2PR10MB447461FC5DCCF60138C502CFF33E9@SA2PR10MB4474.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /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.