19

I'm unsure how to use checkboxes in Emacs. I'm using Emacs 24.3.

The documentation suggests the use of org-toggle-checkbox as "With a single prefix argument, add an empty checkbox..."

I've tried starting with an existing list (with org-mode as the major mode), as in:

* shopping list
** eggs
** bread
** Tesla Model S
** bacon

Whether I put point in "shopping list", or in "eggs", pressing C-u C-c C-x C-b (which runs org-toggle-checkbox) results in the error "No item in subtree" being printed to the minibuffer. This behavior happens without my init file (emacs -Q), so it's purely an org-mode issue.

What's the right way to start using checkboxes?

1
  • 1
    It will toggle it if you use the checkbox syntax like this: ``` * shopping list - [ ] eggs - [X] bread - [ ] Tesla Model S - [X] bacon ```
    – grettke
    Commented Dec 24, 2014 at 3:16

1 Answer 1

27

As the manual link states, checkboxes only work in plain lists. Your example uses headlines. You need to use the checkboxes this way:

* shopping list

  - eggs
  - bread
  - Tesla Model S
  - bacon

Now, when you're on "eggs", you can hit C-u C-c C-c (C-u C-c C-x C-b also works) to toggle the checkbox. C-c C-c will then toggle whether the checkbox is checked or not.

If you are already in a checkbox list, then M-S-RET will add a new item with a checkbox.

2
  • 14
    You can use C-c - to convert a headline into a plain list entry and C-c * to do the opposite.
    – erikstokes
    Commented Dec 23, 2014 at 1:22
  • 1
    It will toggle it if you use the checkbox syntax like this: ``` * shopping list - [ ] eggs - [X] bread - [ ] Tesla Model S - [X] bacon ```
    – grettke
    Commented Dec 24, 2014 at 3:15

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.