unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: Kenichi Handa <handa@gnu.org>,
	17758@debbugs.gnu.org, tobias.bora@gmail.com
Subject: bug#17758: 24.3; The line isn't wrapped during printing if it contains non ascii chars
Date: Sun, 30 May 2021 06:04:28 +0200	[thread overview]
Message-ID: <87czt87tpv.fsf@gnus.org> (raw)
In-Reply-To: <AFE4551B-A066-44F5-A4AF-0ACFA1DC265C@acm.org> ("Mattias Engdegård"'s message of "Sat, 29 May 2021 10:09:27 +0200")

Mattias Engdegård <mattiase@acm.org> writes:

> Yes, this is by design. The former is the range U+0000..U+00FF and
> covers Latin-1. The latter covers ASCII and raw bytes, but no
> non-ASCII Unicode characters.
>
> It is what we get when one interval endpoint is ASCII and the other a
> raw byte; it is mainly intended for regexp matching in unibyte
> text. Since the Emacs multibyte encoding puts the raw bytes 80..FF at
> the very end of the character numbering, [\000-\377] would include
> every Unicode character (which would be very surprising) if we didn't
> have this mechanism.

It makes sense, but when playing with this, I looked at the "range" item
in the "Regexp Special" node in the elisp manual, and it doesn't look
like this quirk is documented?  (But it's a long node, perhaps I missed
something when skimming it.)

And this bit seems to actively discourage the change I did here:

--
Although a range's bound can be almost any character, it is better
style to stay within natural sequences of ASCII letters and digits
because most people have not memorized character code tables.
For example, @samp{[.-9]} is less clear than @samp{[./0-9]},
and @samp{[`-~]} is less clear than @samp{[`a-z@{|@}~]}.
Unicode character escapes can help here; for example, for most programmers
@samp{[ก-ฺ฿-๛]} is less clear than @samp{[\u0E01-\u0E3A\u0E3F-\u0E5B]}.
--

So I think a couple of lines mentioning raw bytes vs. Latin-1 would he
helpful here.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-05-30  4:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11 21:21 bug#17758: 24.3; The line isn't wrapped during printing if it contains non ascii chars Tobias Bora
2016-02-13 11:07 ` Marcin Borkowski
2021-05-29  5:38 ` Lars Ingebrigtsen
2021-05-29  6:38   ` Eli Zaretskii
2021-05-29  6:41     ` Lars Ingebrigtsen
2021-05-29  7:01       ` Eli Zaretskii
2021-05-29  8:19         ` Andreas Schwab
2021-05-29  8:09 ` Mattias Engdegård
2021-05-30  4:04   ` Lars Ingebrigtsen [this message]
2021-05-30 10:20     ` Eli Zaretskii

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=87czt87tpv.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=17758@debbugs.gnu.org \
    --cc=handa@gnu.org \
    --cc=mattiase@acm.org \
    --cc=tobias.bora@gmail.com \
    /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).