GNU bug report logs -
#7267
23.1; regexp backslash-B matches word
Previous Next
Reported by: "Thibault Kruse" <thibault.kruse <at> gmx.de>
Date: Fri, 22 Oct 2010 18:52:02 UTC
Severity: normal
Found in version 23.1
Done: "Thibault Kruse" <thibault.kruse <at> gmx.de>
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 7267 in the body.
You can then email your comments to 7267 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7267
; Package
emacs
.
(Fri, 22 Oct 2010 18:52:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Thibault Kruse" <thibault.kruse <at> gmx.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 22 Oct 2010 18:52:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
According to emacs manual, \B matches the empty string, but it does not.
start emacs with emacs -q --no-site-file
move point over word in the splash screen.
M-:
(looking-at "\\B")
minibuffer says: T, should say nil
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'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.1/etc/DEBUG for instructions.
In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
of 2010-03-29 on rothera, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''
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: Fundamental
Minor modes in effect:
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<right> M-: <up> ( l o o k i n g - a t SPC " " <left>
\ \ B <right> ) <return> <left> M-: <up> <return> <right>
<help-echo> M-x r e p o <tab> r t - e <tab> <retur
n>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
goto-history-element: Beginning of history; no preceding item
t
nil
Making completion list...
--
GRATIS! Movie-FLAT mit über 300 Videos.
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7267
; Package
emacs
.
(Sat, 23 Oct 2010 02:46:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 7267 <at> debbugs.gnu.org (full text, mbox):
"Thibault Kruse" wrote:
> According to emacs manual, \B matches the empty string, but it does not.
The elisp manual says:
Backslash Constructs in Regular Expressions
[...]
`\B'
matches the empty string, but _not_ at the beginning or end of a
word, nor at the beginning or end of the buffer (or string).
> start emacs with emacs -q --no-site-file
> move point over word in the splash screen.
> M-:
> (looking-at "\\B")
> minibuffer says: T, should say nil
Why do you think it should return nil?
This construct matches the empty string inside words.
It only returns nil at word boundaries. Try
(looking-at "\\B")
with point at the start, middle, and end of a word.
It returns nil, t, nil, as it should.
The empty string is _empty_, ie length zero, not whitespace or
anything like that.
Reply sent
to
"Thibault Kruse" <thibault.kruse <at> gmx.de>
:
You have taken responsibility.
(Sat, 23 Oct 2010 18:42:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Thibault Kruse" <thibault.kruse <at> gmx.de>
:
bug acknowledged by developer.
(Sat, 23 Oct 2010 18:42:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 7267-done <at> debbugs.gnu.org (full text, mbox):
sorry, I misunderstood. But I now understand it means it always returns t except for the noted cases, as any string contains the empty string.
-------- Original-Nachricht --------
> Datum: Fri, 22 Oct 2010 22:49:27 -0400
> Von: Glenn Morris <rgm <at> gnu.org>
> An: "Thibault Kruse" <thibault.kruse <at> gmx.de>
> CC: 7267 <at> debbugs.gnu.org
> Betreff: Re: bug#7267: 23.1; regexp backslash-B matches word
> "Thibault Kruse" wrote:
>
> > According to emacs manual, \B matches the empty string, but it does not.
>
> The elisp manual says:
>
> Backslash Constructs in Regular Expressions
> [...]
>
> `\B'
> matches the empty string, but _not_ at the beginning or end of a
> word, nor at the beginning or end of the buffer (or string).
>
> > start emacs with emacs -q --no-site-file
> > move point over word in the splash screen.
> > M-:
> > (looking-at "\\B")
> > minibuffer says: T, should say nil
>
> Why do you think it should return nil?
>
> This construct matches the empty string inside words.
> It only returns nil at word boundaries. Try
>
> (looking-at "\\B")
>
> with point at the start, middle, and end of a word.
> It returns nil, t, nil, as it should.
>
> The empty string is _empty_, ie length zero, not whitespace or
> anything like that.
>
--
GRATIS! Movie-FLAT mit über 300 Videos.
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 21 Nov 2010 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 217 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.