From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Difference between subtree-restricted export and 'publish enclosing subtree' Date: Thu, 21 Apr 2011 18:04:11 +0200 Message-ID: References: <87bp0h9ghl.fsf@zephyr.silentflame.com> <87sjtsrj63.fsf@fastmail.fm> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCwMi-0003Hc-AX for emacs-orgmode@gnu.org; Thu, 21 Apr 2011 12:04:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCwMh-0006MY-1A for emacs-orgmode@gnu.org; Thu, 21 Apr 2011 12:04:24 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:43325) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCwMg-0006MT-TI for emacs-orgmode@gnu.org; Thu, 21 Apr 2011 12:04:22 -0400 Received: by wyf19 with SMTP id 19so1887568wyf.0 for ; Thu, 21 Apr 2011 09:04:21 -0700 (PDT) In-Reply-To: <87sjtsrj63.fsf@fastmail.fm> 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: Matt Lundin Cc: Sean Whitton , emacs-orgmode@gnu.org On 8.4.2011, at 15:01, Matt Lundin wrote: > Sean Whitton writes: >=20 >> Dear all, >>=20 >> I noticed the "publish enclosing subtree" command in the export >> dispatcher today and I can't make it work, nor can I see how it = differs >> =46rom publishing a subtree (and needless to say I can't seem to find = any >> documentation). >>=20 >> This is a section of my .org file: >>=20 >> ,---- >> | * STARTED Hume Essay #2: Causation >> | DEADLINE: <2011-04-19 Tue> >> | [2011-03-14 Mon 16:04] >> | = [[gnus:nnimap%2BNucifera:INBOX#2E7232813422F0459DA862F6653E33202483027005@= EXMBX06.ad.oak.ox.ac.uk][Reading >> | list]] >> |=20 >> | *Does Hume think that causal power is all in the mind?* >> | ** TODO Essay >> | :PROPERTIES: >> | :EXPORT_FILE_NAME: hume-essay-causation >> | :EXPORT_AUTHOR: Sean Whitton, Balliol >> | :EXPORT_DATE: April 2011 >> | :EXPORT_TITLE: Does Hume think that causal power is all in the = mind? >> | :EXPORT_OPTIONS: todo:nil toc:nil skip:t >> | :LaTeX_CLASS: spwessay >> | :END: >> | ***=20 >> | Blah de blah (check above for how to do footnotes). >> `---- >>=20 >> (yup I'm a non-science student using org, so shoot me :P) >=20 > Welcome to the club. :) >=20 >> When I put my cursor in the properties drawer within the essay text >> and hit C-c C-e 1 d I get my 'essay' exported and processed to >> hume-essay-causation.pdf correctly, but if I instead use C-c C-e SPC >> with point at various different places within the essay, I just get >> the error 'No enclosing node with LaTeX_CLASS or EXPORT_FILE_NAME', >> yet afaics they are there. >=20 > Yes, there are a few issues here. >=20 > I can replicate this bug when the cursor is above the LATEX_CLASS > property. For instance, if the cursor is located on the :PROPERTIES: > line, C-c C-e SPC results in an error. If it is on the :END: line, it > finds the relevant headline >=20 > The problem is that C-c C-e space calls a simple backwards regexp = search > for the two properties. But the regexp search looks for export_title > instead of export_file_name (lines 998-1000): >=20 > (if (re-search-backward > "^[ \t]+\\(:latex_class:\\|:export_title:\\)[ \t]+\\S-" > nil t) >=20 > In addition, the regexp search is not bounded, Both issues are fixed now, thanks Matt for doing the footwork. - Carsten > so if you have another > headline higher up in the file with one of the properties in the = search, > such as... >=20 > --8<---------------cut here---------------start------------->8--- > * Kant Essay > :PROPERTIES: > :LATEX_CLASS: spwessay > :END: > ** Some text > --8<---------------cut here---------------end--------------->8--- >=20 > ...hitting space will export that essay instead. >=20 >> How do I make the SPC command work and how does it differ from a = subtree >> export? =20 >=20 > My guess is that the former was introduced to make it more convenient = to > export subtrees with the relevant properties. I.e., one can simply = press > C-c C-e SPC at the current point, rather than having to mark the tree > manually. >=20 > Best, > Matt >=20