I saw some folks have a way to strike out DONE
items in org-mode
. How do you do that?
Asked
Active
Viewed 1,869 times
14

Leo Ufimtsev
- 4,488
- 3
- 22
- 45
-
9Please remove the solution from your question and post it as an answer instead. It is perfectly fine to [answer your own question](http://emacs.stackexchange.com/help/self-answer). 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 08: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
1 Answers
10
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))

Leo Ufimtsev
- 4,488
- 3
- 22
- 45
-
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: https://github.com/LeoUfimtsev/ldts/blob/master/.emacs.d/my/orgdotemacs.org#cross-out-done-items – 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: https://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
-
@yi.tang.uni which version of emacs are you using? (I'm using latest version 25.4, maybe your version is out of date?) If using some fork like aquamacs, try the main emacs to see if it makes any difference. – Leo Ufimtsev Apr 13 '15 at 13:47
-
Hi, i am using GNU Emacs 24.4.1 on Ubuntu and org-mode 8.2.10, I will try to update and see. – yi.tang.uni Apr 13 '15 at 14:33
-
-
This correctly changes the color of DONE headlines, but it doesn't strike them through for me ... – HappyFace Mar 23 '21 at 16:22