Remove unnecessary invocations of org-mode
commit507244d56b055e7595ba94fe89d45c7ddb2559df
authorMatt Lundin <mdl@imapmail.org>
Tue, 29 Jul 2014 04:56:42 +0000 (28 23:56 -0500)
committerBastien Guerry <bzg@altern.org>
Tue, 29 Jul 2014 13:21:21 +0000 (29 15:21 +0200)
treef150c63a371c95f1cf9681fa3d8c069d3a134726
parent812a88965765d60e8d3917bdf370fdbf1ed8250a
Remove unnecessary invocations of org-mode

* lisp/ox-publish.el: (org-publish-find-title) (org-publish-find-date)
  Fix unnecessary invocations of org-mode with
  org-inhibit-startup.

The functions above call org-mode with org-inhibit-startup in org
buffers that are already open. The result is that these open buffers
lose some crucial local variables during publishing. For instance,
an open buffer will lose its dir-local-variables-alist setting
during publishing. There is no need to call org-mode here, because
org-mode is a) either already initialized in the buffer or b)
initialized via earlier call to find-file-no-select.

This looks to me like a relic of some past time when these functions were
called in temporary buffers that contained copies of the file's contents.
lisp/ox-publish.el