0

While viewing org-mode files I am used to typing , - / t to produce a sparse tree of todo items.

I am trying, unsuccessfully, to write some Lisp to achieve the same thing.

Here's the sort of thing I'm playing with, added to my init file:

  (defun my-sparse-todo ()
    (interactive)
    (org-sparse-tree nil "t"))

  (define-key evil-normal-state-map [f10] 'my-sparse-todo)

If I run this by hitting f10, I am prompted to enter the sparse tree type character.

What am I doing wrong please?

1 Answer 1

1

Try

 (defun my-sparse-todo ()
    (interactive)
    (call-interactively 'org-show-todo-tree))

This is what org-sparse-tree does after you have selected t from the menu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.