2

Q: how can I get a different face for checked-off items in org plain lists?

I use org-mode's plain lists a lot:

- [X] item 1
- [ ] item 2
- [ ] item 3
- [ ] item 4, with a whole lot of text that makes this item
  span more than one line

The problem is that I find that the checkboxes do not give enough visual cues that I have or have not completed an item.

Is there a way to apply a different face to checked-off list items (in the example, "item 1") while leaving the face alone for non-checked items?

A built-into-org way to do so would be ideal, but if I need to roll my own functionality, a complicating feature is that my items often span more than one line (as with "item 4..."). How can I do this?

  • You can add an appropriate checked-off statement in org-set-font-lock-defaults, just beneath the existing statement relating to checkboxes at the section with the comment ;; Checkboxes; and, perhaps modify the existing checkbox statement so that it only operates on unchecked items. While modifying org-set-font-lock-defaults probably seems sacrilege, that is actually the proper way to do it (in my opinion, of course). – lawlist Dec 3 '19 at 17:47
  • In addition to the above comment, you may also need to have a look at the section of code in org-mouse.el where it states (when (memq 'activate-checkboxes org-mouse-features) ... Modifications at that location may be appropriate ... – lawlist Dec 3 '19 at 17:55

Your Answer

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

Browse other questions tagged or ask your own question.