From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: 17373@debbugs.gnu.org
Subject: bug#17373: 24.3.50; match data is incorrect if there are too many groups
Date: Tue, 29 Apr 2014 21:19:11 +0200 [thread overview]
Message-ID: <87ppk0hrkg.fsf@yahoo.fr> (raw)
Hi,
The following reports 2. Replace 255 by 254, and it'll report 512 as expected
#+BEGIN_SRC emacs-lisp
(with-temp-buffer
(insert "bar")
(when
(re-search-backward
(concat
(mapconcat (lambda (x) (format "\\(%s\\)" x)) (make-list 255 "foo") "\\|")
"\\|"
"\\(bar\\)")
nil t)
(length (match-data))))
#+END_SRC
Regexps with many groups is the kind of thing is used in AUCTeX, in
TeX-auto-parse-region. What auctex does in that function is construct a
big regexp out of a list of smaller ones (each small one is made into a
group) ; then when the big regexp matches it then tries to find out
which of the smaller regexps actually matched by checking which group is
non-nil.
In GNU Emacs 24.3.50.7 (i686-pc-linux-gnu, GTK+ Version 2.24.20)
of 2014-04-10 on LDLC-portable
Windowing system distributor `The X.Org Foundation', version 11.0.11405000
System Description: Ubuntu 13.10
Configured using:
`configure 'CFLAGS=-g3 -O2''
Important settings:
value of $LANG: fr_BE.UTF-8
locale-coding-system: utf-8-unix
--
Nico.
next reply other threads:[~2014-04-29 19:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 19:19 Nicolas Richard [this message]
2014-05-19 5:47 ` bug#17373: 24.3.50; match data is incorrect if there are too many groups Paul Eggert
2014-05-19 13:48 ` Drew Adams
2016-02-10 17:11 ` Marcin Borkowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ppk0hrkg.fsf@yahoo.fr \
--to=theonewiththeevillook@yahoo.fr \
--cc=17373@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.