From 6cc1c44a198689eb65e7d28234f9be1377740a61 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 23 Dec 2019 16:19:53 -0800 Subject: org: files and appearance. Having the files defined as `defvar` did not work: a bunch of stuff were failing to load correctly. Customize the look of completed tasks, to make it more obvious that I don't need to pay attention to them. --- emacs.d/custom/fcuny-org.el | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'emacs.d/custom') diff --git a/emacs.d/custom/fcuny-org.el b/emacs.d/custom/fcuny-org.el index 014271a..3ae85a0 100644 --- a/emacs.d/custom/fcuny-org.el +++ b/emacs.d/custom/fcuny-org.el @@ -3,18 +3,9 @@ (use-package dash :ensure t) -(defvar org-directory (expand-file-name "~/Documents/notebooks")) -(defvar org-default-tasks-file (concat org-directory "/tasks.org")) -(defvar org-default-journal-file (concat org-directory "/journal.org")) -(defvar org-default-notes-file (concat org-directory "/notes.org")) -(defvar org-default-work-tasks-file (concat org-directory "/work-tasks.org")) -(defvar org-default-work-journal-file (concat org-directory "/work-journal.org")) -(defvar org-default-work-notes-file (concat org-directory "/work-notes.org")) -(defvar org-default-inbox-file (concat org-directory "/inbox.org")) - (use-package org - :after (dash) :ensure t + :after (dash) :hook ((org-mode . (lambda () (setq fill-column 120))) (org-mode . turn-on-auto-fill) (org-mode . org-indent-mode) @@ -31,6 +22,14 @@ (python . t) (emacs-lisp . t)))) + (custom-set-faces + '(org-done ((t (:foreground "DarkGreen" + :weight normal + :strike-through t)))) + '(org-headline-done + ((((class color) (min-colors 16) (background dark)) + (:foreground "LightSalmon" :strike-through t))))) + (defhydra hydra-org-menu (:hint nil) " ^go to ^ ^action ^ @@ -43,13 +42,24 @@ _g n_: go to notes ("g i" (find-file-other-window org-default-inbox-file)) ("g p" (find-file-other-window org-default-tasks-file)) ("g w" (find-file-other-window org-default-work-tasks-file)) - ("g n" (find-file-other-windw org-default-work-notes-file)) + ("g n" (find-file-other-window org-default-work-notes-file)) ("s" (org-save-all-org-buffers))) :custom + (org-directory (expand-file-name "~/Documents/notebooks")) + (org-default-tasks-file (concat org-directory "/tasks.org")) + (org-default-journal-file (concat org-directory "/journal.org")) + (org-default-notes-file (concat org-directory "/notes.org")) + (org-default-work-tasks-file (concat org-directory "/work-tasks.org")) + (org-default-work-journal-file (concat org-directory "/work-journal.org")) + (org-default-work-notes-file (concat org-directory "/work-notes.org")) + (org-default-inbox-file (concat org-directory "/inbox.org")) + ;; cosmetic + (org-ellipsis "…") (org-pretty-entities t) (org-startup-indented nil) + (org-blank-before-new-entry nil) ;; (org-log-done 'time) @@ -187,6 +197,7 @@ _g n_: go to notes ;; org babel related ;; prevent the conversion of spaces into tabs (necessary for Python code exports) (org-src-fontify-natively t) + (org-fontify-done-headline t) (org-src-preserve-indentation t) (org-edit-src-content-indentation t) -- cgit 1.4.1