Saturday, May 25, 2013

org-mode says: Warning: Bug in outline-mode: it forgets to call `run-mode-hooks'

Warning: Bug in outline-mode: it forgets to call `run-mode-hooks'
I just encountered this error when visiting a .org file and finding I was in outline-mode.
No changes to any of my init files...  M-x org-mode gave the same error.
In aquamacs 2.4, I found that if I opened a remote file using tramp, and then open an org file either locally or remotely, org mode will fail to start.  If I restart the org mode, aquamacs will report that certain features from outline mode are missing.
The problem can be fixed if one reload the outline library again by hand using M-x load-library: outline, and then restart org mode.
It always happens when tramp is loaded before the org-mode. If a org file is opened before tramp, then subsequent tramp does not break the org mode.
So, there's the cause:
  • Calling tramp before org-mode
    (apparently only loads certain pieces of code that makes org-mode think outline is loaded, though it isn't)
And the solution:
  • M-x load-library outline
  • M-x org-mode,  or normal-mode,  or visit the .org file again
Is it fixed in later tramp / orgmode / aquamacs distribution ?

No comments: