From: Ihor Radchenko <yantar92@posteo.net>
To: emacs-devel@gnu.org
Subject: Limits on the regexp string length
Date: Wed, 21 Dec 2022 12:51:11 +0000 [thread overview]
Message-ID: <87h6xox6m8.fsf@localhost> (raw)
Hi,
I am writing as a follow-up of a recent bug report we got in Org.
Rudolf Adamkovič <salutis@me.com> (December 14) (2022 emacs-orgmode.gnu.org inbox maillist replied)
Subject: Radio links work only in small numbers
https://orgmode.org/list/m2lenax5m6.fsf@me.com
It looks like the length of regular expressions in Emacs is limited and
regexps exceeding this length cause error being thrown: "Regular
expression too big".
Is there any rationale behind this limit? Can we increase it somehow
from Elisp?
The regexps in question are giant (or re1 re2 ...) where we are
searching for occurrences of word combinations from list.
The compiled discrete automata should not occupy too much memory. No more
than ~ max_phrase_length * char_table_size.
P.S. Note that `regexp-opt' is not suitable because we need to match
arbitrary numbers of newlines/spaces inside the word combinations
equally.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next reply other threads:[~2022-12-21 12:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 12:51 Ihor Radchenko [this message]
2022-12-21 13:39 ` Limits on the regexp string length Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h6xox6m8.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).