Closed thibautbenjamin closed 3 years ago
Thanks! Fixed in https://github.com/io12/org-fragtog/commit/f501a40a49c007f7115ec8669b935fed1539c6e3. That was very close to the fix but I used ignore-errors
instead of ignore-error
.
Thanks a lot, and thanks for your work, I love this package
I have just tried using org-fragtog mode and I really like the idea, I was looking for exactly this package. However I noticed a small issue with the way errors are handled, which is probably due to a weird appear I have.
When I type the following snippet normally
everything works exactly as intended, and this looks like a very cool mode. But I tend to write first
begin{}
and then fill in the braces withpmatrix
. If I do that, when I move the cursor out of the braces, the hook to theorg-fragtog--post-cmd
fires although I haven't finished typing. Of course, since there is no\end
, this is not a valid LaTeX code and the preview fails, I get the following error reported in the*Messages*
bufferError in post-command-hook (org-fragtog--post-cmd): (error "File \"/tmp/orgtexIuM9v8.dvi\" wasn’t produced. Please adjust ‘dvipng’ part of ‘org-preview-latex-process-alist’.")
Just firing the error would be ok, but after this error, fragtog mode stops working completely, and I have to toggle manually the latex-preview again.
I am pretty new to emacs lisp, so not sure what the fix should be. I am wondering if catching the error with
could be a correct fix