From b89f452564387368b6f7f6fc4ded8ce65c27146d Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 13 Jan 2023 22:52:30 -0600 Subject: Fleoo --- lisp/acdw-org.el | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 6 deletions(-) (limited to 'lisp/acdw-org.el') diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index 8a63d04..5255a50 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el @@ -222,6 +222,25 @@ If LIST is non-nil, return the result as a list instead of a string." (use-package org :defer t + :custom-face + (org-level-1 ((t :inherit fixed-pitch + :weight bold + :height 1.2))) + (org-level-2 ((t :inherit fixed-pitch + :weight bold + :height 1.1))) + (org-level-3 ((t :inherit fixed-pitch + :weight bold + :height 1.0))) + (org-level-4 ((t :inherit org-level-3))) + (org-level-5 ((t :inherit org-level-4))) + (org-level-6 ((t :inherit org-level-5))) + (org-level-7 ((t :inherit org-level-6))) + (org-level-8 ((t :inherit org-level-7))) + (org-drawer ((t :inherit fixed-pitch))) + (org-property-value ((t :inherit fixed-pitch))) + (org-special-keyword ((t :inherit fixed-pitch))) + (org-indent ((t :inherit fixed-pitch))) :config ;; Options (setopt org-adapt-indentation nil @@ -273,7 +292,7 @@ If LIST is non-nil, return the result as a list instead of a string." org-src-window-setup 'current-window org-startup-truncated nil org-startup-with-inline-images t - org-tags-column 0 + org-tags-column 0 ;(- 0 fill-column -3) org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)" "|" "DONE(d!)" "ASSIGNED(a@/!)") (sequence "|" "CANCELED(k@)") @@ -292,9 +311,25 @@ If LIST is non-nil, return the result as a list instead of a string." (add-hook 'org-mode-hook #'turn-off-auto-fill) (add-hook 'org-mode-hook #'org-indent-mode) (add-hook 'org-mode-hook #'abbrev-mode) - (add-hook 'org-mode-hook (defun before-save@org-mode () - (org-align-tags 'all) - (+org-hide-drawers-except-point)))) + (add-hook 'org-mode-hook + (defun before-save@org-mode () + (add-hook 'before-save-hook + (defun before-save@org-mode@before-save () + (org-align-tags 'all) + (+org-hide-drawers-except-point)) + nil :local))) + ;; Extra font-lock keywords + (font-lock-add-keywords + 'org-mode + `(;; List markers => org-indent + (,(concat + "^[ ]*\\(\\(?:[-+]\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)" + "\\(?:[ ]+\\|$\\)\\)" + "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\]" + "[ ]*\\)?" + "\\(?:\\(\\[[ X-]\\]\\)" + "\\(?:[ ]+\\|$\\)\\)?") + 0 'org-indent)))) (use-package org-agenda :bind (("C-c a" . org-agenda)) @@ -316,7 +351,10 @@ If LIST is non-nil, return the result as a list instead of a string." org-deadline-warning-days 0 org-agenda-show-future-repeats 'next org-agenda-window-setup 'current-window - org-agenda-skip-file-regexp "sync-conflict") + org-agenda-skip-file-regexp "sync-conflict" + org-agenda-inhibit-startup t + org-agenda-sticky t + org-agenda-follow-indirect t) ;; Hooks and advice (add-hook 'org-agenda-mode-hook #'truncate-lines-local-mode) (add-hook 'org-agenda-mode-hook #'hl-line-mode) @@ -329,7 +367,13 @@ If LIST is non-nil, return the result as a list instead of a string." (string-match-p org-agenda-skip-file-regexp file)) files))) - files)) + files) + (define-advice org-agenda (:around (orig &rest r) inhibit-hooks) + (let ((org-mode-hook nil)) + (apply orig r))) + (define-advice org-agenda-switch-to (:after (&rest _) do-hooks) + (run-hooks 'org-mode-hook)) + (progress@around org-agenda-list "Building agenda")) (use-package org-capture :bind (("C-c c" . org-capture))) @@ -373,5 +417,18 @@ effect for exporting link types)." :load-path "~/src/emacs/org-word-count/" :hook org-mode-hook) +(use-package org-modern + :ensure t + :custom-face + (org-modern-label ((t :inherit fixed-pitch + :height 1.0))) + :config + (setopt org-modern-star nil + org-hide-leading-stars nil + org-modern-hide-stars nil + org-tags-column 0 + org-modern-keyword nil) + (global-org-modern-mode)) + (provide 'acdw-org) ;;; acdw-org.el ends here -- cgit 1.4.1-21-gabe81