* New variable request: org-archive-todo-only
@ 2007-12-10 19:24 Wanrong Lin
2007-12-11 14:35 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Wanrong Lin @ 2007-12-10 19:24 UTC (permalink / raw)
To: emacs-orgmode
Hi,
In my org file I have a mix of "actionable" items (TODO items) and
informative items (notes, references and etc). Normally I only archive
TODO items when they are done, and don't archive informative items
(since most of them have some long-term value). So, can we add a new
variable to "org-archive-todo-only" to control the behavior of following
functions:
1. org-archive-subtree
1) when org-archive-todo-only is nil, behave as it does now, with a
little bit modification:
- if the current heading is a TODO item and
org-archive-mark-done is nil, check whether it is in a "DONE" state. If
not, prompt for user confirmation.
2) when org-archive-todo-only is t, if the current heading is a
TODO item, behaves the same as 1). if the current heading is NOT a TODO
item, prompt for user confirmation.
2. org-archive-all-done
1) when org-archive-todo-only is nil, behaves as it does now
2) when org-archive-todo-only is t, only checks the headings that
are a TODO item.
Without the change to those functions, I have to be very careful not
archiving something I don't want to.
I put in an advice by myself to change the org-archive-subtree behavior
as above, but I can not do it with function org-archive-all-done. And I
also think this may be an improvement that makes sense for many people,
hence the proposal/request.
Thanks a lot for comments and consideration of the above.
Wanrong
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: New variable request: org-archive-todo-only
2007-12-10 19:24 New variable request: org-archive-todo-only Wanrong Lin
@ 2007-12-11 14:35 ` Bastien
2007-12-12 4:30 ` Wanrong Lin
0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2007-12-11 14:35 UTC (permalink / raw)
To: Wanrong Lin; +Cc: emacs-orgmode
Wanrong Lin <wanrong.lin@gmail.com> writes:
> In my org file I have a mix of "actionable" items (TODO items) and
> informative items (notes, references and etc). Normally I only archive
> TODO items when they are done, and don't archive informative items
> (since most of them have some long-term value). So, can we add a new
> variable to "org-archive-todo-only" to control the behavior of following
> functions:
>
> 1. org-archive-subtree
> 2. org-archive-all-done
Good idea!
Maybe this could be more general like this:
(setq org-archive-maybe '((plain . never)
(todo . confirm)
(done . always)))
where "plain" refers to informative entries (no TODO keyword), "todo"
refers to entries with a TODO keyword, "done" refers to entries with
a done-state TODO keyword.
This would apply for both org-archive-subtree and org-archive-all-done.
Maybe we could refine it a bit and have:
#+SEQ_TODO: TODO(t) WAITING(w@) SOMEDAY(s$) | DONE(d) CANCELED(c@)
^
where the "$" sign means: always archive this todo keyword without
asking (i.e. override the value or `org-archive-maybe')
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: New variable request: org-archive-todo-only
2007-12-11 14:35 ` Bastien
@ 2007-12-12 4:30 ` Wanrong Lin
0 siblings, 0 replies; 3+ messages in thread
From: Wanrong Lin @ 2007-12-12 4:30 UTC (permalink / raw)
To: emacs-orgmode
Bastien wrote:
> Wanrong Lin <wanrong.lin@gmail.com> writes:
>
>
>> In my org file I have a mix of "actionable" items (TODO items) and
>> informative items (notes, references and etc). Normally I only archive
>> TODO items when they are done, and don't archive informative items
>> (since most of them have some long-term value). So, can we add a new
>> variable to "org-archive-todo-only" to control the behavior of following
>> functions:
>>
>> 1. org-archive-subtree
>> 2. org-archive-all-done
>>
>
> Good idea!
>
> Maybe this could be more general like this:
>
> (setq org-archive-maybe '((plain . never)
> (todo . confirm)
> (done . always)))
>
> where "plain" refers to informative entries (no TODO keyword), "todo"
> refers to entries with a TODO keyword, "done" refers to entries with
> a done-state TODO keyword.
>
> This would apply for both org-archive-subtree and org-archive-all-done.
>
> Maybe we could refine it a bit and have:
>
> #+SEQ_TODO: TODO(t) WAITING(w@) SOMEDAY(s$) | DONE(d) CANCELED(c@)
> ^
>
> where the "$" sign means: always archive this todo keyword without
> asking (i.e. override the value or `org-archive-maybe')
>
>
This certainly will cover my own needs and is more flexible (which is
one major reason why I use org-mode) than what I proposed. Thank you and
look forward to having it in the future releases.
Wanrong
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-12 4:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-10 19:24 New variable request: org-archive-todo-only Wanrong Lin
2007-12-11 14:35 ` Bastien
2007-12-12 4:30 ` Wanrong Lin
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).