unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Limits on the regexp string length
@ 2022-12-21 12:51 Ihor Radchenko
  2022-12-21 13:39 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Ihor Radchenko @ 2022-12-21 12:51 UTC (permalink / raw)
  To: emacs-devel

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>



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

end of thread, other threads:[~2022-12-21 13:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-21 12:51 Limits on the regexp string length Ihor Radchenko
2022-12-21 13:39 ` Eli Zaretskii

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).