emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] ox-org.el subtree export appears broken
@ 2013-11-06 17:59 Eric Schulte
  2013-11-06 18:34 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Schulte @ 2013-11-06 17:59 UTC (permalink / raw)
  To: Org Mode Mailing List

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

Specifically, the title is not taken from the current heading, and
subheadings are not promoted to the top level.

Export the "Example Subtree" heading in the attached example file using
the "subtree" option to demonstrate.

Thanks,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: minimal.org --]
[-- Type: text/x-org, Size: 1309 bytes --]

#+Title: Subtree Export Example

* Top
** Problem
I think subtree exports are broken using the Org-mode backend.  I
would expect the subtree title to become the exported page title, and
all nested heading to be promoted to the top level, however this does
not happen.  This appears to work with other backends (confirmed with
the html backend).

** Example Subtree
With the point in this subtree I export using the =subtree= option.

*** Nested subtree one
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.

*** Nested subtree two
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.

[-- Attachment #3: Type: text/plain, Size: 63 bytes --]


-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug] ox-org.el subtree export appears broken
  2013-11-06 17:59 [bug] ox-org.el subtree export appears broken Eric Schulte
@ 2013-11-06 18:34 ` Nicolas Goaziou
  2013-11-06 21:21   ` Eric Schulte
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2013-11-06 18:34 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode Mailing List

Hello,

Eric Schulte <schulte.eric@gmail.com> writes:

> Specifically, the title is not taken from the current heading, and
> subheadings are not promoted to the top level.

I partly fixed this: subheadings should now get correct level.

OTOH, "ox-org" back-end doesn't insert any keyword (DATE, AUTHOR,
TITLE), subtree export or not. If we add such keywords during subtree
export, we also have to add them during regular export. I'm not
convinced this is within the scope of that back-end.

What do you think?


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug] ox-org.el subtree export appears broken
  2013-11-06 18:34 ` Nicolas Goaziou
@ 2013-11-06 21:21   ` Eric Schulte
  2013-11-06 22:02     ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Schulte @ 2013-11-06 21:21 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode Mailing List

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> Eric Schulte <schulte.eric@gmail.com> writes:
>
>> Specifically, the title is not taken from the current heading, and
>> subheadings are not promoted to the top level.
>
> I partly fixed this: subheadings should now get correct level.
>

Confirmed, thanks.

>
> OTOH, "ox-org" back-end doesn't insert any keyword (DATE, AUTHOR,
> TITLE), subtree export or not. If we add such keywords during subtree
> export, we also have to add them during regular export. I'm not
> convinced this is within the scope of that back-end.
>
> What do you think?
>

I don't know as much about backends so I'm willing to defer.

My initial thoughts are that inserting keywords *with* values while not
inserting empty keywords would be the most intuitive.  This way a
subtree export would insert a title (taken from the subtree heading),
and any other keywords set as subtree properties, but whole-buffer
export wouldn't insert any keywords which weren't present in the
original.

I hope this makes sense, and thanks for the quick fix.

Best,

>
>
> Regards,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug] ox-org.el subtree export appears broken
  2013-11-06 21:21   ` Eric Schulte
@ 2013-11-06 22:02     ` Nicolas Goaziou
  2013-11-11  2:12       ` Eric Schulte
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2013-11-06 22:02 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode Mailing List

Eric Schulte <schulte.eric@gmail.com> writes:

> My initial thoughts are that inserting keywords *with* values while not
> inserting empty keywords would be the most intuitive.

TITLE always have a value. When not specified, it defaults to buffer's
name.

Also, what keywords? Document keywords (DATE, AUTHOR, TITLE)? Or other
export related keyword (CREATOR, DESCRIPTION, KEYWORDS, EMAIL)? Anything
else (OPTIONS, LANGUAGE...)?

Also, should these belong to the inner or outer template, i.e. should
they be excluded unconditionally on a "body-only" export, or not?

This is not very difficult to implement, but I'd rather have precise
specifications first. And since you are the one making the request...


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug] ox-org.el subtree export appears broken
  2013-11-06 22:02     ` Nicolas Goaziou
@ 2013-11-11  2:12       ` Eric Schulte
  2013-11-15 23:25         ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Schulte @ 2013-11-11  2:12 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode Mailing List

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Eric Schulte <schulte.eric@gmail.com> writes:
>
>> My initial thoughts are that inserting keywords *with* values while not
>> inserting empty keywords would be the most intuitive.
>
> TITLE always have a value. When not specified, it defaults to buffer's
> name.
>
> Also, what keywords? Document keywords (DATE, AUTHOR, TITLE)? Or other
> export related keyword (CREATOR, DESCRIPTION, KEYWORDS, EMAIL)? Anything
> else (OPTIONS, LANGUAGE...)?
>

Hmmm, I don't have a strong intuition here.  I'm tempted to say that
whatever the HTML export engine does would be a good starting place,
plus any keyword explicitly set in subtree properties.  I feel like this
decision must have already been made in some other Org-mode function, so
copying those decisions would be the best bet.

>
> Also, should these belong to the inner or outer template, i.e. should
> they be excluded unconditionally on a "body-only" export, or not?
>

Outer template, excluded from body only.

>
> This is not very difficult to implement, but I'd rather have precise
> specifications first. And since you are the one making the request...
>

Understood, and I do appreciate the implementation (and apologize for my
delay in reply).  I hope the above sound like a good starting place to
you.

For what it's worth, this need arose while lazily implementing
current-subtree-only Emacs driven presentations with epresent [1].

Thanks,

>
>
> Regards,


Footnotes: 
[1]  https://github.com/eschulte/epresent/commit/c94f03027033b39082a4897625974f893a17434a

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug] ox-org.el subtree export appears broken
  2013-11-11  2:12       ` Eric Schulte
@ 2013-11-15 23:25         ` Nicolas Goaziou
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2013-11-15 23:25 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode Mailing List

Hello,

Eric Schulte <schulte.eric@gmail.com> writes:

> Hmmm, I don't have a strong intuition here.  I'm tempted to say that
> whatever the HTML export engine does would be a good starting place,
> plus any keyword explicitly set in subtree properties.  I feel like this
> decision must have already been made in some other Org-mode function, so
> copying those decisions would be the best bet.

ox-org backend should now behave a bit more like regular export
back-ends (e.g. it can be affected with date:t option).

Just let me know if the change is sufficient.

Thank you.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-15 23:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 17:59 [bug] ox-org.el subtree export appears broken Eric Schulte
2013-11-06 18:34 ` Nicolas Goaziou
2013-11-06 21:21   ` Eric Schulte
2013-11-06 22:02     ` Nicolas Goaziou
2013-11-11  2:12       ` Eric Schulte
2013-11-15 23:25         ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).