nobiot writes: >> May you try the attached patch? > > I would love to help this patch move forward and would be happy to try > the patch, if this is not going to waste anyone's time: > > (1) I took the liberty of creating two test Org files we can use on > sr.ht: https://git.sr.ht/~nobiot/org-radio-links-patch-20240228/tree > > The two files, `500-terms.org` and `5000-terms.org`, contain 500 > and 5000 radio targets respectively. > > Both files have two H1 headlines "Definitions" and "Body text". Once > you open the file, call `M-x org-update-radio-target-regexp`. For > 500 entries, radio targets work beautifully; for the 5000 entries, I > get 'org-element-context: Invalid regexp: "Regular expression too > big"' error. The attached version of the patch should work for 5000-terms.org. (I had to scale down the maximum allowed regexp size; apparently, the number from C sources was not small enough). > (2) I am struggling to apply the patch cleanly to the current HEAD of > Org-mode source. I git-cloned the source from > https://git.sr.ht/~bzg/org-mode (commit 755fef38f Merge branch > 'bugfix'). > > I use Magit and use "W" -> "a" -> "a" to apply the > plain patch file. I "get error: patch failed: You need Www.