Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org-fragtog--post-cmd: wrong-type-argument on Emacs 29 #47

Closed
alopezrivera opened this issue Aug 14, 2023 · 2 comments
Closed

org-fragtog--post-cmd: wrong-type-argument on Emacs 29 #47

alopezrivera opened this issue Aug 14, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@alopezrivera
Copy link

First of all thanks for all the work put into the package. It's great :)

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

To Reproduce
Steps to reproduce the behavior:

  1. Toggle buffer-wide org-latex-preview
  2. M-x org-fragtog-mode
  3. The following error message is shown:
    Error in post-command-hook (org-fragtog--post-cmd): (wrong-type-argument number-or-marker-p nil)
    

The bug seems to take place within org-fragtog--frag-end. Bug trace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  org-fragtog--frag-end((latex-environment (:standard-properties [724 923 nil nil 1 735 nil t nil nil nil nil element nil (section (:standard-properties [548 923 548 923 0 548 nil t nil 548 923 section element nil (headline ...) nil nil #<buffer calc.org>])) nil nil #<buffer calc.org>] :value [org-element-deferred org-element--substring (11 198) nil] :results (""))))
  org-fragtog--cursor-frag()
  org-fragtog--post-cmd()
  eval((org-fragtog--post-cmd) t)
  eval-expression((org-fragtog--post-cmd) nil nil 127)
  funcall-interactively(eval-expression (org-fragtog--post-cmd) nil nil 127)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

Expected behavior
org-fragtog-mode starts and inline previews of LaTeX equations work as expected.

Videos
Can provide if needed.

Version and environment

  • OS: Windows Subsystem for Linux (WSL) with Ubuntu 22.04
  • Emacs version: GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0)
    of 2022-07-12

Additional context
Can provide if needed.

@io12
Copy link
Owner

io12 commented Aug 14, 2023

If you are using straight.el, I think this might be the same issue as org-roam/org-roam#2361. There are some workarounds in that thread. Can you try pinning your Org version to 8ef6205a560cd3a92f8c5f8fe34953b80121c2cb?

@alopezrivera
Copy link
Author

That was it exactly! Thank you so much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants