From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subject: Re: alter all subtrees containing specific tag Date: Sun, 08 Mar 2009 18:00:37 +0000 Message-ID: <87iqmjopx6.fsf@it.com> References: <877i303a9w.fsf@it.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LgNIy-0003OI-0c for emacs-orgmode@gnu.org; Sun, 08 Mar 2009 14:00:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LgNIv-0003KM-Fc for emacs-orgmode@gnu.org; Sun, 08 Mar 2009 14:00:51 -0400 Received: from [199.232.76.173] (port=60473 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgNIv-0003K7-9B for emacs-orgmode@gnu.org; Sun, 08 Mar 2009 14:00:49 -0400 Received: from main.gmane.org ([80.91.229.2]:54511 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LgNIu-0002Sc-SV for emacs-orgmode@gnu.org; Sun, 08 Mar 2009 14:00:49 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LgNIt-0001Lh-92 for emacs-orgmode@gnu.org; Sun, 08 Mar 2009 18:00:47 +0000 Received: from 87-194-46-7.bethere.co.uk ([87.194.46.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 08 Mar 2009 18:00:47 +0000 Received: from news by 87-194-46-7.bethere.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 08 Mar 2009 18:00:47 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Carsten Dominik writes: >> 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. I discovered that the problem is with pgg-encrypt not org. For some reason it only works properly if I call it interactively. > > 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 I don't have this function (Org-mode version 6.24). -- aleblanc