all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#4209: 23.1; Emacs 23.1 regression in re-search-forward
@ 2009-12-02  0:21 Matthew Dempsky
  0 siblings, 0 replies; 11+ messages in thread
From: Matthew Dempsky @ 2009-12-02  0:21 UTC (permalink / raw)
  To: 4209

This is a stab in the dark, but the patch below corrects this issue for me:

    $ ./retest.sh
    looking-at: t
    re-search-forward: 9

I don't see any reason this should cause regressions (searching
forward 0 steps seems to me it should be the same as searching
backward 0 steps), but I've only casually looked over regex.c.

--- a/src/regex.c
+++ b/src/regex.c
@@ -4524,7 +4524,7 @@ re_search_2 (bufp, str1, size1, str2, size2,
startpos, range, regs, stop)

          d = POS_ADDR_VSTRING (startpos);

-         if (range > 0)        /* Searching forwards.  */
+         if (range >= 0)       /* Searching forwards.  */
            {
              register int lim = 0;
              int irange = range;





^ permalink raw reply	[flat|nested] 11+ messages in thread
* bug#4209: 23.1; Emacs 23.1 regression in re-search-forward
@ 2009-12-07  3:30 Christopher J. Madsen
  0 siblings, 0 replies; 11+ messages in thread
From: Christopher J. Madsen @ 2009-12-07  3:30 UTC (permalink / raw)
  To: 4209

Matthew's patch corrects the problem for me, too.  (Even though that
line did not change between 22.3 and 23.1.)

Thanks, Matthew.  This bug had been preventing me from upgrading to 23.






^ permalink raw reply	[flat|nested] 11+ messages in thread
* bug#4209: 23.1; Emacs 23.1 regression in re-search-forward
@ 2009-08-20  0:50 Christopher J. Madsen
  2010-01-26 20:38 ` Chong Yidong
  0 siblings, 1 reply; 11+ messages in thread
From: Christopher J. Madsen @ 2009-08-20  0:50 UTC (permalink / raw)
  To: bug-gnu-emacs; +Cc: cjm

I've found a regression in Emacs 23.1 (versus Emacs 22.3).  I've
narrowed it down to this test case:

;--- re-bug.el starts here
(set-buffer (get-buffer-create "*Test Buffer*"))

(insert "\xC2\x4C\xEF\x77\xC6\x69\x8C\x0A")

(goto-char (point-min))

(message "looking-at: %s" (looking-at "\\`\xC2\x4C\xEF\x77\xC6\x69\x8C\x0A"))

(message "re-search-forward: %s"
         (re-search-forward "\\`\xC2\x4C\xEF\x77\xC6\x69\x8C\x0A" 100 t))
;--- re-bug.el ends here

Then at the command line:

$ emacs-22 --batch -Q -l re-bug.el
looking-at: t
re-search-forward: 9

$ emacs-23 --batch -Q -l re-bug.el
looking-at: t
re-search-forward: nil


As you can see, looking-at succeeds in both versions, but
re-search-forward fails in Emacs 23.  I don't know why.  It seems like
the functions should either both succeed or both fail.


For comparison, here's the version of Emacs 22 that I'm using:
GNU Emacs 22.3.1 (i686-pc-linux-gnu, GTK+ Version 2.12.11)
 of 2009-04-06 on byte
Windowing system distributor `The X.Org Foundation', version 11.0.10503000
configured using `configure  '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-22' '--infodir=/usr/share/info/emacs-22' '--without-carbon' '--with-sound' '--with-x' '--with-toolkit-scroll-bars' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-xpm' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--build=i686-pc-linux-gnu' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-march=prescott -O2 -pipe' 'LDFLAGS=-Wl,-O1''


And this is the Emacs 23 information:

In GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.16.5)
 of 2009-08-10 on byte
Windowing system distributor `The X.Org Foundation', version 11.0.10503000
configured using `configure  '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-sound' '--with-x' '--with-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--without-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' '--build=i686-pc-linux-gnu' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-march=core2 -O2 -pipe' 'LDFLAGS=-Wl,-O1''

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







^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-01-29  6:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02  0:21 bug#4209: 23.1; Emacs 23.1 regression in re-search-forward Matthew Dempsky
  -- strict thread matches above, loose matches on Subject: below --
2009-12-07  3:30 Christopher J. Madsen
2009-08-20  0:50 Christopher J. Madsen
2010-01-26 20:38 ` Chong Yidong
2010-01-27  3:43   ` Kenichi Handa
2010-01-27  5:41     ` Kenichi Handa
2010-01-27 14:34       ` Stefan Monnier
2010-01-27 16:43         ` Chong Yidong
2010-01-28  1:18         ` Kenichi Handa
2010-01-28 19:01           ` Stefan Monnier
2010-01-29  6:15             ` Kenichi Handa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.