From: Carsten Dominik <dominik@science.uva.nl>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: org-archive-done
Date: Sun, 18 Jun 2006 09:05:53 +0200 [thread overview]
Message-ID: <94a84102394ede474f74017dc38b3f6b@science.uva.nl> (raw)
In-Reply-To: <44946A6F.7020508@gmail.com>
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.
next prev parent reply other threads:[~2006-06-18 7:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-14 7:52 org-archive-done nielsgiesen
2006-06-14 9:51 ` org-archive-done Carsten Dominik
2006-06-15 23:18 ` org-archive-done Daniel J. Sinder
[not found] ` <f7ace8d973d1c1a267efc937f401693e@science.uva.nl>
[not found] ` <44933E3A.9010100@gmail.com>
[not found] ` <eccd33106d5ddb5d8922507c9fcebf30@science.uva.nl>
[not found] ` <44946A6F.7020508@gmail.com>
2006-06-18 7:05 ` Carsten Dominik [this message]
2006-06-18 7:59 ` org-archive-done Daniel J. Sinder
2006-06-18 9:45 ` org-archive-done Carsten Dominik
2006-06-19 17:07 ` org-archive-done Carsten Dominik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94a84102394ede474f74017dc38b3f6b@science.uva.nl \
--to=dominik@science.uva.nl \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).