emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Wrong numbering after removal of headline


From: York Zhao
Subject: Re: [O] Wrong numbering after removal of headline
Date: Mon, 30 Jun 2014 19:01:50 -0400

Finally, I got it all work and am happy with the result, here is the code:

(defun yz/org-export-ignore-headline (backend)
  "Ignore headlines with tag `ignoreheading'."
  (save-excursion
    (let ((org-allow-promoting-top-level-subtree t))
      (org-map-entries
       (lambda ()
         (when (member "ignoreheading" (org-get-tags-at nil 'local))
           (org-promote-subtree)
           (delete-region (line-beginning-position) (line-end-position))))))))

(add-hook 'org-export-before-parsing-hook 'yz/org-export-ignore-headline)



reply via email to

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