awth13 / org-appear

Toggle visibility of hidden Org mode element parts upon entering and leaving an element
MIT License
364 stars 19 forks source link

org-appear--post-cmd: wrong-type-argument on Emacs 29 #54

Closed alopezrivera closed 11 months ago

alopezrivera commented 11 months ago

Hi! First of all thank you for the awesome package. I've run into a bug I can't figure out with org-appear (as well as with a very similar one with org-fragtog, see https://github.com/io12/org-fragtog/issues/47) on Emacs 29.

Describe the bug org-fragtog-mode seems to not work on Emacs 29.

To Reproduce Steps to reproduce the behavior:

  1. Open org file
  2. M-x org-appear-mode
  3. The following error message is shown:
    Error in post-command-hook (org-appear--post-cmd): (wrong-type-argument number-or-marker-p nil)

The bug happens within org-appear--current-elem. Bug trace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  org-appear--current-elem()
  org-appear--post-cmd()
  eval((org-appear--post-cmd) t)
  eval-expression((org-appear--post-cmd) nil nil 127)
  funcall-interactively(eval-expression (org-appear--post-cmd) nil nil 127)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

Expected behavior org-fragtog-mode starts and inline toggling of links etc.

Videos Can provide if needed.

Version and environment

Additional context Can provide if needed.

alopezrivera commented 11 months ago

The root of the issue was the version of Org it turns out!

See here: https://github.com/io12/org-fragtog/issues/47

ispringle commented 11 months ago

The root of the issue was the version of Org it turns out!

See here: io12/org-fragtog#47

I do not believe this is accurate. The root of the issue is something org introduced, by rolling back you've returned to a version prior to the change, but will still be a problem.

I too am having this issue. I think this should be re-opened so @awth13 can be made aware of breaking changes in a new release of org.

EDIT:

Strike that. I am on Org mode version 9.7-pre (9.7-pre-n/a-g5496f5) and I am no longer having any issues with org-appear. I deleted the cache for straight and reinstalled org and it started working. I suspect there was an upstream change that's been made since then. Should be safe to use the standard org version straight.el provides -- or as safe as using the most recently cut version can be!