emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Bulk cut in agenda view


From: Julien Cubizolles
Subject: [O] Bulk cut in agenda view
Date: Sun, 10 Jul 2011 16:45:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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 ?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]