From: "Mattias Engdegård" <mattiase@acm.org>
To: 33205@debbugs.gnu.org
Subject: bug#33205: 26.1; unibyte/multibyte missing in rx.el
Date: Tue, 30 Oct 2018 16:03:28 +0100 [thread overview]
Message-ID: <b4972b6bfb53d3a5d3783e12517001579cf90db1.camel@acm.org> (raw)
rx.el has constructs corresponding to all named regexp character
classes ([[:alnum:]], [[:digit:]], etc) except unibyte and multibyte.
This looks like a simple omission.
Or is it on purpose? The ascii and nonascii classes appear very
similar; I haven't been able to see any operational difference from
unibyte and multibyte, respectively. In fact, neither seem to work as
expected on unibyte strings or buffers:
(setq s "A\310")
"A\310"
(multibyte-string-p s)
nil
(string-match-p "A[[:nonascii:]]" s)
nil
(string-match-p "A[[:ascii:]]" s)
nil
(string-match-p "A[[:unibyte:]]" s)
nil
(string-match-p "A[[:multibyte:]]" s)
nil
(string-match-p "A." s)
0
What is going on here? ascii/nonascii and unibyte/multibyte are
supposed to be complementary; if both fail, it's because there is
nothing to match. Yet . matches.
(By the way, you may want to fix a trivial typo in a doc string in
rx.el while you are at it: `indian-tow-byte')
next reply other threads:[~2018-10-30 15:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 15:03 Mattias Engdegård [this message]
2018-10-30 17:27 ` bug#33205: 26.1; unibyte/multibyte missing in rx.el Eli Zaretskii
2018-10-31 15:27 ` Mattias Engdegård
2018-10-31 15:55 ` Eli Zaretskii
2018-11-05 16:49 ` Eli Zaretskii
2018-11-07 18:08 ` Mattias Engdegård
2018-11-07 19:10 ` Eli Zaretskii
2018-11-07 20:19 ` Mattias Engdegård
2018-11-19 20:07 ` Mattias Engdegård
2018-12-08 8:56 ` Eli Zaretskii
2018-12-08 9:23 ` Mattias Engdegård
2018-12-08 11:11 ` Eli Zaretskii
2018-12-28 18:17 ` Mattias Engdegård
2018-12-29 9:24 ` Eli Zaretskii
2018-12-29 9:23 ` Eli Zaretskii
2018-12-29 10:43 ` Mattias Engdegård
2018-12-29 14:55 ` 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=b4972b6bfb53d3a5d3783e12517001579cf90db1.camel@acm.org \
--to=mattiase@acm.org \
--cc=33205@debbugs.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).