Ihor Radchenko <[email protected]> writes:
> Ihor Radchenko <[email protected]> writes:
>
>> That's a bug!
>> Any chance you can create a self-contained example with minimal Org file
>> that triggers the problem with emacs -Q? (So that you can share the full
>> reproducer, including minimal-org.el, add-fitness.el, and the required
>> .org file).
>
> Now I see the followup email and can reproduce the bug. Will investigate.
So, my backtrace is unsurprisingly the same.
re-search-forward("^\\*+ \\|\\\\end{[A-Za-z0-9*]+}[ \11]*$\\|^[
\11]*\\(?:#\\+END\\(?:_\\|:?[
\11]*$\\)\\|^[ \11]*\\(\\(?:[-+*]\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)\\(?:[
\11]+\\|$\\)\\)\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][
\11]*\\)?\\(?:\\(\\[[ X-]\\]\\)\\(?:[
\11]+\\|$\\)\\)?\\(?:\\(.*\\)[ \11]+::\\(?:[ \11]+\\|$\\)\\)?\\|:\\(?:
\\|$\\)\\|:\\(?:\\w\\|[-_]\\)+:[
\11]*$\\)" 40236 t)
org-element--cache-before-change(46737 40162)
org-element--cache-after-change(46737 40162 92)
run-hook-with-args(org-element--cache-after-change 46737 40162 92)
combine-change-calls-1(46737 #<marker in no buffer> #f(compiled-function ()
#<bytecode
0x1a126d0fb0505640>))
The error happens because org-element--cache-before-change(46737 40162)
is called with changed region beginning AFTER region end.
Removing combine-after-change-calls in org-table.el gets rid of the bug,
which probably means that we are seeing a bug in
combine-after-change-calls itself.
Also, I could add a check to org-element--cache-before-change to swap
begin and end and keep the correct order, but that makes jit-lock fail
for similar reasons. So, it is really something on Emacs side.
Will need to report it upstream on Emacs side.
The temporary fix will be dropping combine-after-change-calls, but let's
see what Emacs devs say before doing that.
--
Ihor Radchenko // yantar92,
Org mode maintainer,
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>