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