This patch fixes a bug in which org-publish makes the following call... (let ((org-inhibit-startup t) (org-mode))) ...in buffers that are already open. This often happens, for instance, when publishing a sitemap. But there is no need to call org-mode again in these open buffers. Moreover calling org-mode with org-inhibit-startup set to t destroys crucial information in open buffers, such as dir-locals variables. This can interfere rather seriously with web publishing, causing website files I am editing to lose the following crucial settings after I call org-publish: ((org-mode . ((org-link-file-path-type . relative) (org-display-custom-times . t)))) Thanks, Matt