From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: export tree Date: Sat, 19 May 2012 17:57:31 -0400 Message-ID: <22959.1337464651@alphaville> References: <87ipfrc168.fsf@med.uni-goettingen.de> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVrem-00053f-Q5 for emacs-orgmode@gnu.org; Sat, 19 May 2012 17:57:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVrel-0004zK-3P for emacs-orgmode@gnu.org; Sat, 19 May 2012 17:57:48 -0400 Received: from g4t0017.houston.hp.com ([15.201.24.20]:13829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVrek-0004v1-Ub for emacs-orgmode@gnu.org; Sat, 19 May 2012 17:57:47 -0400 In-Reply-To: Message from Andreas Leha of "Sat, 19 May 2012 23:26:39 +0200." <87ipfrc168.fsf@med.uni-goettingen.de> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Andreas Leha Cc: emacs-orgmode@gnu.org Andreas Leha wrote: > Hi all, > > what is the best way to export the whole current tree (starting from the > top-level headline)? > > Background: > I have some documents with this structure > > ,---- > | * Document 1 > | > | * Document 2 > | > | * Some Functions > | > | * Some more Functions > `---- > > Now, when I am editing somewhere deep inside the Document 2. How do I > export the whole "Document 2" tree the fastest way? > There is for sure a faster way than moving the point to the headline > "Document 2" and starting a subtree-export. > > Note: > I am aware of the org-export-exclude-tags (:noexport:). But these > require a to change the .org file just to export "Document 1" in > between. I am looking for something like export-current-tree similar to > export export-current-subtree. > > > Any hints? > Write a function and bind it to a key - something like this perhaps: --8<---------------cut here---------------start------------->8--- (defun ah-export-current-top-level-tree () (interactive) (save-excursion (outline-up-heading (org-current-level)) (let ((org-export-initial-scope 'subtree)) (org-export)))) --8<---------------cut here---------------end--------------->8--- Nick