GNU bug report logs - #34391
26.1; [[:cntrl:]] does not match DEL contrary to documentation

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Fri, 8 Feb 2019 20:51:02 UTC

Severity: minor

Found in version 26.1

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34391 in the body.
You can then email your comments to 34391 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34391; Package emacs. (Fri, 08 Feb 2019 20:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mattias Engdegård <mattiase <at> acm.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 08 Feb 2019 20:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; [[:cntrl:]] does not match DEL contrary to documentation
Date: Fri, 8 Feb 2019 21:49:56 +0100
Unlike every other regexp engines and POSIX regexps, and contrary to the documentation, [[:cntrl:]] does not match DEL (\177) in Emacs. (It does not match the C1 controls in U+0080..009f either, but at least there is no such claim.)

Assuming that it is not worth breaking existing code by changing the behaviour, let us at least fix the manual which says:

‘[:cntrl:]’
     This matches any ASCII control character.

which is inaccurate. The error also made it into the doc string of `rx'.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34391; Package emacs. (Fri, 08 Feb 2019 21:05:01 GMT) Full text and rfc822 format available.

Message #8 received at 34391 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: 34391 <at> debbugs.gnu.org
Subject: Re: bug#34391: Acknowledgement (26.1; [[:cntrl:]] does not match DEL
 contrary to documentation)
Date: Fri, 8 Feb 2019 22:04:32 +0100
[Message part 1 (text/plain, inline)]
Proposed patch, again assuming that the [:cntrl:] behaviour cannot be modified. Is that true?
It may have come up before since a comment in a test makes explicit reference to it (see patch), but I cannot find any discussion.

[0001-Document-that-cntrl-does-not-match-DEL-Bug-34391.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34391; Package emacs. (Fri, 08 Feb 2019 21:59:02 GMT) Full text and rfc822 format available.

Message #11 received at 34391 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 34391 <at> debbugs.gnu.org
Subject: Re: bug#34391: Acknowledgement (26.1;
 [[:cntrl:]] does not match DEL contrary to documentation)
Date: Fri, 08 Feb 2019 23:58:00 +0200
> From: Mattias Engdegård <mattiase <at> acm.org>
> Date: Fri, 8 Feb 2019 22:04:32 +0100
> 
> Proposed patch, again assuming that the [:cntrl:] behaviour cannot be modified. Is that true?
> It may have come up before since a comment in a test makes explicit reference to it (see patch), but I cannot find any discussion.

I think you don't find any discussion because in some quarters this
behavior is the only one that makes sense: "ASCII control characters"
is interpreted as "ASCII characters whose codepoints are below 32
decimal".  Which is why I prefer to amend the documentation to say
that, instead of excluding DEL explicitly.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34391; Package emacs. (Sun, 10 Feb 2019 09:57:02 GMT) Full text and rfc822 format available.

Message #14 received at 34391 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34391 <at> debbugs.gnu.org
Subject: Re: bug#34391: Acknowledgement (26.1; [[:cntrl:]] does not match DEL
 contrary to documentation)
Date: Sun, 10 Feb 2019 10:56:07 +0100
[Message part 1 (text/plain, inline)]
8 feb. 2019 kl. 22.58 skrev Eli Zaretskii <eliz <at> gnu.org>:
> 
> I think you don't find any discussion because in some quarters this
> behavior is the only one that makes sense: "ASCII control characters"
> is interpreted as "ASCII characters whose codepoints are below 32
> decimal".  Which is why I prefer to amend the documentation to say
> that, instead of excluding DEL explicitly.

Well, DEL has been a control characters for more than half a century now, but you are right: documentation should be maximally clear to everyone, not just to those who think the way we think they ought to.
Would this patch do?
[0001-PATCH-Document-that-cntrl-does-not-match-DEL-Bug-343.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34391; Package emacs. (Sun, 10 Feb 2019 15:21:01 GMT) Full text and rfc822 format available.

Message #17 received at 34391 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 34391 <at> debbugs.gnu.org
Subject: Re: bug#34391: Acknowledgement (26.1; [[:cntrl:]] does not match DEL
 contrary to documentation)
Date: Sun, 10 Feb 2019 17:19:52 +0200
> From: Mattias Engdegård <mattiase <at> acm.org>
> Date: Sun, 10 Feb 2019 10:56:07 +0100
> Cc: 34391 <at> debbugs.gnu.org
> 
> > I think you don't find any discussion because in some quarters this
> > behavior is the only one that makes sense: "ASCII control characters"
> > is interpreted as "ASCII characters whose codepoints are below 32
> > decimal".  Which is why I prefer to amend the documentation to say
> > that, instead of excluding DEL explicitly.
> 
> Well, DEL has been a control characters for more than half a century now, but you are right: documentation should be maximally clear to everyone, not just to those who think the way we think they ought to.
> Would this patch do?

Yes, LGTM.  Thanks.  (Be sure to mention the bug number in the log
message.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34391; Package emacs. (Sun, 10 Feb 2019 22:43:02 GMT) Full text and rfc822 format available.

Message #20 received at 34391 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34391 <at> debbugs.gnu.org
Subject: Re: bug#34391: Acknowledgement (26.1; [[:cntrl:]] does not match DEL
 contrary to documentation)
Date: Sun, 10 Feb 2019 23:42:44 +0100
10 feb. 2019 kl. 16.19 skrev Eli Zaretskii <eliz <at> gnu.org>:
> 
> Yes, LGTM.  Thanks.  (Be sure to mention the bug number in the log
> message.)

Yes, done.





bug closed, send any further explanations to 34391 <at> debbugs.gnu.org and Mattias Engdegård <mattiase <at> acm.org> Request was from Mattias Engdegård <mattiase <at> acm.org> to control <at> debbugs.gnu.org. (Sat, 16 Feb 2019 11:30:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 17 Mar 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.