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
    Commented Jun 13, 2018 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. Commented Aug 3, 2018 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
    Commented Aug 4, 2018 at 8:38

1 Answer 1


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
    Commented Jun 14, 2018 at 7:17
  • Caching is difficult to get right. But the Org element cache has gotten much more reliable during the past few revisions, so it is now on by default (since version 9.6).
    – NickD
    Commented Mar 30, 2023 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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