emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-refile-targets multiple conditions
@ 2009-04-16 22:12 Samuel Wales
  2009-04-16 22:27 ` Samuel Wales
  2009-04-17 15:58 ` Carsten Dominik
  0 siblings, 2 replies; 4+ messages in thread
From: Samuel Wales @ 2009-04-16 22:12 UTC (permalink / raw)
  To: emacs-orgmode

I want to eliminate DONE and similar states
from the list of refile targets.  The benefits would be:

  1) The set of candidates is reduced, requiring fewer
     keystrokes to select a target.
  2) The possibility of misfiling into a task that will be
     archived is reduced.
  3) The list length is reduced, helping to work around some
     of the speed problems that I have been experiencing with
     ido.  This is possibly at the cost of slower creation of the
     initial list, however.

The documentation for org-refile-targets says:

>   - a cons cell (:todo . "KEYWORD") to identify refile
>     targets by todo keyword.

In principle I might get the desired behavior by including
all kw /except/ doneish ones, and also including the empty
string.

But if I did so, I don't think it would work, because I
already set (:maxlevel . 5).  I did not find a way to
specify that I want non-doneish entries (including blank)
that are below level 6.

Would it be feasible to allow AND and NOT?

  (setq org-refile-targets
        `((,(file-expand-wildcards (substitute-in-file-name "$dorg/*.org"))
           . (and (:maxlevel . 5)
                  (not (:todo . "DONE"))
                  (not (:todo . "MOST"))
                  (not (:todo . "MOOT"))
                  (not (:todo . "DUPLICATE"))))))[fn:13]

Or is there a way that I can do this with existing org?

Thanks.

[fn:13] Or (not (todo "DONE")) or (not (or (todo "DONE")
...).

-- 
Myalgic encephalomyelitis denialism is causing death and severe suffering
worse than MS.  Greed is corrupting science into foul nonsense.  Anybody can
get the disease at any time permanently.  Do science and justice matter to
you?  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-refile-targets multiple conditions
  2009-04-16 22:12 org-refile-targets multiple conditions Samuel Wales
@ 2009-04-16 22:27 ` Samuel Wales
  2009-04-17 15:58 ` Carsten Dominik
  1 sibling, 0 replies; 4+ messages in thread
From: Samuel Wales @ 2009-04-16 22:27 UTC (permalink / raw)
  To: emacs-orgmode

Apologies for the triple post.  Gmail told me, twice, that the message
was not sent.

-- 
Myalgic encephalomyelitis denialism is causing death and severe suffering
worse than MS.  Greed is corrupting science into foul nonsense.  Anybody can
get the disease at any time permanently.  Do science and justice matter to
you?  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-refile-targets multiple conditions
  2009-04-16 22:12 org-refile-targets multiple conditions Samuel Wales
  2009-04-16 22:27 ` Samuel Wales
@ 2009-04-17 15:58 ` Carsten Dominik
  2009-04-17 18:56   ` Samuel Wales
  1 sibling, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2009-04-17 15:58 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Hi Samuel,

do not want to make the criteria in org-refile-targets any more complex.
But you can now write a verification function and put it into the new
variable org-refile-target-verify-function.

HTH

- Carsten

On Apr 17, 2009, at 12:12 AM, Samuel Wales wrote:

> I want to eliminate DONE and similar states
> from the list of refile targets.  The benefits would be:
>
>  1) The set of candidates is reduced, requiring fewer
>     keystrokes to select a target.
>  2) The possibility of misfiling into a task that will be
>     archived is reduced.
>  3) The list length is reduced, helping to work around some
>     of the speed problems that I have been experiencing with
>     ido.  This is possibly at the cost of slower creation of the
>     initial list, however.
>
> The documentation for org-refile-targets says:
>
>>  - a cons cell (:todo . "KEYWORD") to identify refile
>>    targets by todo keyword.
>
> In principle I might get the desired behavior by including
> all kw /except/ doneish ones, and also including the empty
> string.
>
> But if I did so, I don't think it would work, because I
> already set (:maxlevel . 5).  I did not find a way to
> specify that I want non-doneish entries (including blank)
> that are below level 6.
>
> Would it be feasible to allow AND and NOT?
>
>  (setq org-refile-targets
>        `((,(file-expand-wildcards (substitute-in-file-name "$dorg/ 
> *.org"))
>           . (and (:maxlevel . 5)
>                  (not (:todo . "DONE"))
>                  (not (:todo . "MOST"))
>                  (not (:todo . "MOOT"))
>                  (not (:todo . "DUPLICATE"))))))[fn:13]
>
> Or is there a way that I can do this with existing org?
>
> Thanks.
>
> [fn:13] Or (not (todo "DONE")) or (not (or (todo "DONE")
> ...).
>
> -- 
> Myalgic encephalomyelitis denialism is causing death and severe  
> suffering
> worse than MS.  Greed is corrupting science into foul nonsense.   
> Anybody can
> get the disease at any time permanently.  Do science and justice  
> matter to
> you?  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-refile-targets multiple conditions
  2009-04-17 15:58 ` Carsten Dominik
@ 2009-04-17 18:56   ` Samuel Wales
  0 siblings, 0 replies; 4+ messages in thread
From: Samuel Wales @ 2009-04-17 18:56 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Hi Carsten,

On Fri, Apr 17, 2009 at 08:58, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
> But you can now write a verification function and put it into the new
> variable org-refile-target-verify-function.

Thank you!  I presume one uses org-entry get here?

Also, how to verify that the entire subtree of a doneish task is not
included?  Is there a way to skip the subtree?

Perhaps if the function returns 'skip-entire-subtree, then it can
indicate that there is no need to look at the descendants?

(Or, depending on one's taste, nil could skip nothing, t could skip
the headline, and subtree could skip the subtree.)

-- 
Myalgic encephalomyelitis denialism is causing death and severe suffering
worse than MS.  Greed is corrupting science into foul nonsense.  Anybody can
get the disease at any time permanently.  Do science and justice matter to
you?  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-17 18:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 22:12 org-refile-targets multiple conditions Samuel Wales
2009-04-16 22:27 ` Samuel Wales
2009-04-17 15:58 ` Carsten Dominik
2009-04-17 18:56   ` Samuel Wales

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).