unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: minor mode for highlighting character classes such as non-ascii (bug 47455)
Date: Tue, 01 Jun 2021 19:48:01 +0300	[thread overview]
Message-ID: <83lf7tzg3i.fsf@gnu.org> (raw)
In-Reply-To: <878s3tczpg.fsf@telefonica.net> (message from Óscar Fuentes on Tue, 01 Jun 2021 18:32:59 +0200)

> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Tue, 01 Jun 2021 18:32:59 +0200
> 
> "Roland Winkler" <winkler@gnu.org> writes:
> 
> > 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?
> 
> Highlighting characters that does not belong to certain coding system
> would be useful to me.

Character cannot belong to a coding system.  I think you mean
"characters that cannot be safely encoded by a coding system".

> Sometimes I work on source code encoded as UTF-8 but they must not
> contain characters not encodable by windows-1252. More precisely, string
> literals must be composed of characters encodable by windows-1252.

We already make such tests when you save the buffer, so the code to do
that exists, and can be reused.  But I'm not sure this highlighting
couldn't turn out to be somewhat expensive.



  reply	other threads:[~2021-06-01 16:48 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 [this message]
2021-06-01 16:49   ` [External] : " Drew Adams
2021-06-01 16:53     ` 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

  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=83lf7tzg3i.fsf@gnu.org \
    --to=eliz@gnu.org \
    --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 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).