io12 / org-fragtog

Automatically toggle Org mode LaTeX fragment previews as the cursor enters and exits them
MIT License
404 stars 14 forks source link

Bug with snippets #43

Open none9632 opened 2 years ago

none9632 commented 2 years ago

Describe the bug After release version 0.4.2, the cursor started shifting in some snippets.

To Reproduce I just used the following snippet

# -*- mode: snippet -*-
# name: test
# key: test
# --
#+begin_latex latex
\begin{align*}
  $0
\end{align*}
#+end_latex

Videos With enabled org-frag-tog: Peek 2022-08-28 10-06

With disabled org-frag-tog: Peek 2022-08-28 10-05

gaoDean commented 1 year ago

@none9632 What environment are you using (terminal or gui)? works fine for me.

I put my snippet in ~/.config/doom/snippets/org-mode/test and it works fine just like the second video

none9632 commented 1 year ago

@gaoDean I am currently using gui emacs version 28.2. My configure for org-frag-tog:

(use-package org-fragtog
  :hook (org-mode . org-fragtog-mode)
  :config
  (setq org-fragtog-preview-delay 0.25))

I found that if you don't change org-fragtog-preview-delay it works fine.

none9632 commented 1 year ago

@gaoDean Apparently, the problem is related to the function org-fragtog--set-point-after-disable-frag. I'm not quite sure what this function is supposed to do.