2

Is there any way to move the cursor (point) to the first todo entry in my org file? Is there any built-in function in org-mode? if no, any elisp code that can do that is welcome.

I had tried this function:

org-show-todo-tree 

This will only search(and unfold) for todo entries without pointing to the first todo item.

0

1 Answer 1

0

Here's one way:

(defun org-goto-first-todo () "Jump to the first TODO entry in the buffer." (interactive) (goto-char (point-min)) (outline-next-heading) (while (not (org-entry-is-todo-p)) (forward-line 1))) 
2
  • Thnak you, this works for me. So there is no a built-in org-mode function? Commented Feb 8, 2019 at 23:42
  • Can you wrap your solution in an interactive command that can be bound to a key for clarity? Commented Feb 9, 2019 at 10:25

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.