From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Excluding just heading from export Date: Sat, 06 Feb 2010 09:22:35 -0500 Message-ID: <87tytue95g.fsf@fastmail.fm> References: <87hbpufqq1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NdlWK-0006DL-9N for emacs-orgmode@gnu.org; Sat, 06 Feb 2010 09:20:24 -0500 Received: from [199.232.76.173] (port=46157 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdlWJ-0006D7-CZ for emacs-orgmode@gnu.org; Sat, 06 Feb 2010 09:20:23 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NdlWG-0002zj-F0 for emacs-orgmode@gnu.org; Sat, 06 Feb 2010 09:20:22 -0500 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:45638) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NdlWF-0002yg-Gi for emacs-orgmode@gnu.org; Sat, 06 Feb 2010 09:20:20 -0500 In-Reply-To: <87hbpufqq1.fsf@gmail.com> (Paul Mead's message of "Sat, 06 Feb 2010 13:17:42 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Paul Mead Cc: emacs-orgmode@gnu.org Paul Mead writes: > is there any way of excluding just a heading from export, whilst exporting > the text below it in the usual way? If I use :noexport: it does what it > says in the documentation - prevents the entire subtree from exporting. > > For my current work though, I'd like to use headings to rough out a > structure write notes - noexport is fine for this. Then in each section > I want to export the final 'written up' version. I can separate those > with different headings, but don't want the headings to show up in the > exported text. > > Example: > > * Essay title > ** Notes on paragraph 1 :noexport: > These are notes which I want to remain hidden, including the heading > ** Paragraph 1 > This is the text I want to see exported, but I don't want the heading > One hack would be to use an export hook to remove headings with a particular tag. E.g., --8<---------------cut here---------------start------------->8--- (defvar my-org-export-remove-heading-tag "killtag") (defun my-org-export-remove-headings-with-tag () (while (re-search-forward (concat ":" my-org-export-remove-heading-tag ":") nil t) (beginning-of-line) (kill-line))) (add-hook 'org-export-preprocess-after-tree-selection-hook 'my-org-export-remove-headings-with-tag) --8<---------------cut here---------------end--------------->8--- Best, Matt