user673592
user673592

Reputation: 2120

Strike through headlines for DONE tasks in Org

I'd really like to have my DONE task strikken through in Org-mode. Following the snippet from http://lists.gnu.org/archive/html/emacs-orgmode/2007-03/msg00179.html (via Sacha Chua's blog):

(setq org-fontify-done-headline t)
(custom-set-faces
 '(org-done ((t (:foreground "PaleGreen"
                 :weight normal
                 :strike-through t))))
 '(org-headline-done
            ((((class color) (min-colors 16) (background dark))
               (:foreground "LightSalmon" :strike-through t)))))

This however doesn't work for me (colors are changed but no strike-through). I think it might be due to the solarized theme I use: https://github.com/sellout/emacs-color-theme-solarized

Unfortunately I couldn't fix it myself... If I look at customize-face of org-done Strike-through has value "On", but no visual effect.

Thank you very much!

Upvotes: 6

Views: 1195

Answers (1)

Patrick Goddi
Patrick Goddi

Reputation: 1

If you are using a light background the snippet needs to be modified, the original author likely used a dark theme.

The key line is:

((class color) (min-colors 16) (background dark))

You could replace (background dark) with (background light), or just remove the background s-exp completely to work in both dark and light themes.

((class color) (min-colors 16))

After an eval-buffer on init.el it should work for your light themes. I did a quick test with solarized light and it works.

Upvotes: 0

Related Questions