emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Welle <mwe012008@gmx.net>
To: emacs-orgmode@gnu.org
Subject: Re: Export subtrees of level n
Date: Sun, 03 Sep 2017 20:20:46 +0200	[thread overview]
Message-ID: <87shg31w5d.fsf@luisa.c0t0d0s0.de> (raw)
In-Reply-To: <BY2PR15MB042185CA2593C7AFE351BEA9EB900@BY2PR15MB0421.namprd15.prod.outlook.com> (Joon Ro's message of "Sun, 3 Sep 2017 17:26:05 +0000")

Hello,

Joon Ro <joon.ro@outlook.com> 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."
  (interactive)
  (unless level (setq level 1))
  (save-excursion
  (while (< level (or (org-up-heading-safe) -1)))
  (if (org-at-heading-p)
      (org-export-dispatch))))


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


Regards
hmw

      reply	other threads:[~2017-09-03 18:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-03  8:07 Export subtrees of level n Michael Welle
2017-09-03  8:12 ` Nicolas Goaziou
2017-09-03  8:18   ` Michael Welle
2017-09-03  8:13 ` Adam Porter
2017-09-03  8:23   ` Michael Welle
2017-09-03 17:26     ` Joon Ro
2017-09-03 18:20       ` Michael Welle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87shg31w5d.fsf@luisa.c0t0d0s0.de \
    --to=mwe012008@gmx.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).