|
From: | Carsten Dominik |
Subject: | Re: [Orgmode] alter all subtrees containing specific tag |
Date: | Sun, 8 Mar 2009 14:29:57 +0100 |
On Mar 8, 2009, at 5:31 AM, <address@hidden> <address@hidden > 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, orplace 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
[Prev in Thread] | Current Thread | [Next in Thread] |