* Exporting each subtree, including the headline?
@ 2018-10-15 18:20 Diego Zamboni
2018-10-17 6:58 ` Diego Zamboni
0 siblings, 1 reply; 2+ messages in thread
From: Diego Zamboni @ 2018-10-15 18:20 UTC (permalink / raw)
To: Org-mode
[-- Attachment #1: Type: text/plain, Size: 926 bytes --]
Hi,
I am working on publishing a book using LeanPub (
https://leanpub.com/learning-hammerspoon/), produced from an Org source
file. I am trying to use the code from
https://medium.com/@lakshminp/publishing-a-book-using-org-mode-9e817a56d144,
which you can see here:
https://gist.githubusercontent.com/badri/4d1bf1f0a24e8db5065e31946355cfe3/raw/86889ba22e381252e11aa3a8678f31023aa10f7e/leanpub-export.el
The code works, and each resulting file (one per top-level subtree)
contains the corresponding section, but without the headline. I would like
the headling to be exported as well.
I have been looking around and found this:
https://emacs.stackexchange.com/a/2260. This code exports each section
including its headline, but each file contains the corresponding section
PLUS everything after it.
I've been poking around the org functions, but I haven't been able to
figure this out. Any ideas?
Thanks in advance,
--Diego
[-- Attachment #2: Type: text/html, Size: 1558 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Exporting each subtree, including the headline?
2018-10-15 18:20 Exporting each subtree, including the headline? Diego Zamboni
@ 2018-10-17 6:58 ` Diego Zamboni
0 siblings, 0 replies; 2+ messages in thread
From: Diego Zamboni @ 2018-10-17 6:58 UTC (permalink / raw)
To: Org-mode
[-- Attachment #1: Type: text/plain, Size: 1468 bytes --]
Hi again,
Just for the record, I figured out the solution to this. I had to modify
the function to run org-mark-subtree on each element before calling the
export function - this way, the whole selected region is exported,
including the headline.
If anyone is interested, you can see my final leanpub-export function here:
https://github.com/zzamboni/dot-emacs/blob/master/init.org#publishing-to-leanpub
Best,
--Diego
On Mon, Oct 15, 2018 at 8:20 PM Diego Zamboni <diego@zzamboni.org> wrote:
> Hi,
>
> I am working on publishing a book using LeanPub (
> https://leanpub.com/learning-hammerspoon/), produced from an Org source
> file. I am trying to use the code from
> https://medium.com/@lakshminp/publishing-a-book-using-org-mode-9e817a56d144,
> which you can see here:
> https://gist.githubusercontent.com/badri/4d1bf1f0a24e8db5065e31946355cfe3/raw/86889ba22e381252e11aa3a8678f31023aa10f7e/leanpub-export.el
>
> The code works, and each resulting file (one per top-level subtree)
> contains the corresponding section, but without the headline. I would like
> the headling to be exported as well.
>
> I have been looking around and found this:
> https://emacs.stackexchange.com/a/2260. This code exports each section
> including its headline, but each file contains the corresponding section
> PLUS everything after it.
>
> I've been poking around the org functions, but I haven't been able to
> figure this out. Any ideas?
>
> Thanks in advance,
> --Diego
>
>
[-- Attachment #2: Type: text/html, Size: 2572 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-17 6:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-15 18:20 Exporting each subtree, including the headline? Diego Zamboni
2018-10-17 6:58 ` Diego Zamboni
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).