From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: [PATCH] Remove unecesssary invocations of org-mode in ox-publish Date: Tue, 29 Jul 2014 10:10:14 -0500 Message-ID: <87silknquh.fsf@fastmail.fm> References: <87mwbsn40z.fsf@fastmail.fm> <871tt4fggm.fsf@bzg.ath.cx> <87zjfsnsyf.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC92o-0005IU-RB for emacs-orgmode@gnu.org; Tue, 29 Jul 2014 11:10:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XC92j-0001WR-80 for emacs-orgmode@gnu.org; Tue, 29 Jul 2014 11:10:26 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:58144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC92j-0001WK-4F for emacs-orgmode@gnu.org; Tue, 29 Jul 2014 11:10:21 -0400 In-Reply-To: <87zjfsnsyf.fsf@fastmail.fm> (Matt Lundin's message of "Tue, 29 Jul 2014 10:03:21 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Org Mode Matt Lundin writes: > Bastien writes: > >> Hi Matt, >> >> Matt Lundin writes: >> >>> This patch fixes a bug in which org-publish makes the following call... >>> (let ((org-inhibit-startup t) (org-mode))) >> >> Applied, thanks! > > Oops... I see now that org-publish-find-date and org-publish-find-title > call org-export-get-environment. This in turn relies on org-set-local to > set #+BIND: variables, which requires the buffer to be writable. I have > an org-mode-hook that sets some of my web publishing files read-only (so > as to prevent accidental editing). Without org-inhibit-startup, these > buffers remain read-only, causing the following error message: [...continuing the previous post.] I think I've found a more general problem here. When called in an org buffer... (let ((org-inhibit-startup t)) (org-mode)) ...either wipes out dir-locals variables or prevents them from loading. I have looked at the org-mode code and am not entirely sure why this would be the case. However, this causes problems, for instance, when org-agenda-inhibit-startup is t or when calling org-toggle-tags-groups. And one more minor thing... The documentation for org-agenda-inhibit-startup says that the default is t. However, the default is nil. ,---- | Inhibit startup when preparing agenda buffers. | When this variable is `t' (the default), the initialization of | the Org agenda buffers is inhibited: e.g. the visibility state | is not set, the tables are not re-aligned, etc. `---- Thanks, Matt