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:


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


Here's one way:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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