* Difference between subtree-restricted export and 'publish enclosing subtree'
@ 2011-04-08 10:36 Sean Whitton
2011-04-08 13:01 ` Matt Lundin
0 siblings, 1 reply; 4+ messages in thread
From: Sean Whitton @ 2011-04-08 10:36 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]
Dear all,
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
From publishing a subtree (and needless to say I can't seem to find any
documentation).
This is a section of my .org file:
,----
| * 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]]
|
| *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:
| ***
| Blah de blah (check above for how to do footnotes).
`----
(yup I'm a non-science student using org, so shoot me :P)
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.
How do I make the SPC command work and how does it differ from a subtree
export? Thanks.
S
--
Sean Whitton / <sean@silentflame.com>
OpenPGP KeyID: 0x3B6D411B
http://sean.whitton.me/
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Difference between subtree-restricted export and 'publish enclosing subtree'
2011-04-08 10:36 Difference between subtree-restricted export and 'publish enclosing subtree' Sean Whitton
@ 2011-04-08 13:01 ` Matt Lundin
2011-04-09 9:23 ` Sean Whitton
2011-04-21 16:04 ` Carsten Dominik
0 siblings, 2 replies; 4+ messages in thread
From: Matt Lundin @ 2011-04-08 13:01 UTC (permalink / raw)
To: Sean Whitton; +Cc: emacs-orgmode
Sean Whitton <sean@silentflame.com> writes:
> Dear all,
>
> 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
> From publishing a subtree (and needless to say I can't seem to find any
> documentation).
>
> This is a section of my .org file:
>
> ,----
> | * 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]]
> |
> | *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:
> | ***
> | Blah de blah (check above for how to do footnotes).
> `----
>
> (yup I'm a non-science student using org, so shoot me :P)
Welcome to the club. :)
> 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.
Yes, there are a few issues here.
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
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):
(if (re-search-backward
"^[ \t]+\\(:latex_class:\\|:export_title:\\)[ \t]+\\S-"
nil t)
In addition, the regexp search is not bounded, so if you have another
headline higher up in the file with one of the properties in the search,
such as...
--8<---------------cut here---------------start------------->8---
* Kant Essay
:PROPERTIES:
:LATEX_CLASS: spwessay
:END:
** Some text
--8<---------------cut here---------------end--------------->8---
...hitting space will export that essay instead.
> How do I make the SPC command work and how does it differ from a subtree
> export?
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.
Best,
Matt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: Difference between subtree-restricted export and 'publish enclosing subtree'
2011-04-08 13:01 ` Matt Lundin
@ 2011-04-09 9:23 ` Sean Whitton
2011-04-21 16:04 ` Carsten Dominik
1 sibling, 0 replies; 4+ messages in thread
From: Sean Whitton @ 2011-04-09 9:23 UTC (permalink / raw)
To: Matt Lundin; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1793 bytes --]
Hi,
On 8 Apr 2011 at 13:01Z, Matt Lundin wrote:
>> 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.
> Yes, there are a few issues here.
> 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
Interesting. I get the problem from anywhere in the subtree - it
doesn't seem to be able to find the latex_class nor the
export_title/export_file_name.
> 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):
> (if (re-search-backward "^[
> \t]+\\(:latex_class:\\|:export_title:\\)[ \t]+\\S-" nil t)
> In addition, the regexp search is not bounded, so if you have another
> headline higher up in the file with one of the properties in the
> search, such as...
> * Kant Essay
>> PROPERTIES:
>> LATEX_CLASS: spwessay
>> END:
> ** Some text
> ...hitting space will export that essay instead.
Okay, so it looks like this isn't a feature that's really usable right
now. Maybe I'll write a patch to fix it at some point; for now I can
just use C-c C-u C-c C-e 1. Thanks for the feedback.
S
--
Sean Whitton / <sean@silentflame.com>
OpenPGP KeyID: 0x3B6D411B
http://sean.whitton.me/
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Difference between subtree-restricted export and 'publish enclosing subtree'
2011-04-08 13:01 ` Matt Lundin
2011-04-09 9:23 ` Sean Whitton
@ 2011-04-21 16:04 ` Carsten Dominik
1 sibling, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2011-04-21 16:04 UTC (permalink / raw)
To: Matt Lundin; +Cc: Sean Whitton, emacs-orgmode
On 8.4.2011, at 15:01, Matt Lundin wrote:
> Sean Whitton <sean@silentflame.com> writes:
>
>> Dear all,
>>
>> 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
>> From publishing a subtree (and needless to say I can't seem to find any
>> documentation).
>>
>> This is a section of my .org file:
>>
>> ,----
>> | * 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]]
>> |
>> | *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:
>> | ***
>> | Blah de blah (check above for how to do footnotes).
>> `----
>>
>> (yup I'm a non-science student using org, so shoot me :P)
>
> Welcome to the club. :)
>
>> 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.
>
> Yes, there are a few issues here.
>
> 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
>
> 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):
>
> (if (re-search-backward
> "^[ \t]+\\(:latex_class:\\|:export_title:\\)[ \t]+\\S-"
> nil t)
>
> 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...
>
> --8<---------------cut here---------------start------------->8---
> * Kant Essay
> :PROPERTIES:
> :LATEX_CLASS: spwessay
> :END:
> ** Some text
> --8<---------------cut here---------------end--------------->8---
>
> ...hitting space will export that essay instead.
>
>> How do I make the SPC command work and how does it differ from a subtree
>> export?
>
> 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.
>
> Best,
> Matt
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-21 16:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 10:36 Difference between subtree-restricted export and 'publish enclosing subtree' Sean Whitton
2011-04-08 13:01 ` Matt Lundin
2011-04-09 9:23 ` Sean Whitton
2011-04-21 16:04 ` Carsten Dominik
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.