Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Emacs org-mode, C-c C-c runs org-ctrl-c-ctrl-c, which, on a checkbox [ ], changes its state to [X]. But it also leaves the point where it was, in the now-checked checkbox.

Is there a command that changes the checkbox state, then jumps to the NEXT checklist item?

Even better, is there a single keybinding that changes the state of EITHER a checkbox or a TODO, depending on where the point is, then jumps to the next checkbox or TODO?

share|improve this question
up vote 2 down vote accepted

There isn't any built-in command that will do so, however you can combine the commands for org-toggle-checkbox and org-next-item (with a quick check to ensure it is a checkbox) to get the desired behaviour.

(defun zin/org-checkbox-next ()
  (interactive)
  (when (org-at-item-checkbox-p)
    (org-toggle-checkbox))
  (org-next-item))

There may be a way to also deal with TODO entries, however it would be more error prone since it would not stop at the end of a list/level of headlines.

share|improve this answer
    
Amazing. And how to bind this function to C-c C-c when in a checkbox item? – incandescentman Apr 17 '14 at 22:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .