emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-agenda-custom-command for property AND TODO state (for a cooking guide :) )
@ 2014-03-28 13:45 Xebar Saram
  2014-04-14 20:03 ` Alexander Baier
  0 siblings, 1 reply; 4+ messages in thread
From: Xebar Saram @ 2014-03-28 13:45 UTC (permalink / raw)
  To: org mode

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

Hi all i was wondering if anyone knew how to set
a org-agenda-custom-command for property AND TODO state? that is create a
custom view that is similar to this sparse tree command:

C-c /  M   type="main"/COOK

where it would match on type=main and have a COOK todo keyword

best

Z

P.S in case anyone wonders wth im using it for :) im trying to auto
generate a list of things to cook (todo word COOK) by type of meal so id
generate a list for main dishes, breakfast etc :)

[-- Attachment #2: Type: text/html, Size: 638 bytes --]

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

* Re: org-agenda-custom-command for property AND TODO state (for a cooking guide :) )
  2014-03-28 13:45 org-agenda-custom-command for property AND TODO state (for a cooking guide :) ) Xebar Saram
@ 2014-04-14 20:03 ` Alexander Baier
  2014-04-15  4:12   ` Xebar Saram
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Baier @ 2014-04-14 20:03 UTC (permalink / raw)
  To: Xebar Saram; +Cc: org mode

On 2014-03-28 14:45 Xebar Saram wrote:
> Hi all i was wondering if anyone knew how to set
> a org-agenda-custom-command for property AND TODO state? that is create a
> custom view that is similar to this sparse tree command:
>
> C-c /  M   type="main"/COOK
>
> where it would match on type=main and have a COOK todo keyword
>
> best
>
> Z
>
> P.S in case anyone wonders wth im using it for :) im trying to auto
> generate a list of things to cook (todo word COOK) by type of meal so id
> generate a list for main dishes, breakfast etc :)

Does this work for you?

C-c / m   +TODO="TODO"+TYPE="main"

HTH,
-- 
 Alexander Baier

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

* Re: org-agenda-custom-command for property AND TODO state (for a cooking guide :) )
  2014-04-14 20:03 ` Alexander Baier
@ 2014-04-15  4:12   ` Xebar Saram
  2014-04-15  7:34     ` Alexander Baier
  0 siblings, 1 reply; 4+ messages in thread
From: Xebar Saram @ 2014-04-15  4:12 UTC (permalink / raw)
  To: org mode, lexi.baier

[-- Attachment #1: Type: text/plain, Size: 900 bytes --]

thx alot  Alexander!

this worked. any idea how to bind this to a key?
ie have  C-c / m   +TODO="TODO"+TYPE="main" bound to F1-c   etc..

best

Z


On Mon, Apr 14, 2014 at 11:03 PM, Alexander Baier <lexi.baier@gmail.com>
wrote:
>
> On 2014-03-28 14:45 Xebar Saram wrote:
> > Hi all i was wondering if anyone knew how to set
> > a org-agenda-custom-command for property AND TODO state? that is create
a
> > custom view that is similar to this sparse tree command:
> >
> > C-c /  M   type="main"/COOK
> >
> > where it would match on type=main and have a COOK todo keyword
> >
> > best
> >
> > Z
> >
> > P.S in case anyone wonders wth im using it for :) im trying to auto
> > generate a list of things to cook (todo word COOK) by type of meal so id
> > generate a list for main dishes, breakfast etc :)
>
> Does this work for you?
>
> C-c / m   +TODO="TODO"+TYPE="main"
>
> HTH,
> --
>  Alexander Baier

[-- Attachment #2: Type: text/html, Size: 1261 bytes --]

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

* Re: org-agenda-custom-command for property AND TODO state (for a cooking guide :) )
  2014-04-15  4:12   ` Xebar Saram
@ 2014-04-15  7:34     ` Alexander Baier
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Baier @ 2014-04-15  7:34 UTC (permalink / raw)
  To: Xebar Saram; +Cc: org mode

On 2014-04-15 06:12 Xebar Saram wrote:
> thx alot  Alexander!
>
> this worked. any idea how to bind this to a key?
> ie have  C-c / m   +TODO="TODO"+TYPE="main" bound to F1-c   etc..

You create an interactive function that simply calls
`org-match-sparse-tree' with the right match string:

#+begin_src emacs-lisp
  (defun my-cooking-sparse-tree-main ()
    (interactive)
    (org-match-sparse-tree t "+TODO=\"TODO\"+TYPE=\"main\""))
#+end_src

And now you can simply bind this command (thats what an interactive
function is called) to whatever you like:

#+begin_src emacs-lisp
  (define-key org-mode-map (kbd "<f1> c") 'my-cooking-sparse-tree-main)
#+end_src

HTH,
-- 
 Alexander Baier

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

end of thread, other threads:[~2014-04-15  7:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 13:45 org-agenda-custom-command for property AND TODO state (for a cooking guide :) ) Xebar Saram
2014-04-14 20:03 ` Alexander Baier
2014-04-15  4:12   ` Xebar Saram
2014-04-15  7:34     ` Alexander Baier

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