emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-agenda-custom-command for property AND TODO state (for a coo


From: Alexander Baier
Subject: Re: [O] org-agenda-custom-command for property AND TODO state (for a cooking guide :) )
Date: Tue, 15 Apr 2014 09:34:46 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]