Open srnnkls opened 5 years ago
Okay, further testing revealed:
Everything works fine even with org-indent-mode
enabled, when I disable evil-mode
. In fact fontification still works if I reenable evil-mode
after loading the buffer with evil-mode
disabled.
@srnnkls Did you continue using poly-org? I am not an evil user, so it's hard for me to test/devlop on it. I see no reason why evil-mode should interfere with font-lock though.
Hi, I have this issue while editing a large buffer (159KiB). But I cant reliably reproduce this behavior, often it occurs when I move outside of src block to the header of this block. I was trying to catch errors with toggle-debug-on-errors
with no luck. If I kill the buffer after the fontification has gone with the point inside src block, and reopen it fontification won't work (point is inside src block). But if I leave the point outside of the src block, then fontification works as usual on reopening of the file.
I use org-indent-mode
and evil-mode
too.
Actually, I was able to reproduce it with this config and emacs 26.3.
(setq load-path
(append '("path/to/polymode-20200411.915/"
"path/to/poly-org-20200316.1315/")
load-path))
(require 'poly-org)
(setq org-src-fontify-natively nil)
;;uncomment to reproduce
;;(setq org-startup-indented t)
and this org file:
* TEMP
#+BEGIN_SRC python
import math
#+END_SRC
When org-indent-mode
is enabled (org-startup-indented
is t), then fontification won't work (e.g. try to comment import math
).
Same problem. I tried everything but can't figure what causes this behaviour. Does the same trick whatever language : I have an org file mixing emacs-lisp, python and R.
Hmm, this issue is starting to drive me a little loopy.
I updated my setup recently and now (with org 9.3) I have issues with font-locking. While the spans are identified correctly and the mode changes appropriately, the font lock is only applied initially and and not reapplied through edits within the indirect buffer. Further, at some point the font-lock is lost at all. I had a look and disabling
org-indent-mode
or settingorg-startup-indented
tonil
seems to make font-locking work again.Here is the output of
pm-debug-relevant-variables
: