Upgrading Org-mode 8.0

Org-mode 8.0 is out, and overall, it looks like interesting update to already awesome package for Emacs.

This update is dirsruptive updates, which means there are something that can be broken and requires updates.

One of the issue I had was how it handles LaTeX output.

For instance, I had the following in my init.el (I opt to put my config into .emacs.d/init.el instead of .emacs…)

(require 'org-latex)
(add-to-list 'org-export-latex-classes
 '("jarticle"
 "\\documentclass{jarticle}"
 ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

The above is actually an incompatible for 8.0, and it had to be updated so it is:

(require 'ox-latex)
(add-to-list 'org-latex-classes
 '("jarticle"
 "\\documentclass{jarticle}"
 ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

The tricky part is that it won’t complain until you try to issue org-export-as-latex, which actually is not supposed to exist in 8.0. (the corresponding function of 8.0 is org-latex-export-to-latex) What happened was that by requiring org-latex, it loaded corresponding functions from 7.9.3 version built into Emacs itself.

So if you have any statements like above, do make sure to update or you will run into problems.

You can see if you have a correct installation of org by M-x org-version. You can also try to get a complete list of org-export- and if you see any more than the following, you may have some issue in your configuration.

Possible completions are:
org-export-dispatch org-export-insert-default-template
org-export-stack org-export-stack-clear
org-export-stack-mode org-export-stack-remove
org-export-stack-view