Use unicode symbol to display org-mode checkboxes

With the help of prettify-symbols-mode, you can make your Emacs displaying org-mode checkboxes as a real Unicode symbols, instead of a boring text, put this to your org-mode-hook:

(add-hook 'org-mode-hook (lambda ()
  "Beautify Org Checkbox Symbol"
  (push '("[ ]" .  "☐") prettify-symbols-alist)
  (push '("[X]" . "☑" ) prettify-symbols-alist)
  (push '("[-]" . "❍" ) prettify-symbols-alist)

You can also use font-lock-add-keywords to add a different style for checked boxes, like what I did below, adding a strike-through style:

(defface org-checkbox-done-text
  '((t (:foreground "#71696A" :strike-through t)))
  "Face for the text part of a checked org-mode checkbox.")

 `(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?:X\\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)"
    1 'org-checkbox-done-text prepend))

Here's the result:


Date: 2019-05-22 Wed 00:00

Author: Huy Tran

Created: 2020-02-08 Sat 19:07