I recently been having some troubles with Emacs Org mode, since I updated my system. I am a casual user and use Org for agendas and note-taking throughout the day.

The issue is that sometimes pressing Enter/Return key does not create new line (when the cursor at the bottom of an agenda). Also, the underlines from the date drag into the text. I am attaching an image to make sense of what is happening. Emacs window screenshot

Below is a message from the Messages buffer

org-element--cache-find: Wrong type argument: avl-tree-, [cl-struct-avl-tree- [nil nil nil 0] org-element--cache-compare]

What could/should I do to bring back the system as it was? What is happening here?

edit: Tired C-u M-x org-reload as suggested in this post. One of the problems, the one with pressing Return key unable to create new lines - was solved. The issue with "underlines from date dragging into text" is still there. There was one observation - if I press space bar quickly after inserting date C-u C-c !, the underlines do not drag.

  • Here, reloading org only treated the symptoms. The cause of the issue remains and is showing up in crazy ways – solyarist Jun 13 '18 at 9:46
  • 1
    I experienced the same issue recently, and the only thing that worked for me was to disable the cache. Please update, if you find another solution. – martinweiss Aug 3 '18 at 9:13
  • @martinweiss disabling cache was enough; I did not look for other solutions - since I am using it casually, I am not that adventurous. If you find another solution, please do update – solyarist Aug 4 '18 at 8:38

Although the cache speeds up things, it has caused problems in the past. I would turn it off and see if that solves the problems you are seeing. In fact, in the fairly current version (9.1.12) I'm running, it is disabled by default. To disable it, add

(setq org-element-use-cache nil)

to your .emacs or .emacs.d/init.el file and restart emacs.

  • Yes, it does solve the problem. It is surprising to see that caching could cause effects that seem unrelated to caching or speeding up. – solyarist Jun 14 '18 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.