From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-archive-done Date: Sun, 18 Jun 2006 09:05:53 +0200 Message-ID: <94a84102394ede474f74017dc38b3f6b@science.uva.nl> References: <874pyomawm.fsf@ibbu.nl> <4491EAC7.7080304@gmail.com> <44933E3A.9010100@gmail.com> <44946A6F.7020508@gmail.com> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FrrM7-0005LT-46 for emacs-orgmode@gnu.org; Sun, 18 Jun 2006 03:05:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FrrM5-0005Iz-6I for emacs-orgmode@gnu.org; Sun, 18 Jun 2006 03:05:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FrrM5-0005Im-22 for emacs-orgmode@gnu.org; Sun, 18 Jun 2006 03:05:57 -0400 Received: from [194.134.35.145] (helo=smtp05.wanadoo.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FrrW6-0001yj-5M for emacs-orgmode@gnu.org; Sun, 18 Jun 2006 03:16:18 -0400 Received: from [192.168.2.2] (dc5146d3e6.adsl.wanadoo.nl [81.70.211.230]) by smtp5.wanadoo.nl (Postfix) with ESMTP id B575F38C19 for ; Sun, 18 Jun 2006 09:05:54 +0200 (CEST) In-Reply-To: <44946A6F.7020508@gmail.com> 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 Hi Daniel, thanks for taking the time to discuss this through. On Jun 17, 2006, at 22:47, Daniel J. Sinder wrote: > OK, so now we've come full circle -- this is very nearly the current > behavior, except instead of archiving the whole subtree, it would only > archive DONE entries from within the subtree. I think this is perhaps > the best solution (and easiest to implement, right?). Yes it is, and I think this is what I will implement. However,.. > I have just one final thought....and it's just a thought because I > don't understand how org-mode is implemented.... > What if, instead of archiving *moving* subtrees, it left them in place > but *hid* them in a semi-permanent way. By that I mean, they'd be > hidden just like the collapsing org-mode normally does, but they would > never expand, unless a special show-archived-subtrees variable was > non-nil. this is a very interesting and original idea! I really like it. It would mean that subitems that are done remain in place, but don't use space on the screen. I am not sure if I like the term "archiving" for this. "Locking" seems to be better. The implementation could for example be TAG based: All subtrees with a TAG :LOCKED: will never open when attacked with TAB (visibility cycling). This can be done using org-cycle-hook. Proof of concept: (defvar org-locked-subtrees t "Non-nil means, allow locked subtrees.") (defun org-hide-locked-subtrees (state) "Re-hide all locked subtrees after a visibility state change." (interactive) (when (and org-locked-subtrees (not (memq state '(overview folded)))) (save-excursion (let* ((globalp (memq state '(contents all))) (beg (if globalp (point-min) (point))) (end (if globalp (point-max) (org-end-of-subtree) (point)))) (goto-char beg) (while (re-search-forward ":LOCKED:" nil t) (and (org-on-heading-p) (hide-subtree)) (org-end-of-subtree)))))) (add-hook 'org-cycle-hook 'org-hide-locked-subtrees 'append) Then all that is needed is - an easy way to toggle org-locked-subtrees (to allow looking at locked trees occasionally) - and easy way to toggle the LOCKED tag - An automatic locker that goes through the subitems of a given level N heading, locking all subtrees that do not have any open TODO items. This is great. I'll do something like this. Thanks. - Carsten > P.S. Thank you very much for org mode. I find I'm using it more and > more: README files, task lists, etc. I've recently even impressed my > technical leader at work (Qualcomm, San Diego) with how organized I > am, mostly due to org-mode. You're welcome. I am glad it is so useful.