emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH]Extend export hook example for removing headlines with tag ig


From: Ondřej Grover
Subject: [O] [PATCH]Extend export hook example for removing headlines with tag ignore_heading
Date: Sun, 12 Apr 2015 13:59:00 +0200

Hello,

I've attached a patch for the Advanced configuration (for exporting) chapter of the Org mode manual that extends the hook example there to provide the commonly requested ignoreheading-like functionality found in the Beamer backend. The example is very simple and adds just one line of code to the function thanks to the MATCH argument of the `org-map-entries` function.
The commit message contains the TINYCOMMIT cookie as I'm not a FSF member.

Originally I only intended this solution to be an answer to questions on StackOverflow that did not help me much (http://stackoverflow.com/a/29588450/4779220), but I think it is something very commonly requested and should be documented and easily accessible.

How I discovered this solution:
I've always liked the `ignoreheading` tag functionality in Beamer export. I wanted to have something like it for all export backends.
The solutions I found on the Internet either didn't work or were filter based which did not remove the headline nodes in the parsed structure.
So I decided to make my own solution. I found the hook example for removing all headlines before processing in the Org manual. That was almost what I wanted, but I needed to limit it to headlines with a tag. I had a look at the documentation of the `org-map-entries` function and discovered the MATCH argument that can match tags like in agenda views. So in the end I added just 1 line of code to the example.

This experience once again showed me that Emacs truly is an extensible self-documenting editor. I'd like to express my gratitude to all the contributors of Emacs and Org mode.

Kind regards,
Ondřej Grover

Attachment: 0001-org.texi-Extend-export-hook-example-with-ignore_head.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]