[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Export subtrees of level n

From: Michael Welle
Subject: Re: [O] Export subtrees of level n
Date: Sun, 03 Sep 2017 20:20:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)


Joon Ro <address@hidden> writes:

>> 2.  Write a function to look up the tree from point and export the first
>> subtree with a certain property.
> I thought about implementing the second approach. I have slides for
> several talks in the same org file. Since I mostly need this
> functionality when I'm developing slides, just going up from point until
> reaching the desired heading is easy to implement.
> If you can implement this, that would be great as I find myself doing
> this all the time as well.
I use this ad hoc implementation:

(defun hmw/org-export (&optional level)
  "Go up to a section of level `level', if there is any, and then call 
`org-export-dispatch'. `level' defaults to 1."
  (unless level (setq level 1))
  (while (< level (or (org-up-heading-safe) -1)))
  (if (org-at-heading-p)

That hack could be optimised, but works for me ;).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]