emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Ignoring empty subtrees/new exporter


From: Florian Beck
Subject: [O] Ignoring empty subtrees/new exporter
Date: Sat, 05 Jan 2013 20:36:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Hi,

I have a document with many sections not yet written (i.e. heading without content) and I would like them to be ignored in the exported file. I know, I could manually tag these headings with :noexport:, but what about a more automated approach?

Now, I tried this:


  (defun ignore-empty-section (headline contents info)
    (when contents
      (org-e-latex-headline headline contents info)))


  (add-to-list 'org-e-latex-translate-alist
  '(headline . ignore-empty-section))

This does ALMOST what I want: it ignores sections that are completely empty. But I also want to ignore sections that have only empty subsections (and so on, recursively). For example:

* Chapter
** this subtree should be ignored
*** no content
*** no content
** this subtree should not be ignored
*** subsection
**** finally, content
something weird
*** subsection

Any ideas? I tried parsing the HEADLINE stuff (the first argument), but it looks a bit intimidating.

It's not super important, because it's a draft obviously, but it would be nice.

Thanks,
Florian



reply via email to

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