From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Subtree export problems Date: Sun, 07 Feb 2016 01:14:51 +0100 Message-ID: <87oabtxtok.fsf@gmx.us> References: <87pow93oua.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSD0I-0000Bt-GD for emacs-orgmode@gnu.org; Sat, 06 Feb 2016 19:15:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSD0F-0004C7-A1 for emacs-orgmode@gnu.org; Sat, 06 Feb 2016 19:15:02 -0500 Received: from plane.gmane.org ([80.91.229.3]:56752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSD0F-0004C2-2t for emacs-orgmode@gnu.org; Sat, 06 Feb 2016 19:14:59 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aSD0D-0005qT-8g for emacs-orgmode@gnu.org; Sun, 07 Feb 2016 01:14:57 +0100 Received: from x4db1025c.dyn.telefonica.de ([77.177.2.92]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Feb 2016 01:14:57 +0100 Received: from rasmus by x4db1025c.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Feb 2016 01:14:57 +0100 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: emacs-orgmode@gnu.org Hi Tom, Thomas S. Dye writes: >> How could it do anything else? Try to narrow to the subtree >> and run your code (see also org-export-as and how subtree >> export works; it narrows). You will see that your code >> returns nil. > > Interesting, thanks, that makes sense. So, IIUC narrowing puts > the "keywords" at the top of the buffer out of scope. I agree. > I fiddled around a bit and came up with this, which seems to > work: ... Cool! Perhaps something like org-with-wide-buffer would allow you to recapture your keywords/properties. Otherwise you might be able to add a λ to org-export-before-processing-hook to add your own known keywords/properties to each headline. >> You are using a hack to use something that you think looks like >> a Org keyword, but which is not (in particular it’s unknown to >> ox backends). I think you can check >> org-export-get-environment and org-export-define-backend to >> appreciate this. > > Am I right that what John Kitchin's code (jk-org-kwd) refers to > as "keyword" should be called "property" instead? This makes > more sense to me in light of the above. Probably. But it was formatted as a keyword (i.e. #+KEYWORD:). > Also, I don't understand what you mean by "hack". Should I be > wary of using John's functions? I find them handy to mark bits > of information that the user (usually me) might want to change. > They save the need to rummage around a long document to find > where the information is actually used. Should I use other > functions instead? I’d say "no". I rely on plenty of hacks in my own documents (13 filters in my standard Makefile conf.el). There's nothing wrong with that as long as you know that you are playing with the fire. In this case you need to worry about the scope. Probably other pitfalls exist. Rasmus -- When in doubt, do it!