emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: York Zhao <gtdplatform@gmail.com>
To: York Zhao <gtdplatform@gmail.com>, emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Wrong numbering after removal of headline
Date: Mon, 30 Jun 2014 19:01:50 -0400	[thread overview]
Message-ID: <CAD3zm22BLWn2xWYrJw6aG+MDUf3ocg-+33giLaHWyxAKVmYrEg@mail.gmail.com> (raw)
In-Reply-To: <CAD3zm21GQz013dCDC5rg7P4ftAdDS=L=KSfH8-Jjf=NowiO33Q@mail.gmail.com>

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	other threads:[~2014-06-30 23:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 19:02 Wrong numbering after removal of headline York Zhao
2014-06-30 19:37 ` Thomas S. Dye
2014-06-30 21:32   ` York Zhao
2014-06-30 21:37     ` Thomas S. Dye
2014-06-30 21:38 ` Nicolas Goaziou
2014-06-30 22:23   ` York Zhao
2014-06-30 23:01     ` York Zhao [this message]

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=CAD3zm22BLWn2xWYrJw6aG+MDUf3ocg-+33giLaHWyxAKVmYrEg@mail.gmail.com \
    --to=gtdplatform@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).