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.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 23 Oct 2010 11:00:44 +0200
with message-id <20101023090044.271690 <at> gmx.net>
and subject line Re: bug#7267: 23.1; regexp backslash-B matches word
has caused the GNU bug report #7267,
regarding 23.1; regexp backslash-B matches word
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
7267: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7267
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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
[Message part 3 (message/rfc822, inline)]
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
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.