From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Welle Subject: Re: Export subtrees of level n Date: Sun, 03 Sep 2017 20:20:46 +0200 Message-ID: <87shg31w5d.fsf@luisa.c0t0d0s0.de> References: <8737846w8s.fsf@luisa.c0t0d0s0.de> <87d178dwsp.fsf@alphapapa.net> <87fuc45gy7.fsf@luisa.c0t0d0s0.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doZW1-0003iv-Bk for emacs-orgmode@gnu.org; Sun, 03 Sep 2017 14:21:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doZVw-0002Ko-ML for emacs-orgmode@gnu.org; Sun, 03 Sep 2017 14:21:01 -0400 Received: from mout.gmx.net ([212.227.15.18]:55414) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1doZVw-0002Jj-Bv for emacs-orgmode@gnu.org; Sun, 03 Sep 2017 14:20:56 -0400 Received: from stella.c0t0d0s0.de ([89.204.155.185]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M5cMq-1dZFcr0Qcy-00xYft for ; Sun, 03 Sep 2017 20:20:53 +0200 Received: from Stella (stella.c0t0d0s0.de [192.168.42.1]) by stella.c0t0d0s0.de (Postfix) with ESMTP id BAEBDC406A for ; Sun, 3 Sep 2017 20:20:47 +0200 (CEST) In-Reply-To: (Joon Ro's message of "Sun, 3 Sep 2017 17:26:05 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hello, Joon Ro 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