GNU bug report logs - #10649
23.4; Regexp char classes not working

Previous Next

Package: emacs;

Reported by: Raffaele Ricciardi <rfflrccrd <at> gmail.com>

Date: Mon, 30 Jan 2012 05:16:02 UTC

Severity: normal

Tags: notabug

Found in version 23.4

Done: Glenn Morris <rgm <at> gnu.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 10649 in the body.
You can then email your comments to 10649 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#10649; Package emacs. (Mon, 30 Jan 2012 05:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raffaele Ricciardi <rfflrccrd <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 30 Jan 2012 05:16:02 GMT) Full text and rfc822 format available.

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

From: Raffaele Ricciardi <rfflrccrd <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.4; Regexp char classes not working
Date: Mon, 30 Jan 2012 05:16:37 +0000
This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your report will be posted to the bug-gnu-emacs <at> gnu.org mailing list
and the gnu.emacs.bug news group, and at http://debbugs.gnu.org.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug.  If you can, give
a recipe starting from `emacs -Q':

--- Beginning of description ---
- start emacs -Q
- evaluate this forms:
(string-match "[:xdigit:]" "0")
(string-match "[:xdigit:]" "a")
(string-match "[:alnum:]" "5")
They should return non-nil, but they return nil instead.

Found not working also on Emacs 23.3b and 24.0.92.1.

Cheers.

--- End of description ---

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/home/lele/bin/emacs/emacs-23.4/share/emacs/23.4/etc/DEBUG.


In GNU Emacs 23.4.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2012-01-30 on debian
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
configured using `configure  '--prefix=/home/lele/bin/emacs/emacs-23.4''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
e m a c s - v e r s i o n C-x C-e i <return> <return>
<help-echo> <help-echo> <help-echo> <tool-bar> <paste>
<down-mouse-1> <mouse-1> <delete> <delete> <delete>
<delete> <delete> <delete> i SPC <backspace> <backspace>
SPC <down-mouse-1> <mouse-1> C-x C-e h <backspace>
<down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1>
<help-echo> <tool-bar> <copy> <return> <help-echo>
<help-echo> <help-echo> <help-echo> <tool-bar> <paste>
<down-mouse-1> <mouse-1> <delete> <delete> <delete>
<delete> <delete> <delete> a l p h a <right> <right>
<right> <right> <right> <delete> a <return> <backspace>
<down-mouse-1> <mouse-1> C-x C-e <up> <right> C-x C-e
<down-mouse-1> <mouse-1> C-x C-e <left> <left> <left>
<left> <left> <left> <left> <left> <backspace> <backspace>
<backspace> n u m <down-mouse-1> <mouse-1> C-x C-e
<left> <left> <backspace> 5 <down-mouse-1> <mouse-1>
C-x C-e <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
<help-menu> <send-emacs-bug-report> C h a r SPC c l
a s s i <backspace> e s SPC n o t SPC w o r k n i g
C-g <return> c o d i n g - s y s t e m C-x C-e q C-h
f c o d i n g - s y <tab> <tab> c u <tab> <backspace>
<backspace> <backspace> C-g <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu>
<emacs-known-problems> <down-mouse-1> <mouse-1> SPC
SPC SPC SPC SPC <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> C-. M-x s h o w l <backspace>
- l i <tab> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> l i s t - l i <tab>
<return> ^ \ * <return> <help-echo> <down-mouse-1>
<mouse-1> C-x 1 <help-echo> <down-mouse-1> <mouse-1>
<next> <next> <next> <next> <next> <next> <next> <next>
<next> <next> <help-echo> <help-echo> <help-echo> <menu-bar>
<buffer> C-b <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <menu-bar> <help-menu> <send-emacs-bug
-report>

Recent messages:
0 [2 times]
nil
Quit
Entering debugger...
Back to top level.
Making completion list...
Quit
View mode: type C-h for help, h for commands, q to quit.
call-interactively: Beginning of buffer [10 times]
Searched 1 buffer; 327 matches for `^\*'

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock
sha1 hex-util hashcash mail-utils goto-addr thingatpt noutline outline
easy-mmode help-fns help-mode easymenu view debug emacsbug tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10649; Package emacs. (Mon, 30 Jan 2012 08:07:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Raffaele Ricciardi <rfflrccrd <at> gmail.com>
Cc: 10649 <at> debbugs.gnu.org
Subject: Re: bug#10649: 23.4; Regexp char classes not working
Date: Mon, 30 Jan 2012 03:06:43 -0500
Raffaele Ricciardi wrote:

> - start emacs -Q
> - evaluate this forms:
> (string-match "[:xdigit:]" "0")
> (string-match "[:xdigit:]" "a")
> (string-match "[:alnum:]" "5")
> They should return non-nil, but they return nil instead.

From the elisp manual:

34.3.1.2 Character Classes

Here is a table of the classes you can use in a character alternative,
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^

34.3.1.1 Special Characters in Regular Expressions
[...]
`[ ... ]'
     is a "character alternative", which begins with `[' and is
     terminated by `]'

Therefore you must write eg

  (string-match "[[:xdigit:]]" "0")




Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 30 Jan 2012 08:08:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10649; Package emacs. (Tue, 31 Jan 2012 20:47:01 GMT) Full text and rfc822 format available.

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

From: Raffaele Ricciardi <rfflrccrd <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10649 <at> debbugs.gnu.org
Subject: Re: bug#10649: 23.4; Regexp char classes not working
Date: Tue, 31 Jan 2012 20:47:52 +0000
Ouch!  I did RTFM, but the brackets confused me.  Thank you.
--

On 01/30/2012 08:06 AM, Glenn Morris wrote:
> Raffaele Ricciardi wrote:
>
>> - start emacs -Q
>> - evaluate this forms:
>> (string-match "[:xdigit:]" "0")
>> (string-match "[:xdigit:]" "a")
>> (string-match "[:alnum:]" "5")
>> They should return non-nil, but they return nil instead.
>
>  From the elisp manual:
>
> 34.3.1.2 Character Classes
>
> Here is a table of the classes you can use in a character alternative,
>                                              ^^^^^^^^^^^^^^^^^^^^^^^^^
>
> 34.3.1.1 Special Characters in Regular Expressions
> [...]
> `[ ... ]'
>       is a "character alternative", which begins with `[' and is
>       terminated by `]'
>
> Therefore you must write eg
>
>    (string-match "[[:xdigit:]]" "0")





bug closed, send any further explanations to 10649 <at> debbugs.gnu.org and Raffaele Ricciardi <rfflrccrd <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 31 Jan 2012 20:59: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. (Wed, 29 Feb 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 108 days ago.

Previous Next


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