From mboxrd@z Thu Jan 1 00:00:00 1970 From: suvayu ali Subject: Re: Tags included in subtree export title despite tags:nil in header Date: Wed, 2 Nov 2011 00:31:12 +0100 Message-ID: References: <83vcra2493.fsf@yahoo.it> <20111027134220.510ec38b@kuru.homelinux.net> <20111027140516.2f6d5508@kuru.homelinux.net> <87fwic6j37.fsf@gnu.org> <20111029164832.1c83474b@kuru.homelinux.net> <871utvu66a.fsf@gnu.org> <20111030011058.2e53a791@kuru.homelinux.net> <10900.1319936847@alphaville.dokosmarshall.org> <20111030085722.3a4d81d5@kuru.homelinux.net> <87ipn6zwzd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001636416cb97706c904b0b4c1fd Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLNnt-0002jx-Bp for emacs-orgmode@gnu.org; Tue, 01 Nov 2011 19:31:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLNnr-0001xV-DZ for emacs-orgmode@gnu.org; Tue, 01 Nov 2011 19:31:37 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:55052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLNnr-0001xF-5z for emacs-orgmode@gnu.org; Tue, 01 Nov 2011 19:31:35 -0400 Received: by eye4 with SMTP id 4so7356554eye.0 for ; Tue, 01 Nov 2011 16:31:33 -0700 (PDT) In-Reply-To: <87ipn6zwzd.fsf@gnu.org> 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: nicholas.dokos@hp.com, org-mode mailing list --001636416cb97706c904b0b4c1fd Content-Type: text/plain; charset=UTF-8 Hi Bastien and all, On Sun, 30 Oct 2011 09:48:06 +0100 Bastien wrote: > Suvayu Ali writes: > > > That said, the problem I am facing is org-export-with-tags > > evaluates to not-in-toc irrespective of what is set by the tags: > > option (see for example the test file earlier in the thread). So > > effectively the test is not checking what it is supposed to check. > > So I was wondering whether I missed something I should be doing. > > The problem is that `org-export-with-tags' is a global option, > storing the default value for any buffer (and _a fortiori_ any > subtree) -- while you want to check local options, which may > be different at export time. > > Local options are stored in a `org-export-opt-plist'. You get > the value of the "tags:" option by checking the property list > like this: > > (plist-get org-export-opt-plist :tags)) > > Hence the patch below, which you can try to make sure it does > what you want. > That seems to work only when the EXPORT_OPTIONS property is set for the subtree. Without the property, it doesn't pick up the tags:nil option from the file header. Actually, the property list doesn't even have the tags: property in it. However I did find a solution along those lines and the final patch is attached. :) Cheers, -- Suvayu Open source is the future. It sets us free. --001636416cb97706c904b0b4c1fd Content-Type: text/x-patch; charset=US-ASCII; name="0001-Respect-export-options-for-subtree-export-title.patch" Content-Disposition: attachment; filename="0001-Respect-export-options-for-subtree-export-title.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_guhj6bfa0 RnJvbSBkYWMwMjJmMTAzZjg0OThkZTk2ZmE1ZDBlNDBlMGI4NDBhZTljN2ZiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTdXZheXUgQWxpIDxmYXRrYXN1dmF5dStsaW51eEBnbWFpbC5j b20+CkRhdGU6IFdlZCwgMiBOb3YgMjAxMSAwMDoyNjowNyArMDEwMApTdWJqZWN0OiBbUEFUQ0hd IFJlc3BlY3QgZXhwb3J0IG9wdGlvbnMgZm9yIHN1YnRyZWUgZXhwb3J0IHRpdGxlCgoqIG9yZy1l eHAuZWwgKG9yZy1zb2xpZGlmeS1saW5rLXRleHQpOiBSZXNwZWN0IG9yZy1leHBvcnQtd2l0aC10 YWdzCiAgd2hlbiBmb3JtaW5nIHRoZSBleHBvcnQgdGl0bGUgZHVyaW5nIHN1YnRyZWUgZXhwb3J0 LgoKVElOWSBDS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