From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Cubizolles Subject: Bulk cut in agenda view Date: Sun, 10 Jul 2011 16:45:37 +0200 Message-ID: <87box2fb3i.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfvKk-0004Rr-0B for emacs-orgmode@gnu.org; Sun, 10 Jul 2011 10:50:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QfvKj-0007xa-4E for emacs-orgmode@gnu.org; Sun, 10 Jul 2011 10:50:09 -0400 Received: from lo.gmane.org ([80.91.229.12]:54059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfvKi-0007x5-QS for emacs-orgmode@gnu.org; Sun, 10 Jul 2011 10:50:09 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QfvKf-0007Rc-KT for emacs-orgmode@gnu.org; Sun, 10 Jul 2011 16:50:05 +0200 Received: from mrc45-3-88-170-177-174.fbx.proxad.net ([88.170.177.174]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Jul 2011 16:50:05 +0200 Received: from j.cubizolles by mrc45-3-88-170-177-174.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Jul 2011 16:50:05 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I often need to purge DONE items from my org files. I have set up a special agenda view for checking those items and cutting some subtrees from it using bulk commands. I'm using a function adapted from the example in the manual (I've no idea if it's the best way to do it however) : ,---- | (defun bulk-cut () | (interactive "P") | (let* ((marker (or (org-get-at-bol 'org-hd-marker) | (org-agenda-error))) | (buffer (marker-buffer marker))) | (with-current-buffer buffer | (save-excursion | (save-restriction | (widen) | (goto-char marker) | (org-back-to-heading t) | (org-cut-subtree)))))) `---- Typing B f bulk-cut RET removes the selected items but it's a lot of typing for a very useful action in my opinion. Could it be added to the list of default bulk actions, with a "X" key for example ?