From: Matt Lundin <mdl@imapmail.org>
To: Paul Mead <paul.d.mead@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Excluding just heading from export
Date: Sat, 06 Feb 2010 09:22:35 -0500 [thread overview]
Message-ID: <87tytue95g.fsf@fastmail.fm> (raw)
In-Reply-To: <87hbpufqq1.fsf@gmail.com> (Paul Mead's message of "Sat, 06 Feb 2010 13:17:42 +0000")
Paul Mead <paul.d.mead@gmail.com> 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
next prev parent reply other threads:[~2010-02-06 14:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-06 13:17 Excluding just heading from export Paul Mead
2010-02-06 14:22 ` Matt Lundin [this message]
2010-02-06 14:58 ` Paul Mead
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=87tytue95g.fsf@fastmail.fm \
--to=mdl@imapmail.org \
--cc=emacs-orgmode@gnu.org \
--cc=paul.d.mead@gmail.com \
/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).