Noboru Ota <m...@nobiot.com> writes: > - MAX_BUF_SIZE in src/regex-emacs.c is, if I understand the comment > around it correctly, 2^15 bytes = 32768 bytes. > > - `org-target-link-regexp-limit` is 2^11 bytes = 2048 bytes (?). > > - For my 5000 terms, (length org-target-link-regexp) => 103603 (what's > the unit of measure?) > > - (string-bytes org-target-link-regexp) => 103603, the same number.
org-target-link-regexp does not matter in this case. For this long regexps I introduced a new variable org-target-link-regexps that contains a list of shorter regexps. This list is used instead of org-target-link-regexp. > - If I evaluate the following to try to get a compiled length of the > regexp, 88785. By "compiled", I did not mean byte-compiled. Regexp compilation is a completely different beast. It is performed by Emacs C internals, converting string regexp into representation used by regexp matching code. This compiled representation is not exposed to Elisp. If you want to learn more about regexp matching theory and implementation, you may check https://blog.burntsushi.net/regex-internals/ -- 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>