From f2601478c41cf7e7d38962fea55bd979956fd354 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Sun, 3 Sep 2023 13:21:51 +0200 Subject: [PATCH] Fine-tune Org mode config --- configuration.org | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/configuration.org b/configuration.org index 993d654..86b4aba 100644 --- a/configuration.org +++ b/configuration.org @@ -3197,8 +3197,24 @@ This is mostly needed for customizing faces. This is a big one; I use a lot of customisation here. #+BEGIN_SRC emacs-lisp +(defun gpolonkai/setup-org-mode () + (org-indent-mode) + (variable-pitch-mode 1) + (auto-fill-mode 0) + (visual-line-mode 1)) + (use-package org :demand + :custom-face + (org-block ((t (:inherit fixed-pitch)))) + (org-code ((t (:inherit (shadow fixed-pitch))))) + (org-indent ((t (:inherit (org-hide fixed-pitch))))) + (org-verbatim ((t (:inherit (shadow fixed-pitch))))) + (org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch))))) + (org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch))))) + (org-checkbox ((t (:inherit fixed-pitch)))) + (org-table ((t (:inherit (shadow fixed-pitch))))) + (org-_drawer ((t (:inherit (shadow fixed-pitch))))) :init (require 'xdg-paths) (defface org-checkbox-todo-text @@ -3247,7 +3263,8 @@ This is a big one; I use a lot of customisation here. (org-babel-do-load-languages 'org-babel-load-languages '((python . t))) - + ;; Track habits + (require 'org-habit) :custom (org-log-into-drawer t) (org-ellipsis "…#") @@ -3335,19 +3352,20 @@ This is a big one; I use a lot of customisation here. :hook (ediff-select . f-ediff-org-unfold-tree-element) (ediff-unselect . f-ediff-org-fold-tree) + (org-mode . gpolonkai/setup-org-mode) :bind (:map gpolonkai/pers-map - ("a" . gpolonkai/org-agenda-list) - ("C" . org-capture) - ("l" . org-store-link) - :map org-mode-map - ("SPC" . org-space-key) - ("C-c l" . org-toggle-link-display) - ("C-a" . gpolonkai/move-to-beginning-of-line) - ("C-e" . gpolonkai/move-to-end-of-line) - ("C-c h" . outline-previous-heading) - ("C-c ." . gpolonkai/org-insert-current-timestamp) - ("C-c ;" . org-toggle-timestamp-type))) + ("a" . gpolonkai/org-agenda-list) + ("C" . org-capture) + ("l" . org-store-link) + :map org-mode-map + ("SPC" . org-space-key) + ("C-c l" . org-toggle-link-display) + ("C-a" . gpolonkai/move-to-beginning-of-line) + ("C-e" . gpolonkai/move-to-end-of-line) + ("C-c h" . outline-previous-heading) + ("C-c ." . gpolonkai/org-insert-current-timestamp) + ("C-c ;" . org-toggle-timestamp-type))) #+END_SRC ** Show a random ToDo every hour