From: James Harkins <jamshark70@gmail.com>
To: orgmode <emacs-orgmode@gnu.org>
Subject: org-element-map no-recursion argument?
Date: Thu, 30 Jan 2014 10:26:14 +0800 [thread overview]
Message-ID: <4e38543e-3fe5-47f2-a166-abe4a7a8d98a@dewdrop-world.net> (raw)
I've written some emacs-lisp using org-element-map to iterate over source
code blocks in an org buffer and insert them into another buffer, including
a listing number and caption (so it's different from tangling).
I was just trying to tweak it to ignore source code blocks in a comment
section.
More specifically -- I had moved some material into a "Removed" subtree
(with a tag "noexport"). This subtree contains some source blocks, but I
want my function to ignore these.
I thought I could wrap the entire "Removed" section in #+begin/end_comment,
and then tell org-element-map to skip comment blocks for recursion.
(org-element-map tree 'src-block (lambda (element) ...)
nil nil 'comment)
But this has no effect. I guess the src-block filter erases the distinction
between "live" and commented sections.
I can work around it by commenting out the captions, but it would be nicer
to have an entire "off-limits" section of the document.
hjh
next reply other threads:[~2014-01-30 2:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-30 2:26 James Harkins [this message]
2014-01-30 10:39 ` org-element-map no-recursion argument? Nicolas Goaziou
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e38543e-3fe5-47f2-a166-abe4a7a8d98a@dewdrop-world.net \
--to=jamshark70@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.