Closed DarwinAwardWinner closed 3 years ago
Thank you, @DarwinAwardWinner! I usually toggle org-appear-mode
on and off depending on what I'm doing as I don't like it being always on and moving things. Without your input, I probably wouldn't have encountered these issues.
That being said, I can't reproduce this one. Moreover, org-appear
doesn't call org-backward-element
at any point, as far as I know.
Did this occur after or before you implement the fixes proposed in #19? What is your Emacs/Org version?
Hmm, I can't reproduce this from emacs -Q
, so it might be a bad interaction with some other part of my org-mode config. I'll see if I can figure it out later and report back.
I see this error after upgrading to Org mode version 9.7-pre (release_9.6.7-649-g85b747 @ /home/doolio/.emacs.d/straight/build/org/). I have org-appear
configured to load after Org
which is itself lazily loaded. This error then appears as soon as I open the first org file. Unfortunately, this doesn't trigger the debugger because as reported above any error causes Emacs to just delete the function from post-command-hook
and once the hook is removed, org-appear
stops working.
If it matters I'm still running GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2023-02-23, modified by Debian.
In certain circumstances,
org-appear--post-cmd
throws(user-error "Cannot move further up")
, which I think is thrown fromorg-backward-element
. The call stack also includesorg-appear--hide-invisible
andfont-lock-ensure
, but that's as far as I've gotten with debugging via insertingmessage
calls. Unfortunately, It seems to be impossible to get a backtrace from a function inpost-command-hook
, because any error causes Emacs to just delete the function frompost-command-hook
. And I can't figure out how to getorg-appear--post-cmd
to throw the same error outside ofpost-command-hook
. Once the hook is removed, org-appear stops working.One way to semi-consistently trigger this error is to mess around with
C-c C-c
in tables with formatting in them, e.g.Put that in an org-mode buffer, enable org-appear-mode, and then start moving around the table and hitting
C-c C-c
. You should see the error at some point, usually on the 2nd or 3rd cell that you try.