I saw some folks have a way to strike out DONE items in org-mode. How do you do that?

  • 9
    Please remove the solution from your question and post it as an answer instead. It is perfectly fine to answer your own question. There is no need to turn this post into a community wiki, and IMO it shouldn't be closed either (as it is fairly likely that it'll be useful to other people down the line). – itsjeyd Apr 10 '15 at 8:28
  • I see. I cut the solution into an answer, but I'll only be able to accept it tomorrow. – Leo Ufimtsev Apr 10 '15 at 14:04

If of use: I came across Sacha's post that talks about how to do this.

Based on the code in her post and on the feedback from the comments, I now use the code below (I have a light theme). You may note lazy loading, this prevents an 'undefined' error at start up as per a comment in original blog post:

(defun my/modify-org-done-face ()
  (setq org-fontify-done-headline t)
  (set-face-attribute 'org-done nil :strike-through t)
  (set-face-attribute 'org-headline-done nil
                      :strike-through t
                      :foreground "light gray"))

(eval-after-load "org"
  (add-hook 'org-add-hook 'my/modify-org-done-face))
| improve this answer | |
  • Hi, i seems i can't get it works on my machine. Do you place the add-hook before (require 'org)? – yi.tang.uni Apr 11 '15 at 11:11
  • No, I place it faar down near the bottom. Here is my config file: github.com/LeoUfimtsev/ldts/blob/master/.emacs.d/my/… – Leo Ufimtsev Apr 11 '15 at 16:07
  • You might need to restart emacs. Also check that no other package is overriding your fonts there.. As last resourt you could try to start a bare emacs, get it to work and narrow it down from there. – Leo Ufimtsev Apr 11 '15 at 16:08
  • As a note, I load my org very early in my init.el, before my dotemacs loads. I load it from sources: github.com/LeoUfimtsev/ldts/blob/master/.emacs.d/init.el – Leo Ufimtsev Apr 11 '15 at 21:49
  • Hi, i tried to only load the org package and this snippet, but i still not working. btw, nice init file. – yi.tang.uni Apr 12 '15 at 10:08

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.