From: Bastien <bzg@altern.org>
To: Max Mikhanosha <max@openchat.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] New org-depend trigger for finding next highest priority/effort item
Date: Tue, 26 Jul 2011 13:48:30 +0200 [thread overview]
Message-ID: <874o29tg8h.fsf@gnu.org> (raw)
In-Reply-To: <87k4b7fqu3.wl%max@openchat.com> (Max Mikhanosha's message of "Sun, 24 Jul 2011 14:58:44 -0400")
Hi Max,
Max Mikhanosha <max@openchat.com> writes:
> org-depend TRIGGER chain-siblings(NEXT) property is hardly usable for
> me, because it requires too much effort to keep items nicely sorted.
>
> For example if next headline is already in DONE state, chain-siblings
> would still change it. I prefer to sort my items by setting their
> priorities and/or effort estimate, leaving DONE items in place for
> some time.
>
> Attached patch implements new TRIGGER chain-find-next(NEXT[,options])
> trigger, which allows to flexibly select which of the siblings will be
> changed to NEXT.
Thanks for this!
> Example: chain-find-next(NEXT,from-current,priority-up,todo-only)
>
>
>From 10ac42d25793eedc595641555186321219818cec Mon Sep 17 00:00:00 2001
> From: Max Mikhanosha <max@openchat.com>
> Date: Sun, 24 Jul 2011 14:44:44 -0400
> Subject: [PATCH 11/11] Add chain-find-next trigger option.
>
> ---
> contrib/lisp/org-depend.el | 142 +++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 140 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/lisp/org-depend.el b/contrib/lisp/org-depend.el
> index 089a6a0..aa8e728 100644
> --- a/contrib/lisp/org-depend.el
> +++ b/contrib/lisp/org-depend.el
> @@ -55,7 +55,43 @@
> ;; - The sibling also gets the same TRIGGER property
> ;; "chain-siblings-scheduled", so the chain can continue.
> ;;
> -;; 3) If the TRIGGER property contains any other words like
> +;; 3) If the TRIGGER property contains the string
> +;; "chain-find-next(KEYWORD[,OPTIONS])", then switching that entry
> +;; to DONE do the following:
> +;; - All siblings are of the entry are collected into a temporary
> +;; list and then filtered and sorted according to OPTIONS
> +;; - The first sibling on the list is changed into KEYWORD state
> +;; - The sibling also gets the same TRIGGER property
> +;; "chain-siblings-scheduled", so the chain can continue.
^^^^^^^^^^^^^^^^^^^^^^^^
This should rather be "chain-find-next" here, right?
> +;; OPTIONS should be a comma separated string without spaces, and
> +;; can contain following options:
> +;;
> +;; - from-top the candidate list is all of the siblings in
> +;; the current subtree
> +;;
> +;; - from-bottom candidate list are all siblings from bottom up
> +;;
> +;; - from-current candidate list are all siblings from current item
> +;; until end of subtree, then wrapped around from
> +;; first sibling
> +;;
> +;; - no-wrap candidate list are siblings from current one down
I'm not sure to understand the difference between "from-top" and
"from-current", and between "from-top" and "no-wrap".
Can you give an example?
> +;;
> +;; - include-done include siblings with TODO in `org-done-keywords',
> +;; they are excluded by default
The phrasing is a bit confusing to me -- perhaps removing "they are
excluded by default" is enough.
> +;; - todo-only Only consider siblings that have TODO only, by default
> +;; siblings without TODO keyword are considered too
I suggest this:
"Only consider siblings that have a TODO keyword."
I suppose "todo-only" and "include-done" are compatible, right?
What about using exclusive options like "todo-only" and
"todo-and-done-only"? So that you would need to use only one.
> +;; - priority-up sort by highest priority
> +;; - priority-down sort by lowest priority
> +;; - effort-up sort by highest effort
> +;; - effort-down sort by lowest effort
> +;;
> +;; Default OPTIONS are from-top
> +;;
> +;;
> +;; 4) If the TRIGGER property contains any other words like
> ;; XYZ(KEYWORD), these are treated as entry id's with keywords. That
> ;; means Org-mode will search for an entry with the ID property XYZ
> ;; and switch that entry to KEYWORD as well.
> @@ -121,6 +157,7 @@
> ;;
>
> (require 'org)
> +(require 'cl)
This (eval-when-compile (require 'cl)) -- Emacs has a policy of
preventing (require 'cl) only...
Thanks for further feedback on this! If you can provide a small
Org file where I can test the new functionalities that will help
a lot.
Best,
--
Bastien
next prev parent reply other threads:[~2011-07-26 11:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-24 18:58 [PATCH] New org-depend trigger for finding next highest priority/effort item Max Mikhanosha
2011-07-26 11:48 ` Bastien [this message]
2011-07-26 12:52 ` Sebastien Vauban
2011-07-26 14:59 ` Bastien
2011-07-26 21:56 ` Max Mikhanosha
2011-07-27 11:33 ` Bastien
2011-07-27 19:45 ` Max Mikhanosha
2011-07-28 7:11 ` Bastien
2011-07-26 23:34 ` Max Mikhanosha
2011-07-27 11:33 ` Bastien
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=874o29tg8h.fsf@gnu.org \
--to=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
--cc=max@openchat.com \
/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).