When I the first time enter an org-mode
buffer, I get no font lock at all unless I revert-buffer
or reopen the file. Even I turn on the debug mode, no error is emit.
How should I debug and fix this?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this community
font-lock-mode
is globally available in all buffers with the default installation of Emacs. If it is not working in anorg-mode
buffer, then yourinit.el
/.emacs
has something in it that breaks the default behavior. Try to comment out sections of your user configuration, save, and keep restarting Emacs until you find the portion of code that breaks the font-lock inorg-mode
. – lawlist May 30 '18 at 7:01(setq orhc-bibtex-cache-file (expand-file-name ".orhc-bibtex-cache" savefile-directory))
killed thefont-lock
. Strange but I delete the file and everything runs fine. – stackunderflow May 30 '18 at 7:26org-ref
library, but a quick Google oforhc-bibtex-cache-file
led me there. So, your problem may be traceable to that library and it may be helpful to do some debugging to find out which function, etc. might be the culprit. By preventing the file/variable from being defined, certain functions that rely on testing for the existence of that file cannot do their thing -- i.e., whatever it is that they would do otherwise. – lawlist May 30 '18 at 13:45