From: Carsten Dominik <dominik@science.uva.nl>
To: news@aleblanc.cotse.netnews@aleblanc.cotse.net
Cc: emacs-orgmode@gnu.org
Subject: Re: alter all subtrees containing specific tag
Date: Sun, 8 Mar 2009 14:29:57 +0100 [thread overview]
Message-ID: <E40241E3-D6BC-4BA5-81D4-DC3382A2A4A2@uva.nl> (raw)
In-Reply-To: <877i303a9w.fsf@it.com>
On Mar 8, 2009, at 5:31 AM, <news@aleblanc.cotse.net> <news@aleblanc.cotse.net
> wrote:
> Hi,
> I use pgg to encrypt some org subtrees (e.g. the ones containing
> passwords). At the moment I have to encrypt/decrypt them one at a
> time by selecting the appropriate region and running
> pgg-encrypt-region/pgg-decrypt-region.
> I want to make a function that will automatically encrypt/decrypt
> all
> subtrees (in the current buffer) whose headings contain
> an :ENCRYPT: tag.
> I tried using org-map-entries, but it seems to restore the buffer to
> its original state after returning.
No, org-map-entries should be perfect for this, and it does not
restore the buffer.
This should really well. The only thing that might happen, by
replacing the
subtree, that it does not know correctly where to continue and
therefore it might do
every tree twice?
> Is there a quick way to get the start and end points of a subtree,
> or
> place region around it? and a quick way to jump to the next heading
> with a given tag?
(org-mark-subtree) ;; this will include the headline
(re-search-forward "^\\*+ .*?:ENCRYPT:" nil t)
- Carsten
next prev parent reply other threads:[~2009-03-08 13:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-08 4:31 alter all subtrees containing specific tag news
2009-03-08 13:29 ` Carsten Dominik [this message]
2009-03-08 18:00 ` news
2009-03-09 0:56 ` news
2009-03-09 2:32 ` news
2009-03-09 12:28 ` news
2009-03-08 13:42 ` Ian Barton
2009-03-08 18:01 ` news
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=E40241E3-D6BC-4BA5-81D4-DC3382A2A4A2@uva.nl \
--to=dominik@science.uva.nl \
--cc=emacs-orgmode@gnu.org \
--cc=news@aleblanc.cotse.netnews \
/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).