From 8e6e3d402bb66e8ca61691bd2d4b1641e4ffaf15 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 26 Jun 2020 18:36:31 +0200 Subject: Create customization themes to change spacemacs themes --- emacs-init.org | 1550 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 958 insertions(+), 592 deletions(-) diff --git a/emacs-init.org b/emacs-init.org index a6b15b9..f74dd8b 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -304,7 +304,36 @@ Instead of the above code I set the font directly using appreciate light themes more. [[https://gitlab.com/protesilaos/modus-themes][modus-operandi]] is an interesting light theme promising high color contrast. I ended up using the =spacemacs-light= and =spacemacs-dark= themes. -#+begin_src emacs-lisp :tangle no +#+begin_src emacs-lisp +(defcustom fpi/light-theme-list '(spacemacs-light spacemacs-light-customizations) + "List of themes to activate when using a light theme.") +(defcustom fpi/dark-theme-list '(spacemacs-dark spacemacs-dark-customizations) + "List of themes to activate when using a dark theme.") +(defcustom fpi/current-theme 'light + "Currently activated theme variation.") +#+end_src + +Function to load themes based on the ~fpi/current-theme~ setting. +#+begin_src emacs-lisp +(defun fpi/load-themes (&optional theme-variation) + "Load themes based on the value of `fpi/current-theme'. + +Optionally provide THEME-VARIATION to override +`fpi/current-theme'. Loaded themes are based on the value +of `(format \"fpi/%s-theme-list\" fpi/current-theme)'" + (interactive) + (mapc 'disable-theme custom-enabled-themes);; disable all themes + (let* ((theme-variation (or theme-variation fpi/current-theme)) + (themes (eval (intern (format "fpi/%s-theme-list" theme-variation))))) + (mapc (lambda (theme) (load-theme theme t)) themes) + )) +#+end_src +Load the themes. This is written here for clarity, but only executed at the end of the initialization after ~pdf-view-midnight-colors~, etc. are defined. +#+begin_src emacs-lisp :tangle no :noweb-ref load-theme +(fpi/load-themes) +#+end_src +*** Getting themes +#+begin_src emacs-lisp (use-package spacemacs-light-theme :no-require t :straight (spacemacs-theme)) @@ -313,605 +342,942 @@ theme promising high color contrast. I ended up using the :straight (spacemacs-theme)) #+end_src -#+begin_src emacs-lisp -(defcustom fpi/light-theme 'modus-operandi - "My standard light theme.") -(defcustom fpi/dark-theme 'modus-vivendi - "My standard dark theme.") - +#+begin_src emacs-lisp :tangle no (use-package modus-operandi-theme :straight t) (use-package modus-vivendi-theme :straight t) #+end_src -Load the theme. The code is here, but only executed at the end of the -initialization after ~pdf-view-midnight-colors~, etc. are defined. -#+begin_src emacs-lisp :tangle no :noweb-ref load-theme -(load-theme fpi/light-theme t) -#+end_src *** Theme customization -:PROPERTIES: -:header-args:emacs-lisp: :tangle no -:END: -To do some custom adjustments to it I use the following macro which -adds an advice to ~load-theme~. -#+begin_src emacs-lisp -(defmacro set-pair-faces (themes consts faces-alist) - "Macro for pair setting of custom faces. -THEMES name the pair (theme-one theme-two). CONSTS sets the variables like - ((sans-font \"Some Sans Font\") ...). FACES-ALIST has the actual faces -like: - ((face1 theme-one-attr theme-two-atrr) - (face2 theme-one-attr nil ) - (face3 nil theme-two-attr) - ...)" +In this section is code to produce a custom theme out of a list of predefined colors and custom face specs. + +First a function to replace colors in the face specs. +#+begin_src emacs-lisp +(defun prep-custom-theme-set-faces (colors faces-alist) (defmacro get-proper-faces () - `(let* (,@consts) + `(let* (,@colors) (backquote ,faces-alist))) - `(progn - ,@(mapcar - (lambda (theme) - `(defadvice load-theme - (after ,(gensym theme) last (loaded-theme &rest args) activate) - (when (equal loaded-theme (quote ,theme)) - (custom-theme-set-faces - (quote ,theme) ;; maybe instead use =user= theme? - ,@(cl-remove-if - (lambda (x) (equal x "NA")) - (mapcar - (lambda (face) - (let ((face-name (car face)) - (face-attrs (nth (cl-position theme themes) (cdr face)))) - (if face-attrs - `(quote (,face-name ((t ,face-attrs)))) - "NA"))) (get-proper-faces))) - )))) - themes))) -#+end_src - -The above macro can be used like this. -#+begin_src emacs-lisp -(set-pair-faces - ;; Themes to cycle in - (spacemacs-dark spacemacs-light) - ;; Variables - ((bg-white "#fbf8ef") - (bg-light "#222425") - (bg-dark "#1c1e1f") - (bg-darker "#1c1c1c") - (fg-white "#ffffff") - (shade-white "#efeae9") - (fg-light "#655370") - (dark-cyan "#008b8b") - (light-green "#4f774f") ;;#3f773f - (dark-green "#1c661c") - (dark-green2 "#002000") - (region-dark "#2d2e2e") - (region "#39393d") - (slate "#8FA1B3") - (keyword "#f92672") - (comment "#525254") - (builtin "#fd971f") - (purple "#9c91e4") - (doc "#727280") - (type "#66d9ef") - (string "#b6e63e") - (gray-dark "#999") - (gray "#bbb") - (sans-font "Source Sans Pro") - (serif-font "Merriweather") - (et-font "EtBookOt") - (sans-mono-font "Hack") - ;; (serif-mono-font "Verily Serif Mono") - (serif-mono-font "cmu typewriter text") - ) + (get-proper-faces)) +#+end_src + +This call now creates a custom theme based on the settings in the sections +[[id:82021d54-89d6-4712-8e5a-df2fc6177c96][Colors]] and [[id:a3b74d3b-675e-426d-b675-e70dcfd3d2b6][Faces]]. These are my customizations to the spacemacs theme. Make sure to manually run these customization blocks after changing a face, as only the result blocks are tangled! +#+begin_src emacs-lisp :tangle no :results code replace :wrap "src emacs-lisp :tangle tangle/spacemacs-dark-customizations-theme.el" +`(progn + (deftheme spacemacs-dark-customizations + "My customizations to spacemacs-dark (Created 2020-06-27)") + (custom-theme-set-faces + 'spacemacs-dark-customizations + ,@(prep-custom-theme-set-faces + (quote + <>) + <>)) + (provide-theme 'spacemacs-dark-customizations)) +#+end_src - ;; (set-face-attribute 'default nil :font "Hack-11") -;; (set-face-attribute 'variable-pitch nil :font "EtBookOt-11") - ;; Settings - ((default - (:family ,sans-mono-font - :background ,bg-dark - :foreground ,bg-white) - (:family ,sans-mono-font - :background ,bg-white - :foreground ,bg-dark - :height 75)) - (variable-pitch - (:family ,sans-font) - (:family ,et-font - :background nil - :foreground ,bg-dark - :height 1.2)) - (header-line - (:background nil :inherit nil) - (:background nil :inherit nil)) - ;; (company-tooltip - ;; (:background ,bg-darker - ;; :foreground ,gray) - ;; nil) - ;; (company-scrollbar-fg - ;; (:background ,comment) - ;; nil) - ;; (company-scrollbar-bg - ;; (:background ,bg-darker) - ;; nil) - ;; (company-tooltip-common - ;; (:foreground ,keyword) - ;; nil) - ;; (company-tootip-annotation - ;; (:foreground ,type) - ;; nil) - ;; (company-tooltip-selection - ;; (:background ,region) - ;; nil) - (show-paren-match - (:background ,keyword - :foreground ,bg-dark) - nil) - (magit-section-heading - (:foreground ,keyword) - nil) - (magit-header-line - (:background nil - :foreground ,bg-dark - :box nil) - (:background nil - :foreground ,bg-white - :box nil)) - (magit-diff-hunk-heading - (:background ,comment - :foreground ,gray) - nil) - (magit-diff-hunk-heading-highlight - (:background ,comment - :foreground ,fg-white) - nil) - (tooltip - (:foreground ,gray - :background ,bg-darker) - nil) - (mode-line - (:background ,bg-darker) - (:background ,bg-white - :box nil)) - (mode-line-inactive - nil - (:box nil)) - (powerline-active1 - nil - (:background ,bg-white)) - (powerline-active2 - nil - (:background ,bg-white)) - (powerline-inactive1 - nil - (:background ,bg-white)) - (powerline-inactive2 - nil - (:background ,bg-white)) - (highlight - (:background ,region - :foreground ,fg-white) - (:background ,shade-white)) - (hl-line - (:background ,region-dark) - nil) - (org-document-title - (:inherit variable-pitch - :height 1.3 - :weight normal - :foreground ,gray) - (:inherit nil - :family ,et-font - :height 1.8 - :foreground ,bg-dark - :underline nil)) - (org-document-info - (:foreground ,gray - :slant italic) - (:height 1.2 - :slant italic)) - (org-archived - nil - (:inherit shadow - :height 0.6)) - (org-level-1 - (:inherit variable-pitch - :height 1.3 - :weight bold - :foreground ,keyword - :background ,bg-dark) - (:inherit nil - :family ,et-font - :height 1.6 - :weight normal - :slant normal - :foreground ,bg-dark)) - (org-level-2 - (:inherit variable-pitch - :weight bold - :height 1.2 - :foreground ,gray - :background ,bg-dark) - (:inherit nil - :family ,et-font - :weight normal - :height 1.3 - :slant italic - :foreground ,bg-dark)) - (org-level-3 - (:inherit variable-pitch - :weight bold - :height 1.1 - :foreground ,slate - :background ,bg-dark) - (:inherit nil - :family ,et-font - :weight normal - :slant italic - :height 1.2 - :foreground ,bg-dark)) - (org-level-4 - (:inherit variable-pitch - :weight bold - :height 1.1 - :foreground ,slate - :background ,bg-dark) - (:inherit nil - :family ,et-font - :weight normal - :slant italic - :height 1.1 - :foreground ,bg-dark)) - (org-level-5 - (:inherit variable-pitch - :weight bold - :height 1.1 - :foreground ,slate - :background ,bg-dark) - nil) - (org-level-6 - (:inherit variable-pitch - :weight bold - :height 1.1 - :foreground ,slate - :background ,bg-dark) - nil) - (org-level-7 - (:inherit variable-pitch - :weight bold - :height 1.1 - :foreground ,slate - :background ,bg-dark) - nil) - (org-level-8 - (:inherit variable-pitch - :weight bold - :height 1.1 - :foreground ,slate - :background ,bg-dark) - nil) - (org-headline-done - (nil) - (:family ,et-font)) - (org-quote - (:background ,bg-dark - :family ,sans-mono-font) - nil) - (org-block - (:background ,bg-dark - :family ,sans-mono-font) - (:background nil - :height 0.9 - :foreground ,bg-dark - :family ,sans-mono-font)) - (org-block-begin-line - (:background ,bg-dark) - (:background nil - :height 0.8 - :family ,sans-mono-font - :foreground ,slate)) - (org-block-end-line - (:background ,bg-dark) - (:background nil - :height 0.8 - :family ,sans-mono-font - :foreground ,slate)) - (org-meta-line - (:foreground ,comment) - (:height 0.8 - :foreground ,gray)) - (org-document-info-keyword - (:foreground ,comment) - (:height 0.8 - :foreground ,gray)) - (org-link - (:underline nil - :weight normal - :foreground ,slate) - (:foreground ,builtin)) - (org-special-keyword - (:height 0.9 - :foreground ,comment) - (:family ,sans-mono-font - :height 0.8)) - (org-property-value - (:height 0.9 - :foreground ,comment) - (:family ,sans-mono-font - :height 0.8)) - (org-drawer - (:height 0.9 - :foreground ,comment) - (:family ,sans-mono-font - :height 0.8)) - (org-todo - (:foreground ,builtin - :background ,bg-dark) - nil) - (org-done - (:inherit variable-pitch - :foreground ,dark-cyan - :background ,bg-dark) - nil) - (org-agenda-current-time - (:foreground ,slate) - nil) - (org-hide - nil - (:foreground ,bg-white)) - (org-indent - (:inherit org-hide) - (:inherit (org-hide fixed-pitch))) - (org-time-grid - (:foreground ,comment) - nil) - (org-warning - (:foreground ,builtin) - nil) - (org-date - nil - (:family ,sans-mono-font - :height 0.8)) - (org-agenda-structure - (:height 1.3 - :foreground ,doc - :weight normal - :inherit variable-pitch) - nil) - (org-agenda-date - (:foreground ,doc) - (:foreground ,doc)) - (org-agenda-date-today - (:height 1.5 - :foreground ,keyword) - (:height 1.2)) - (org-agenda-date-weekend - (:inherit org-agenda-date) - nil) - (org-scheduled - (:foreground ,gray) - (:foreground ,light-green)) - (org-upcoming-deadline - (:foreground ,keyword) - nil) - (org-scheduled-today - (:foreground ,fg-white) - (:foreground ,dark-green)) - (org-scheduled-previously - (:foreground ,slate) - (:foreground ,dark-green2)) - (org-agenda-done - (:inherit nil - :foreground ,doc) - (:foreground ,doc)) - (org-ellipsis - (:underline nil - :foreground ,comment) - (:underline nil - :foreground ,comment)) - (org-tag - (:foreground ,doc) - (:foreground ,doc)) - (org-table - (:background nil - :family ,sans-mono-font) - (:family ,serif-mono-font - :height 0.9 - :background ,bg-white)) - (org-code - (:inherit font-lock-builtin-face) - (:inherit nil - :family ,serif-mono-font - :foreground ,comment - :height 0.9)) - (font-latex-sectioning-0-face - (:foreground ,type - :height 1.2) - nil) - (font-latex-sectioning-1-face - (:foreground ,type - :height 1.1) - nil) - (font-latex-sectioning-2-face - (:foreground ,type - :height 1.1) - nil) - (font-latex-sectioning-3-face - (:foreground ,type - :height 1.0) - nil) - (font-latex-sectioning-4-face - (:foreground ,type - :height 1.0) - nil) - (font-latex-sectioning-5-face - (:foreground ,type - :height 1.0) - nil) - (font-latex-verbatim-face - (:foreground ,builtin) - nil) - (spacemacs-normal-face - (:background ,bg-dark - :foreground ,fg-white) - nil) - (spacemacs-evilified-face - (:background ,bg-dark - :foreground ,fg-white) - nil) - (spacemacs-lisp-face - (:background ,bg-dark - :foreground ,fg-white) - nil) - (spacemacs-emacs-face - (:background ,bg-dark - :foreground ,fg-white) - nil) - (spacemacs-motion-face - (:background ,bg-dark - :foreground ,fg-white) - nil) - (spacemacs-visual-face - (:background ,bg-dark - :foreground ,fg-white) - nil) - (spacemacs-hybrid-face - (:background ,bg-dark - :foreground ,fg-white) - nil) - (bm-persistent-face - (:background ,dark-cyan - :foreground ,fg-white) - nil) - (helm-selection - (:background ,region) - nil) - (helm-match - (:foreground ,keyword) - nil) - (cfw:face-title - (:height 2.0 - :inherit variable-pitch - :weight bold - :foreground ,doc) - nil) - (cfw:face-holiday - (:foreground ,builtin) - nil) - (cfw:face-saturday - (:foreground ,doc - :weight bold) - nil) - (cfw:face-sunday - (:foreground ,doc) - nil) - (cfw:face-periods - (:foreground ,dark-cyan) - nil) - (cfw:face-annotation - (:foreground ,doc) - nil) - (cfw:face-select - (:background ,region) - nil) - (cfw:face-toolbar-button-off - (:foreground ,doc) - nil) - (cfw:face-toolbar-button-on - (:foreground ,type - :weight bold) - nil) - (cfw:face-day-title - (:foreground ,doc) - nil) - (cfw:face-default-content - (:foreground ,dark-cyan) - nil) - (cfw:face-disable - (:foreground ,doc) - nil) - (cfw:face-today - (:background ,region - :weight bold) - nil) - (cfw:face-toolbar - (:inherit default) - nil) - (cfw:face-today-title - (:background ,keyword - :foreground ,fg-white) - nil) - (cfw:face-grid - (:foreground ,comment) - nil) - (cfw:face-header - (:foreground ,keyword - :weight bold) - nil) - (cfw:face-default-day - (:foreground ,fg-white) - nil) - (dired-subtree-depth-1-face - (:background nil) - (:background nil)) - (dired-subtree-depth-2-face - (:background nil) - (:background nil)) - (dired-subtree-depth-3-face - (:background nil) - (:background nil)) - (dired-subtree-depth-4-face - (:background nil) - (:background nil)) - (dired-subtree-depth-5-face - (:background nil) - (:background nil)) - (dired-subtree-depth-6-face - (:background nil) - (:background nil)) - (nlinum-current-line - (:foreground ,builtin) - (:foreground ,bg-dark)) - (vertical-border - (:background ,region - :foreground ,region) - nil) - (which-key-command-description-face - (:foreground ,type) - nil) - (flycheck-error - (:background nil) - nil) - (flycheck-warning - (:background nil) - nil) - (font-lock-string-face - (:foreground ,string) - nil) - (font-lock-comment-face - (:foreground ,doc - :slant italic) - (:background nil - :foreground ,doc - :slant italic)) - (elfeed-search-unread-title-face - (:weight bold) - (:weight bold)) - (helm-ff-symlink - (:foreground ,slate) - nil) - (region - (:background ,region) - nil) - (header-line - (:background nil - :inherit nil) - (:background nil - :inherit nil)))) -#+end_src -*** Diminish buffer-face-mode +#+RESULTS: +#+begin_src emacs-lisp :tangle tangle/spacemacs-dark-customizations-theme.el +(progn + (deftheme spacemacs-dark-customizations "My customizations to spacemacs-dark (Created 2020-06-27)") + (custom-theme-set-faces 'spacemacs-dark-customizations + '(default + ((t + (:family "Hack" :background "#1c1e1f" :foreground "#fbf8ef")))) + '(variable-pitch + ((t + (:family "Source Sans Pro")))) + '(header-line + ((t + (:background nil :inherit nil)))) + '(show-paren-match + ((t + (:background "#f92672" :foreground "#1c1e1f")))) + '(magit-section-heading + ((t + (:foreground "#f92672")))) + '(magit-header-line + ((t + (:background nil :foreground "#1c1e1f" :box nil)))) + '(magit-diff-hunk-heading + ((t + (:background "#525254" :foreground "#bbb")))) + '(magit-diff-hunk-heading-highlight + ((t + (:background "#525254" :foreground "#ffffff")))) + '(tooltip + ((t + (:foreground "#bbb" :background "#1c1c1c")))) + '(mode-line + ((t + (:background "#1c1c1c")))) + '(mode-line-inactive + ((t nil))) + '(powerline-active1 + ((t nil))) + '(powerline-active2 + ((t nil))) + '(powerline-inactive1 + ((t nil))) + '(powerline-inactive2 + ((t nil))) + '(highlight + ((t + (:background "#39393d" :foreground "#ffffff")))) + '(hl-line + ((t + (:background "#2d2e2e")))) + '(org-document-title + ((t + (:inherit variable-pitch :height 1.3 :weight normal :foreground "#bbb")))) + '(org-document-info + ((t + (:foreground "#bbb" :slant italic)))) + '(org-archived + ((t nil))) + '(org-level-1 + ((t + (:inherit variable-pitch :height 1.3 :weight bold :foreground "#f92672" :background "#1c1e1f")))) + '(org-level-2 + ((t + (:inherit variable-pitch :weight bold :height 1.2 :foreground "#bbb" :background "#1c1e1f")))) + '(org-level-3 + ((t + (:inherit variable-pitch :weight bold :height 1.1 :foreground "#8FA1B3" :background "#1c1e1f")))) + '(org-level-4 + ((t + (:inherit variable-pitch :weight bold :height 1.1 :foreground "#8FA1B3" :background "#1c1e1f")))) + '(org-level-5 + ((t + (:inherit variable-pitch :weight bold :height 1.1 :foreground "#8FA1B3" :background "#1c1e1f")))) + '(org-level-6 + ((t + (:inherit variable-pitch :weight bold :height 1.1 :foreground "#8FA1B3" :background "#1c1e1f")))) + '(org-level-7 + ((t + (:inherit variable-pitch :weight bold :height 1.1 :foreground "#8FA1B3" :background "#1c1e1f")))) + '(org-level-8 + ((t + (:inherit variable-pitch :weight bold :height 1.1 :foreground "#8FA1B3" :background "#1c1e1f")))) + '(org-headline-done + (nil)) + '(org-quote + ((t + (:background "#1c1e1f" :family "Hack")))) + '(org-block + ((t + (:background "#1c1e1f" :family "Hack")))) + '(org-block-begin-line + ((t + (:background "#1c1e1f")))) + '(org-block-end-line + ((t + (:background "#1c1e1f")))) + '(org-meta-line + ((t + (:foreground "#525254")))) + '(org-document-info-keyword + ((t + (:foreground "#525254")))) + '(org-link + ((t + (:underline nil :weight normal :foreground "#8FA1B3")))) + '(org-special-keyword + ((t + (:height 0.9 :foreground "#525254")))) + '(org-property-value + ((t + (:height 0.9 :foreground "#525254")))) + '(org-drawer + ((t + (:height 0.9 :foreground "#525254")))) + '(org-todo + ((t + (:foreground "#fd971f" :background "#1c1e1f")))) + '(org-done + ((t + (:inherit variable-pitch :foreground "#008b8b" :background "#1c1e1f")))) + '(org-agenda-current-time + ((t + (:foreground "#8FA1B3")))) + '(org-hide + ((t nil))) + '(org-indent + ((t + (:inherit org-hide)))) + '(org-time-grid + ((t + (:foreground "#525254")))) + '(org-warning + ((t + (:foreground "#fd971f")))) + '(org-date + ((t nil))) + '(org-agenda-structure + ((t + (:height 1.3 :foreground "#727280" :weight normal :inherit variable-pitch)))) + '(org-agenda-date + ((t + (:foreground "#727280")))) + '(org-agenda-date-today + ((t + (:height 1.5 :foreground "#f92672")))) + '(org-agenda-date-weekend + ((t + (:inherit org-agenda-date)))) + '(org-scheduled + ((t + (:foreground "#bbb")))) + '(org-upcoming-deadline + ((t + (:foreground "#f92672")))) + '(org-scheduled-today + ((t + (:foreground "#ffffff")))) + '(org-scheduled-previously + ((t + (:foreground "#8FA1B3")))) + '(org-agenda-done + ((t + (:inherit nil :foreground "#727280")))) + '(org-ellipsis + ((t + (:underline nil :foreground "#525254")))) + '(org-tag + ((t + (:foreground "#727280")))) + '(org-table + ((t + (:background nil :family "Hack")))) + '(org-code + ((t + (:inherit font-lock-builtin-face)))) + '(font-latex-sectioning-0-face + ((t + (:foreground "#66d9ef" :height 1.2)))) + '(font-latex-sectioning-1-face + ((t + (:foreground "#66d9ef" :height 1.1)))) + '(font-latex-sectioning-2-face + ((t + (:foreground "#66d9ef" :height 1.1)))) + '(font-latex-sectioning-3-face + ((t + (:foreground "#66d9ef" :height 1.0)))) + '(font-latex-sectioning-4-face + ((t + (:foreground "#66d9ef" :height 1.0)))) + '(font-latex-sectioning-5-face + ((t + (:foreground "#66d9ef" :height 1.0)))) + '(font-latex-verbatim-face + ((t + (:foreground "#fd971f")))) + '(spacemacs-normal-face + ((t + (:background "#1c1e1f" :foreground "#ffffff")))) + '(spacemacs-evilified-face + ((t + (:background "#1c1e1f" :foreground "#ffffff")))) + '(spacemacs-lisp-face + ((t + (:background "#1c1e1f" :foreground "#ffffff")))) + '(spacemacs-emacs-face + ((t + (:background "#1c1e1f" :foreground "#ffffff")))) + '(spacemacs-motion-face + ((t + (:background "#1c1e1f" :foreground "#ffffff")))) + '(spacemacs-visual-face + ((t + (:background "#1c1e1f" :foreground "#ffffff")))) + '(spacemacs-hybrid-face + ((t + (:background "#1c1e1f" :foreground "#ffffff")))) + '(bm-persistent-face + ((t + (:background "#008b8b" :foreground "#ffffff")))) + '(helm-selection + ((t + (:background "#39393d")))) + '(helm-match + ((t + (:foreground "#f92672")))) + '(cfw:face-title + ((t + (:height 2.0 :inherit variable-pitch :weight bold :foreground "#727280")))) + '(cfw:face-holiday + ((t + (:foreground "#fd971f")))) + '(cfw:face-saturday + ((t + (:foreground "#727280" :weight bold)))) + '(cfw:face-sunday + ((t + (:foreground "#727280")))) + '(cfw:face-periods + ((t + (:foreground "#008b8b")))) + '(cfw:face-annotation + ((t + (:foreground "#727280")))) + '(cfw:face-select + ((t + (:background "#39393d")))) + '(cfw:face-toolbar-button-off + ((t + (:foreground "#727280")))) + '(cfw:face-toolbar-button-on + ((t + (:foreground "#66d9ef" :weight bold)))) + '(cfw:face-day-title + ((t + (:foreground "#727280")))) + '(cfw:face-default-content + ((t + (:foreground "#008b8b")))) + '(cfw:face-disable + ((t + (:foreground "#727280")))) + '(cfw:face-today + ((t + (:background "#39393d" :weight bold)))) + '(cfw:face-toolbar + ((t + (:inherit default)))) + '(cfw:face-today-title + ((t + (:background "#f92672" :foreground "#ffffff")))) + '(cfw:face-grid + ((t + (:foreground "#525254")))) + '(cfw:face-header + ((t + (:foreground "#f92672" :weight bold)))) + '(cfw:face-default-day + ((t + (:foreground "#ffffff")))) + '(dired-subtree-depth-1-face + ((t + (:background nil)))) + '(dired-subtree-depth-2-face + ((t + (:background nil)))) + '(dired-subtree-depth-3-face + ((t + (:background nil)))) + '(dired-subtree-depth-4-face + ((t + (:background nil)))) + '(dired-subtree-depth-5-face + ((t + (:background nil)))) + '(dired-subtree-depth-6-face + ((t + (:background nil)))) + '(nlinum-current-line + ((t + (:foreground "#fd971f")))) + '(vertical-border + ((t + (:background "#39393d" :foreground "#39393d")))) + '(which-key-command-description-face + ((t + (:foreground "#66d9ef")))) + '(flycheck-error + ((t + (:background nil)))) + '(flycheck-warning + ((t + (:background nil)))) + '(font-lock-string-face + ((t + (:foreground "#b6e63e")))) + '(font-lock-comment-face + ((t + (:foreground "#727280" :slant italic)))) + '(elfeed-search-unread-title-face + ((t + (:weight bold)))) + '(helm-ff-symlink + ((t + (:foreground "#8FA1B3")))) + '(region + ((t + (:background "#39393d"))))) + (provide-theme 'spacemacs-dark-customizations)) +#+end_src + +#+begin_src emacs-lisp :tangle no :results code replace :wrap "src emacs-lisp :tangle tangle/spacemacs-light-customizations-theme.el" +`(progn + (deftheme spacemacs-light-customizations + "My customizations to spacemacs-light (Created 2020-06-27)") + (custom-theme-set-faces + 'spacemacs-light-customizations + ,@(prep-custom-theme-set-faces + (quote + <>) + <>)) + (provide-theme 'spacemacs-light-customizations)) +#+end_src + +#+RESULTS: +#+begin_src emacs-lisp :tangle tangle/spacemacs-light-customizations-theme.el +(progn + (deftheme spacemacs-light-customizations "My customizations to spacemacs-light (Created 2020-06-27)") + (custom-theme-set-faces 'spacemacs-light-customizations + '(default + ((t + (:family "Hack" :background "#fbf8ef" :foreground "#1c1e1f")))) + '(variable-pitch + ((t + (:family "EtBookOt" :background nil :foreground "#1c1e1f" :height 1.2)))) + '(header-line + ((t + (:background nil :inherit nil)))) + '(show-paren-match + ((t nil))) + '(magit-section-heading + ((t nil))) + '(magit-header-line + ((t + (:background nil :foreground "#fbf8ef" :box nil)))) + '(magit-diff-hunk-heading + ((t nil))) + '(magit-diff-hunk-heading-highlight + ((t nil))) + '(tooltip + ((t nil))) + '(mode-line + ((t + (:background "#fbf8ef" :box nil)))) + '(mode-line-inactive + ((t + (:box nil)))) + '(powerline-active1 + ((t + (:background "#fbf8ef")))) + '(powerline-active2 + ((t + (:background "#fbf8ef")))) + '(powerline-inactive1 + ((t + (:background "#fbf8ef")))) + '(powerline-inactive2 + ((t + (:background "#fbf8ef")))) + '(highlight + ((t + (:background "#efeae9")))) + '(hl-line + ((t nil))) + '(org-document-title + ((t + (:inherit nil :family "EtBookOt" :height 1.8 :foreground "#1c1e1f" :underline nil)))) + '(org-document-info + ((t + (:height 1.2 :slant italic)))) + '(org-archived + ((t + (:inherit shadow :height 0.6)))) + '(org-level-1 + ((t + (:inherit nil :family "EtBookOt" :height 1.6 :weight normal :slant normal :foreground "#1c1e1f")))) + '(org-level-2 + ((t + (:inherit nil :family "EtBookOt" :weight normal :height 1.3 :slant italic :foreground "#1c1e1f")))) + '(org-level-3 + ((t + (:inherit nil :family "EtBookOt" :weight normal :slant italic :height 1.2 :foreground "#1c1e1f")))) + '(org-level-4 + ((t + (:inherit nil :family "EtBookOt" :weight normal :slant italic :height 1.1 :foreground "#1c1e1f")))) + '(org-level-5 + ((t nil))) + '(org-level-6 + ((t nil))) + '(org-level-7 + ((t nil))) + '(org-level-8 + ((t nil))) + '(org-headline-done + ((t + (:family "EtBookOt")))) + '(org-quote + ((t nil))) + '(org-block + ((t + (:background nil :height 0.9 :foreground "#1c1e1f" :family "Hack")))) + '(org-block-begin-line + ((t + (:background nil :height 0.8 :family "Hack" :foreground "#8FA1B3")))) + '(org-block-end-line + ((t + (:background nil :height 0.8 :family "Hack" :foreground "#8FA1B3")))) + '(org-meta-line + ((t + (:height 0.8 :foreground "#bbb")))) + '(org-document-info-keyword + ((t + (:height 0.8 :foreground "#bbb")))) + '(org-link + ((t + (:foreground "#fd971f")))) + '(org-special-keyword + ((t + (:family "Hack" :height 0.8)))) + '(org-property-value + ((t + (:family "Hack" :height 0.8)))) + '(org-drawer + ((t + (:family "Hack" :height 0.8)))) + '(org-todo + ((t nil))) + '(org-done + ((t nil))) + '(org-agenda-current-time + ((t nil))) + '(org-hide + ((t + (:foreground "#fbf8ef")))) + '(org-indent + ((t + (:inherit + (org-hide fixed-pitch))))) + '(org-time-grid + ((t nil))) + '(org-warning + ((t nil))) + '(org-date + ((t + (:family "Hack" :height 0.8)))) + '(org-agenda-structure + ((t nil))) + '(org-agenda-date + ((t + (:foreground "#727280")))) + '(org-agenda-date-today + ((t + (:height 1.2)))) + '(org-agenda-date-weekend + ((t nil))) + '(org-scheduled + ((t + (:foreground "#4f774f")))) + '(org-upcoming-deadline + ((t nil))) + '(org-scheduled-today + ((t + (:foreground "#1c661c")))) + '(org-scheduled-previously + ((t + (:foreground "#002000")))) + '(org-agenda-done + ((t + (:foreground "#727280")))) + '(org-ellipsis + ((t + (:underline nil :foreground "#525254")))) + '(org-tag + ((t + (:foreground "#727280")))) + '(org-table + ((t + (:family "cmu typewriter text" :height 0.9 :background "#fbf8ef")))) + '(org-code + ((t + (:inherit nil :family "cmu typewriter text" :foreground "#525254" :height 0.9)))) + '(font-latex-sectioning-0-face + ((t nil))) + '(font-latex-sectioning-1-face + ((t nil))) + '(font-latex-sectioning-2-face + ((t nil))) + '(font-latex-sectioning-3-face + ((t nil))) + '(font-latex-sectioning-4-face + ((t nil))) + '(font-latex-sectioning-5-face + ((t nil))) + '(font-latex-verbatim-face + ((t nil))) + '(spacemacs-normal-face + ((t nil))) + '(spacemacs-evilified-face + ((t nil))) + '(spacemacs-lisp-face + ((t nil))) + '(spacemacs-emacs-face + ((t nil))) + '(spacemacs-motion-face + ((t nil))) + '(spacemacs-visual-face + ((t nil))) + '(spacemacs-hybrid-face + ((t nil))) + '(bm-persistent-face + ((t nil))) + '(helm-selection + ((t nil))) + '(helm-match + ((t nil))) + '(cfw:face-title + ((t nil))) + '(cfw:face-holiday + ((t nil))) + '(cfw:face-saturday + ((t nil))) + '(cfw:face-sunday + ((t nil))) + '(cfw:face-periods + ((t nil))) + '(cfw:face-annotation + ((t nil))) + '(cfw:face-select + ((t nil))) + '(cfw:face-toolbar-button-off + ((t nil))) + '(cfw:face-toolbar-button-on + ((t nil))) + '(cfw:face-day-title + ((t nil))) + '(cfw:face-default-content + ((t nil))) + '(cfw:face-disable + ((t nil))) + '(cfw:face-today + ((t nil))) + '(cfw:face-toolbar + ((t nil))) + '(cfw:face-today-title + ((t nil))) + '(cfw:face-grid + ((t nil))) + '(cfw:face-header + ((t nil))) + '(cfw:face-default-day + ((t nil))) + '(dired-subtree-depth-1-face + ((t + (:background nil)))) + '(dired-subtree-depth-2-face + ((t + (:background nil)))) + '(dired-subtree-depth-3-face + ((t + (:background nil)))) + '(dired-subtree-depth-4-face + ((t + (:background nil)))) + '(dired-subtree-depth-5-face + ((t + (:background nil)))) + '(dired-subtree-depth-6-face + ((t + (:background nil)))) + '(nlinum-current-line + ((t + (:foreground "#1c1e1f")))) + '(vertical-border + ((t nil))) + '(which-key-command-description-face + ((t nil))) + '(flycheck-error + ((t nil))) + '(flycheck-warning + ((t nil))) + '(font-lock-string-face + ((t nil))) + '(font-lock-comment-face + ((t + (:background nil :foreground "#727280" :slant italic)))) + '(elfeed-search-unread-title-face + ((t + (:weight bold)))) + '(helm-ff-symlink + ((t nil))) + '(region + ((t nil)))) + (provide-theme 'spacemacs-light-customizations)) +#+end_src + +Now we just have to link the tangled themes to the ~load-path~ +#+BEGIN_SRC shell :results silent :tangle tangle/symlink.sh :shebang "#!/bin/bash" +ln -siv $(pwd)/tangle/spacemacs-dark-customizations-theme.el ~/.emacs.d/ +ln -siv $(pwd)/tangle/spacemacs-light-customizations-theme.el ~/.emacs.d/ +#+END_SRC +**** Colors +:PROPERTIES: +:ID: 82021d54-89d6-4712-8e5a-df2fc6177c96 +:END: +#+begin_src emacs-lisp :noweb-ref colors :tangle no +((bg-white "#fbf8ef") + (bg-light "#222425") + (bg-dark "#1c1e1f") + (bg-darker "#1c1c1c") + (fg-white "#ffffff") + (shade-white "#efeae9") + (fg-light "#655370") + (dark-cyan "#008b8b") + (light-green "#4f774f") ;;#3f773f + (dark-green "#1c661c") + (dark-green2 "#002000") + (region-dark "#2d2e2e") + (region "#39393d") + (slate "#8FA1B3") + (keyword "#f92672") + (comment "#525254") + (builtin "#fd971f") + (purple "#9c91e4") + (doc "#727280") + (type "#66d9ef") + (string "#b6e63e") + (gray-dark "#999") + (gray "#bbb") + (sans-font "Source Sans Pro") + (serif-font "Merriweather") + (et-font "EtBookOt") + (sans-mono-font "Hack") + ;; (serif-mono-font "Verily Serif Mono") + (serif-mono-font "cmu typewriter text") + ) +#+end_src +**** Faces +:PROPERTIES: +:ID: a3b74d3b-675e-426d-b675-e70dcfd3d2b6 +:END: +#+begin_src emacs-lisp :noweb-ref faces-spacemacs-light :tangle no +;; light +'('(default ((t (:family ,sans-mono-font :background ,bg-white :foreground ,bg-dark + ;; :height 75 + )))) + '(variable-pitch ((t (:family ,et-font :background nil :foreground ,bg-dark :height 1.2)))) + '(header-line ((t (:background nil :inherit nil)))) + '(show-paren-match ((t nil))) + '(magit-section-heading ((t nil))) + '(magit-header-line ((t (:background nil :foreground ,bg-white :box nil)))) + '(magit-diff-hunk-heading ((t nil))) + '(magit-diff-hunk-heading-highlight ((t nil))) + '(tooltip ((t nil))) + '(mode-line ((t (:background ,bg-white :box nil)))) + '(mode-line-inactive ((t (:box nil)))) + '(powerline-active1 ((t (:background ,bg-white)))) + '(powerline-active2 ((t (:background ,bg-white)))) + '(powerline-inactive1 ((t (:background ,bg-white)))) + '(powerline-inactive2 ((t (:background ,bg-white)))) + '(highlight ((t (:background ,shade-white)))) + '(hl-line ((t nil))) + '(org-document-title ((t (:inherit nil :family ,et-font :height 1.8 :foreground ,bg-dark :underline nil)))) + '(org-document-info ((t (:height 1.2 :slant italic)))) + '(org-archived ((t (:inherit shadow :height 0.6)))) + '(org-level-1 ((t (:inherit nil :family ,et-font :height 1.6 :weight normal :slant normal :foreground ,bg-dark)))) + '(org-level-2 ((t (:inherit nil :family ,et-font :weight normal :height 1.3 :slant italic :foreground ,bg-dark)))) + '(org-level-3 ((t (:inherit nil :family ,et-font :weight normal :slant italic :height 1.2 :foreground ,bg-dark)))) + '(org-level-4 ((t (:inherit nil :family ,et-font :weight normal :slant italic :height 1.1 :foreground ,bg-dark)))) + '(org-level-5 ((t nil))) + '(org-level-6 ((t nil))) + '(org-level-7 ((t nil))) + '(org-level-8 ((t nil))) + '(org-headline-done ((t (:family ,et-font)))) + '(org-quote ((t nil))) + '(org-block ((t (:background nil :height 0.9 :foreground ,bg-dark :family ,sans-mono-font)))) + '(org-block-begin-line ((t (:background nil :height 0.8 :family ,sans-mono-font :foreground ,slate)))) + '(org-block-end-line ((t (:background nil :height 0.8 :family ,sans-mono-font :foreground ,slate)))) + '(org-meta-line ((t (:height 0.8 :foreground ,gray)))) + '(org-document-info-keyword ((t (:height 0.8 :foreground ,gray)))) + '(org-link ((t (:foreground ,builtin)))) + '(org-special-keyword ((t (:family ,sans-mono-font :height 0.8)))) + '(org-property-value ((t (:family ,sans-mono-font :height 0.8)))) + '(org-drawer ((t (:family ,sans-mono-font :height 0.8)))) + '(org-todo ((t nil))) + '(org-done ((t nil))) + '(org-agenda-current-time ((t nil))) + '(org-hide ((t (:foreground ,bg-white)))) + '(org-indent ((t (:inherit (org-hide fixed-pitch))))) + '(org-time-grid ((t nil))) + '(org-warning ((t nil))) + '(org-date ((t (:family ,sans-mono-font :height 0.8)))) + '(org-agenda-structure ((t nil))) + '(org-agenda-date ((t (:foreground ,doc)))) + '(org-agenda-date-today ((t (:height 1.2)))) + '(org-agenda-date-weekend ((t nil))) + '(org-scheduled ((t (:foreground ,light-green)))) + '(org-upcoming-deadline ((t nil))) + '(org-scheduled-today ((t (:foreground ,dark-green)))) + '(org-scheduled-previously ((t (:foreground ,dark-green2)))) + '(org-agenda-done ((t (:foreground ,doc)))) + '(org-ellipsis ((t (:underline nil :foreground ,comment)))) + '(org-tag ((t (:foreground ,doc)))) + '(org-table ((t (:family ,serif-mono-font :height 0.9 :background ,bg-white)))) + '(org-code ((t (:inherit nil :family ,serif-mono-font :foreground ,comment :height 0.9)))) + '(font-latex-sectioning-0-face ((t nil))) + '(font-latex-sectioning-1-face ((t nil))) + '(font-latex-sectioning-2-face ((t nil))) + '(font-latex-sectioning-3-face ((t nil))) + '(font-latex-sectioning-4-face ((t nil))) + '(font-latex-sectioning-5-face ((t nil))) + '(font-latex-verbatim-face ((t nil))) + '(spacemacs-normal-face ((t nil))) + '(spacemacs-evilified-face ((t nil))) + '(spacemacs-lisp-face ((t nil))) + '(spacemacs-emacs-face ((t nil))) + '(spacemacs-motion-face ((t nil))) + '(spacemacs-visual-face ((t nil))) + '(spacemacs-hybrid-face ((t nil))) + '(bm-persistent-face ((t nil))) + '(helm-selection ((t nil))) + '(helm-match ((t nil))) + '(cfw:face-title ((t nil))) + '(cfw:face-holiday ((t nil))) + '(cfw:face-saturday ((t nil))) + '(cfw:face-sunday ((t nil))) + '(cfw:face-periods ((t nil))) + '(cfw:face-annotation ((t nil))) + '(cfw:face-select ((t nil))) + '(cfw:face-toolbar-button-off ((t nil))) + '(cfw:face-toolbar-button-on ((t nil))) + '(cfw:face-day-title ((t nil))) + '(cfw:face-default-content ((t nil))) + '(cfw:face-disable ((t nil))) + '(cfw:face-today ((t nil))) + '(cfw:face-toolbar ((t nil))) + '(cfw:face-today-title ((t nil))) + '(cfw:face-grid ((t nil))) + '(cfw:face-header ((t nil))) + '(cfw:face-default-day ((t nil))) + '(dired-subtree-depth-1-face ((t (:background nil)))) + '(dired-subtree-depth-2-face ((t (:background nil)))) + '(dired-subtree-depth-3-face ((t (:background nil)))) + '(dired-subtree-depth-4-face ((t (:background nil)))) + '(dired-subtree-depth-5-face ((t (:background nil)))) + '(dired-subtree-depth-6-face ((t (:background nil)))) + '(nlinum-current-line ((t (:foreground ,bg-dark)))) + '(vertical-border ((t nil))) + '(which-key-command-description-face ((t nil))) + '(flycheck-error ((t nil))) + '(flycheck-warning ((t nil))) + '(font-lock-string-face ((t nil))) + '(font-lock-comment-face ((t (:background nil :foreground ,doc :slant italic)))) + '(elfeed-search-unread-title-face ((t (:weight bold)))) + '(helm-ff-symlink ((t nil))) + '(region ((t nil)))) +#+end_src +#+begin_src emacs-lisp :noweb-ref faces-spacemacs-dark :tangle no +;; dark +'('(default ((t (:family ,sans-mono-font :background ,bg-dark :foreground ,bg-white)))) + '(variable-pitch ((t (:family ,sans-font)))) + '(header-line ((t (:background nil :inherit nil)))) + '(show-paren-match ((t (:background ,keyword :foreground ,bg-dark)))) + '(magit-section-heading ((t (:foreground ,keyword)))) + '(magit-header-line ((t (:background nil :foreground ,bg-dark :box nil)))) + '(magit-diff-hunk-heading ((t (:background ,comment :foreground ,gray)))) + '(magit-diff-hunk-heading-highlight ((t (:background ,comment :foreground ,fg-white)))) + '(tooltip ((t (:foreground ,gray :background ,bg-darker)))) + '(mode-line ((t (:background ,bg-darker)))) + '(mode-line-inactive ((t nil))) + '(powerline-active1 ((t nil))) + '(powerline-active2 ((t nil))) + '(powerline-inactive1 ((t nil))) + '(powerline-inactive2 ((t nil))) + '(highlight ((t (:background ,region :foreground ,fg-white)))) + '(hl-line ((t (:background ,region-dark)))) + '(org-document-title ((t (:inherit variable-pitch :height 1.3 :weight normal :foreground ,gray)))) + '(org-document-info ((t (:foreground ,gray :slant italic)))) + '(org-archived ((t nil))) + '(org-level-1 ((t (:inherit variable-pitch :height 1.3 :weight bold :foreground ,keyword :background ,bg-dark)))) + '(org-level-2 ((t (:inherit variable-pitch :weight bold :height 1.2 :foreground ,gray :background ,bg-dark)))) + '(org-level-3 ((t (:inherit variable-pitch :weight bold :height 1.1 :foreground ,slate :background ,bg-dark)))) + '(org-level-4 ((t (:inherit variable-pitch :weight bold :height 1.1 :foreground ,slate :background ,bg-dark)))) + '(org-level-5 ((t (:inherit variable-pitch :weight bold :height 1.1 :foreground ,slate :background ,bg-dark)))) + '(org-level-6 ((t (:inherit variable-pitch :weight bold :height 1.1 :foreground ,slate :background ,bg-dark)))) + '(org-level-7 ((t (:inherit variable-pitch :weight bold :height 1.1 :foreground ,slate :background ,bg-dark)))) + '(org-level-8 ((t (:inherit variable-pitch :weight bold :height 1.1 :foreground ,slate :background ,bg-dark)))) + '(org-headline-done (nil)) + '(org-quote ((t (:background ,bg-dark :family ,sans-mono-font)))) + '(org-block ((t (:background ,bg-dark :family ,sans-mono-font)))) + '(org-block-begin-line ((t (:background ,bg-dark)))) + '(org-block-end-line ((t (:background ,bg-dark)))) + '(org-meta-line ((t (:foreground ,comment)))) + '(org-document-info-keyword ((t (:foreground ,comment)))) + '(org-link ((t (:underline nil :weight normal :foreground ,slate)))) + '(org-special-keyword ((t (:height 0.9 :foreground ,comment)))) + '(org-property-value ((t (:height 0.9 :foreground ,comment)))) + '(org-drawer ((t (:height 0.9 :foreground ,comment)))) + '(org-todo ((t (:foreground ,builtin :background ,bg-dark)))) + '(org-done ((t (:inherit variable-pitch :foreground ,dark-cyan :background ,bg-dark)))) + '(org-agenda-current-time ((t (:foreground ,slate)))) + '(org-hide ((t nil))) + '(org-indent ((t (:inherit org-hide)))) + '(org-time-grid ((t (:foreground ,comment)))) + '(org-warning ((t (:foreground ,builtin)))) + '(org-date ((t nil))) + '(org-agenda-structure ((t (:height 1.3 :foreground ,doc :weight normal :inherit variable-pitch)))) + '(org-agenda-date ((t (:foreground ,doc)))) + '(org-agenda-date-today ((t (:height 1.5 :foreground ,keyword)))) + '(org-agenda-date-weekend ((t (:inherit org-agenda-date)))) + '(org-scheduled ((t (:foreground ,gray)))) + '(org-upcoming-deadline ((t (:foreground ,keyword)))) + '(org-scheduled-today ((t (:foreground ,fg-white)))) + '(org-scheduled-previously ((t (:foreground ,slate)))) + '(org-agenda-done ((t (:inherit nil :foreground ,doc)))) + '(org-ellipsis ((t (:underline nil :foreground ,comment)))) + '(org-tag ((t (:foreground ,doc)))) + '(org-table ((t (:background nil :family ,sans-mono-font)))) + '(org-code ((t (:inherit font-lock-builtin-face)))) + '(font-latex-sectioning-0-face ((t (:foreground ,type :height 1.2)))) + '(font-latex-sectioning-1-face ((t (:foreground ,type :height 1.1)))) + '(font-latex-sectioning-2-face ((t (:foreground ,type :height 1.1)))) + '(font-latex-sectioning-3-face ((t (:foreground ,type :height 1.0)))) + '(font-latex-sectioning-4-face ((t (:foreground ,type :height 1.0)))) + '(font-latex-sectioning-5-face ((t (:foreground ,type :height 1.0)))) + '(font-latex-verbatim-face ((t (:foreground ,builtin)))) + '(spacemacs-normal-face ((t (:background ,bg-dark :foreground ,fg-white)))) + '(spacemacs-evilified-face ((t (:background ,bg-dark :foreground ,fg-white)))) + '(spacemacs-lisp-face ((t (:background ,bg-dark :foreground ,fg-white)))) + '(spacemacs-emacs-face ((t (:background ,bg-dark :foreground ,fg-white)))) + '(spacemacs-motion-face ((t (:background ,bg-dark :foreground ,fg-white)))) + '(spacemacs-visual-face ((t (:background ,bg-dark :foreground ,fg-white)))) + '(spacemacs-hybrid-face ((t (:background ,bg-dark :foreground ,fg-white)))) + '(bm-persistent-face ((t (:background ,dark-cyan :foreground ,fg-white)))) + '(helm-selection ((t (:background ,region)))) + '(helm-match ((t (:foreground ,keyword)))) + '(cfw:face-title ((t (:height 2.0 :inherit variable-pitch :weight bold :foreground ,doc)))) + '(cfw:face-holiday ((t (:foreground ,builtin)))) + '(cfw:face-saturday ((t (:foreground ,doc :weight bold)))) + '(cfw:face-sunday ((t (:foreground ,doc)))) + '(cfw:face-periods ((t (:foreground ,dark-cyan)))) + '(cfw:face-annotation ((t (:foreground ,doc)))) + '(cfw:face-select ((t (:background ,region)))) + '(cfw:face-toolbar-button-off ((t (:foreground ,doc)))) + '(cfw:face-toolbar-button-on ((t (:foreground ,type :weight bold)))) + '(cfw:face-day-title ((t (:foreground ,doc)))) + '(cfw:face-default-content ((t (:foreground ,dark-cyan)))) + '(cfw:face-disable ((t (:foreground ,doc)))) + '(cfw:face-today ((t (:background ,region :weight bold)))) + '(cfw:face-toolbar ((t (:inherit default)))) + '(cfw:face-today-title ((t (:background ,keyword :foreground ,fg-white)))) + '(cfw:face-grid ((t (:foreground ,comment)))) + '(cfw:face-header ((t (:foreground ,keyword :weight bold)))) + '(cfw:face-default-day ((t (:foreground ,fg-white)))) + '(dired-subtree-depth-1-face ((t (:background nil)))) + '(dired-subtree-depth-2-face ((t (:background nil)))) + '(dired-subtree-depth-3-face ((t (:background nil)))) + '(dired-subtree-depth-4-face ((t (:background nil)))) + '(dired-subtree-depth-5-face ((t (:background nil)))) + '(dired-subtree-depth-6-face ((t (:background nil)))) + '(nlinum-current-line ((t (:foreground ,builtin)))) + '(vertical-border ((t (:background ,region :foreground ,region)))) + '(which-key-command-description-face ((t (:foreground ,type)))) + '(flycheck-error ((t (:background nil)))) + '(flycheck-warning ((t (:background nil)))) + '(font-lock-string-face ((t (:foreground ,string)))) + '(font-lock-comment-face ((t (:foreground ,doc :slant italic)))) + '(elfeed-search-unread-title-face ((t (:weight bold)))) + '(helm-ff-symlink ((t (:foreground ,slate)))) + '(region ((t (:background ,region))))) +#+end_src +*** Misc +**** Diminish buffer-face-mode =Face-remap= is a library for basic face remapping. =Buffer-face-mode= is enabled when using =variable-pitch-mode= to show the face defined in =variable-pitch= instead of =default=. @@ -919,7 +1285,7 @@ in =variable-pitch= instead of =default=. (use-package face-remap :delight (buffer-face-mode)) #+end_src -*** Scaling the height of the =default= face. +**** Scaling the height of the =default= face. When switching between monitors with different resolution, scaling the =default= face can be used to in-/decreases the size of text and UI elements (modeline, …) to a more readable size. -- cgit v1.2.3 From 4cebcc5c2d79662608262f391b288f1a70678d3b Mon Sep 17 00:00:00 2001 From: fpi Date: Sun, 28 Jun 2020 10:32:51 +0200 Subject: Fix some use-package calls --- emacs-init.org | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/emacs-init.org b/emacs-init.org index f74dd8b..a2ae1c0 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2347,9 +2347,8 @@ after the theme changes. #+end_src ** Latex #+begin_src emacs-lisp -(use-package auctex - :no-require t - :straight t) +(use-package tex-site + :straight auctex) #+end_src =cdlatex= depends on =texmath.el=. The docstring of =cdlatex= says @@ -2382,8 +2381,8 @@ area. #+end_src *** Matlab #+begin_src emacs-lisp -(use-package matlab-mode - :straight t) +(use-package matlab + :straight matlab-mode) #+end_src ** Org mode Org is the mode you never need to leave, if you do not want to. My org -- cgit v1.2.3 From 7afeedf2333d8780a43bd440a642b22944228c7c Mon Sep 17 00:00:00 2001 From: fpi Date: Sun, 28 Jun 2020 10:33:29 +0200 Subject: Add magit-blame to diff-hl hydra --- emacs-init.org | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/emacs-init.org b/emacs-init.org index a2ae1c0..0a7f8dc 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2071,10 +2071,10 @@ navigate and revert hunks directly from the buffer. Use =g= to open " Diff-hl: _n_: next hunk _s_tage hunk _g_: Magit status - _p_: previous hunk _r_evert hunk _q_uit - ^ ^ _P_opup hunk _Q_uit and deactivate git-gutter - _a_: first hunk - _e_: last hunk _A_mend mode + _p_: previous hunk _r_evert hunk _b_: Magit blame popup + ^ ^ _P_opup hunk ^ ^ + _a_: first hunk ^ ^ _q_uit + _e_: last hunk _A_mend mode _Q_uit and deactivate git-gutter " ("n" diff-hl-next-hunk) ("p" diff-hl-previous-hunk) @@ -2087,6 +2087,7 @@ navigate and revert hunks directly from the buffer. Use =g= to open ("P" diff-hl-diff-goto-hunk) ("A" diff-hl-amend-mode) ("g" magit-status :color blue) + ("b" magit-blame :color blue) ("q" nil :color blue) ("Q" (diff-hl-mode -1) :color blue)) -- cgit v1.2.3 From acfe6ccbf01d3a2fa2bac662cda37af0c2825e6e Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 1 Jul 2020 19:26:00 +0200 Subject: Add dired-git-info --- emacs-init.org | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/emacs-init.org b/emacs-init.org index 0a7f8dc..8ba97f6 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -1928,6 +1928,13 @@ behaviour while inside a regular dired buffer. (peep-dired-ignored-extensions '("mkv" "webm" "mp4" "mp3" "ogg" "iso"))) #+END_SRC +*** dired git info +#+begin_src emacs-lisp +(use-package dired-git-info + :straight t + :bind (:map dired-mode-map + (")" . dired-git-info-mode))) +#+end_src *** dired-x Some additional features that are shipped with Emacs. @@ -1940,8 +1947,6 @@ Some additional features that are shipped with Emacs. (dired-mode . (lambda () (setq dired-clean-confirm-killing-deleted-buffers t)))) #+END_SRC - - *** dired-subtree + The tab key will expand or contract the subdirectory at point. + =C-TAB= will behave just like org-mode handles its headings: hit it -- cgit v1.2.3 From e58f2164507ca27aa53efa706ee7592631ee99f7 Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 1 Jul 2020 19:26:09 +0200 Subject: Add magit forge --- emacs-init.org | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/emacs-init.org b/emacs-init.org index 8ba97f6..6881cdf 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2041,6 +2041,12 @@ Only highlight the changes within a line, not the whole line. :custom (magit-diff-refine-hunk 'all)) #+END_SRC +**** Forge +#+begin_src emacs-lisp +(use-package forge + :after magit + :straight t) +#+end_src **** gitflow Add support for [[https://nvie.com/posts/a-successful-git-branching-model/][gitflow]]. #+begin_src emacs-lisp -- cgit v1.2.3 From 1d6e11eb1f52c0ae9d504844616189fc5f7864bd Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 1 Jul 2020 19:26:15 +0200 Subject: Add a week agenda --- emacs-init.org | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emacs-init.org b/emacs-init.org index 6881cdf..dae6b87 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2609,6 +2609,8 @@ Switch projects and subprojects from NEXT back to TODO" `(("d" "Day agenda" ((agenda "" ((org-agenda-span 'day))) (org-time-budgets-in-agenda-maybe))) + ("w" "Week agenda" + ((agenda "" ((org-agenda-span 'week))))) ("n" "Agenda and all TODOs" ((todo "INPROGRESS" ((org-agenda-overriding-header "Inprogress Tasks"))) -- cgit v1.2.3 From 333360e8f8d9ff5b69373e52a7e334448f0460c3 Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 1 Jul 2020 19:26:22 +0200 Subject: Increase depth of refile levels for agenda files --- emacs-init.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs-init.org b/emacs-init.org index dae6b87..0df2db7 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2713,7 +2713,7 @@ As refile only works on file-visiting buffers, we need to filter all other org b #+begin_src emacs-lisp :noweb-ref org-custom :tangle no (org-refile-use-outline-path 'file) (org-refile-targets '((buffer-file-name :maxlevel . 8) - (org-agenda-files :maxlevel . 3) + (org-agenda-files :maxlevel . 5) (fpi/org-file-buffer-list :maxlevel . 2))) #+end_src *** Time budgets -- cgit v1.2.3 From 7c8270c8de5f756892d32caf2f6bf183f9399f67 Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 1 Jul 2020 19:28:45 +0200 Subject: Extract org capture templates & setup org-expiry --- emacs-init.org | 269 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 175 insertions(+), 94 deletions(-) diff --git a/emacs-init.org b/emacs-init.org index 0df2db7..ed1b139 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2655,9 +2655,6 @@ Switch projects and subprojects from NEXT back to TODO" (use-package org-collector) (use-package ox) (use-package ol-notmuch) -(use-package org-expiry - :custom - (org-expiry-handler-function 'org-expiry-archive-subtree)) (use-package org-habit) #+end_src #+begin_src emacs-lisp @@ -2838,6 +2835,9 @@ Set some prettify symbols for org mode. (("C-c n a" . orb-note-actions)))) #+end_src *** Org-edna +:PROPERTIES: +:ID: fd3936c7-9fc5-42d0-990d-32024e23b22f +:END: =Org-edna= is a great tool to manage =TODO= dependencies. I mainly use it to mark tasks as =NEXT= after switching another task to =DONE=. The functions below are taken from Josh's Emacs Config over at [[https://github.com/mm--/dot-emacs/blob/master/jmm-org-config.org][Github]]. He @@ -2934,27 +2934,41 @@ content syncing upon commit. Templates #+BEGIN_SRC emacs-lisp (use-package org-capture - :custom ( - (org-journal-file (format "~/sync/journal/%s.org" (nth 2 (calendar-current-date)))) - (org-capture-templates - `(("j" "Journal") - ("jj" "Journal Entry (Link)" - entry - (file+olp+datetree - ,org-journal-file) - ;; "** %<%H:%M> %a\n %i%? \n%:description\n%:elfeed-entry-content\n%:elfeed-entry-date\n%:elfeed-entry-meta\n%:elfeed-entry-title\n%:elfeed-entry-enclosures\n%:elfeed-entry-tags" ) - "** %<%H:%M> %a + :custom + ((org-journal-file (format "~/sync/journal/%s.org" (nth 2 (calendar-current-date)))) + (org-capture-templates + `( +<>)) + (org-capture-templates-contexts + '( + <>)))) +#+END_SRC +**** Templates +***** Journal +Capture templates for journal entries. Mostly to just keep track of things I have looked at and which may be interesting later, but do not warrant a zettel right now. +#+BEGIN_SRC emacs-lisp :tangle no :noweb-ref org-capture-templates +("j" "Journal") +("jj" "Journal Entry (Link)" + entry + (file+olp+datetree + ,org-journal-file) + ;; "** %<%H:%M> %a\n %i%? \n%:description\n%:elfeed-entry-content\n%:elfeed-entry-date\n%:elfeed-entry-meta\n%:elfeed-entry-title\n%:elfeed-entry-enclosures\n%:elfeed-entry-tags" ) + "** %<%H:%M> %a %i%?" ) - ("je" "Journal Entry" - entry - (file+olp+datetree - ,org-journal-file) - "** %<%H:%M> %? +("je" "Journal Entry" + entry + (file+olp+datetree + ,org-journal-file) + "** %<%H:%M> %? %i" ) - ("i" "Interrupt" - entry - (id "802014b3-fddf-4090-b140-7fb62cb982f2") - "** Interrupt: %? +#+END_SRC +***** Interrupts +For interruptions. These are saved in a global refile file and to be sorted to their appropriate place. +#+BEGIN_SRC emacs-lisp :tangle no :noweb-ref org-capture-templates +("i" "Interrupt" + entry + (file "~/sync/refile.org") + "** Interrupt: %? :PROPERTIES: :CREATED: %U :SOURCE: %a @@ -2962,92 +2976,118 @@ Templates :LOGBOOK: :END: " -:clock-in t -:clock-resume t) - ("a" "Appointment" - entry - (id "802014b3-fddf-4090-b140-7fb62cb982f2") - "** %? + :clock-in t + :clock-resume t) +#+END_SRC +***** Appointments +#+BEGIN_SRC emacs-lisp :tangle no :noweb-ref org-capture-templates +("a" "Appointment" + entry + (id "802014b3-fddf-4090-b140-7fb62cb982f2") + "** %? :PROPERTIES: :CREATED: %U :DATE: %^t +<> :SOURCE: %a :END: " - ) - ("b" "Bibtex entry" - entry - (id "efc97963-b714-4020-94b6-c23ad2a286ee") - (function fpi/add-org-from-doi)) - ("r" "Reply" - entry - (file "~/sync/refile.org") - "* REPLY: %:from: %:subject + ) +#+END_SRC +***** Tasks +Instead of project related capture templates, I use the same template for all tasks and refile them manually to where they belong. +#+BEGIN_SRC emacs-lisp :tangle no :noweb-ref org-capture-templates +("t" "Task" + entry + (file "~/sync/refile.org") + "** NEXT %? :PROPERTIES: :CREATED: %U +<> :SOURCE: %a :END: -%? -" - ) - ("c" "Checkout") - ("cr" ".. & read" - entry - (file "~/sync/refile.org") - "* TODO %a :READLIST: +%i") +#+END_SRC +***** Plans & Ideas +#+BEGIN_SRC emacs-lisp :tangle no :noweb-ref org-capture-templates +("p" "Plans/Ideas" + entry + (file "~/sync/refile.org") + "*** PLANNING %? +:PROPERTIES: +:CREATED: %U +<> +:SOURCE: %a +:END: +%i") +#+END_SRC +***** Reply to Mail +#+BEGIN_SRC emacs-lisp :tangle no :noweb-ref org-capture-templates +("r" "Respond" entry (file "~/sync/refile.org") + "* NEXT Respond to %:from on %:subject +:PROPERTIES: +:CREATED: %U +<> +:END: +%a" :immediate-finish t) +#+END_SRC + +#+BEGIN_SRC emacs-lisp :tangle no :noweb-ref org-capture-templates-contexts +("r" ((in-mode . "gnus-summary-mode") + (in-mode . "gnus-article-mode"))) +#+END_SRC +***** Interesting stuff I have to look at later +#+BEGIN_SRC emacs-lisp :tangle no :noweb-ref org-capture-templates +("c" "Checkout") +("cr" ".. & read" + entry + (file "~/sync/refile.org") + "* TODO %a :READLIST: :PROPERTIES: :CREATED: %U +<> +:SOURCE: %a :END: -%?") - ;; ("a" "Appointment" entry (file "~/sync/a.org") - ;; "* %i%?%(and (org-id-get-create) nil)\n:PROPERTIES:\n:CREATED: %U%(when %a \"\n:SOURCE: %a\")\n:END:\n%^t") - ;; ("t" "Soonish task" entry (file "~/sync/refile.org") - ;; "* NEXT %?%(and (org-id-get-create) nil)\n:PROPERTIES:\n:CREATED: %U%(when %a \"\n:SOURCE: %a\")\n:END:\n%i") - ;; ("s" "Shelve something" entry (file+headline "~/sync/t.org" "Shelf") - ;; "* NEXT %?%(and (org-id-get-create) nil)\n:PROPERTIES:\n:CREATED: %U%(when %a \"\n:SOURCE: %a\")\n:END:\n%i") - ;; ;; ("r" "respond" entry (file "~/sync/refile.org") - ;; ;; "* NEXT Respond to %:from on %:subject\n:PROPERTIES:\n:CREATED: %U\n:END:\n%a\n" :clock-in t :clock-resume t :immediate-finish t) - ;; ("r" "respond" entry (file "~/sync/refile.org") - ;; "* NEXT Respond to %:from on %:subject\n:PROPERTIES:\n:CREATED: %U\n:END:\n%a\n" :immediate-finish t) - ;; ("n" "note" entry (file "~/sync/refile.org") - ;; "* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t) - ;; ("j" "Journal/Interruptions" entry (file+olp+datetree "~/sync/diary.org") - ;; "* %?\n%U\n" :clock-in t :clock-resume t) - ;; ("h" "Habit" entry (file "~/sync/refile.org") - ;; "* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \"%<<%Y-%m-%d %a .+1d/3d>>\")\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n") - ;; ("m" "Meeting" entry (file "~/sync/refile.org") - ;; "* MEETING with %? :MEETING:\n%U" :clock-in t :clock-resume t) - ;; ("p" "Phone call" entry (file "~/sync/refile.org") - ;; "* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t) - - ;; ("c" "Item to Current Clocked Task" item (clock) - ;; "%i%?" :empty-lines 1) - ;; ("K" "Kill-ring to Current Clocked Task" plain (clock) - ;; "%c" :immediate-finish t :empty-lines 1) - - ;; ("p" "Gcal Appointment" entry (file "~/.emacs.d/gcal.org") - ;; "* %?\n%^T\n") - - ;; ("z" "Zettel" entry (file "~/zettel.org") - ;; "* %i%? %(and (org-id-get-create) nil) - ;; :PROPERTIES:\n :CREATED: %u\n :END:\n ") - - ;; ("l" "Ledger") - ;; ("lb" "Bank" plain (file ,(format "~/.personal/f/%s.ledger" (format-time-string "%Y"))) - ;; ,my/org-ledger-card-template - ;; :empty-lines 1 - ;; :immediate-finish t) - ;; ("lc" "Cash" plain (file ,(format "~/.personal/f/%s.ledger" (format-time-string "%Y"))) - ;; ,my/org-ledger-cash-template - ;; :empty-lines 1 - ;; :immediate-finish t) - ) - ) - (org-capture-templates-contexts - '(("r" ((in-mode . "gnus-summary-mode") - (in-mode . "gnus-article-mode"))))))) +%? +") +#+END_SRC +***** Ledger transactions +#+BEGIN_SRC emacs-lisp :tangle no :noweb-ref org-capture-templates +("l" "Ledger") + ("lb" "Bank" plain (file ,(format "~/.personal/f/%s.ledger" (format-time-string "%Y"))) + ,private/org-ledger-card-template + :empty-lines 1 + :immediate-finish t) + ("lc" "Cash" plain (file ,(format "~/.personal/f/%s.ledger" (format-time-string "%Y"))) + ,private/org-ledger-cash-template + :empty-lines 1 + :immediate-finish t) #+END_SRC -Setup for floating capture window. For reference see [[https://www.windley.com/archives/2010/12/capture_mode_and_emacs.shtml][here]]. +***** Old templates +Templates I no longer use, but may be interesting. +#+BEGIN_SRC emacs-lisp :tangle no +("n" "note" entry (file "~/sync/refile.org") + "* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t) +("j" "Journal/Interruptions" entry (file+olp+datetree "~/sync/diary.org") + "* %?\n%U\n" :clock-in t :clock-resume t) +("h" "Habit" entry (file "~/sync/refile.org") + "* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \"%<<%Y-%m-%d %a .+1d/3d>>\")\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n") +("m" "Meeting" entry (file "~/sync/refile.org") + "* MEETING with %? :MEETING:\n%U" :clock-in t :clock-resume t) +("p" "Phone call" entry (file "~/sync/refile.org") + "* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t) + +("c" "Item to Current Clocked Task" item (clock) + "%i%?" :empty-lines 1) +("K" "Kill-ring to Current Clocked Task" plain (clock) + "%c" :immediate-finish t :empty-lines 1) +("p" "Gcal Appointment" entry (file "~/.emacs.d/gcal.org") + "* %?\n%^T\n") +("z" "Zettel" entry (file "~/zettel.org") + "* %i%? %(and (org-id-get-create) nil) +:PROPERTIES:\n:CREATED: %u\n:END:\n") +#+END_SRC +**** Setup for floating capture window. For reference see [[https://www.windley.com/archives/2010/12/capture_mode_and_emacs.shtml][here]]. #+begin_src emacs-lisp (defun fpi/make-floating-frame (&optional width height minibuffer name) (interactive) @@ -3077,6 +3117,38 @@ Setup for floating capture window. For reference see [[https://www.windley.com/a (org-capture) (remove-hook 'org-capture-mode-hook 'delete-other-windows)) #+end_src +*** Org Expiry +This is an easy way to (semi-)automatically archive no longer relevant entries. + +I want to archive entries sometime after they are set to =DONE=. I first thought about using [[id:fd3936c7-9fc5-42d0-990d-32024e23b22f][Org Edna]]'s =TRIGGER= keyword: +: :TRIGGER: self set-property("EXPIRY" "some-date") +But unfortunately it does not support evaluating lisp for the property value. Therefore either an absolute expiry date has to be known when setting the =TRIGGER= or one needs to use a relative date. + +To come by with relatives dates I use the =CLOSED= property as reference for org-expiry when evaluating relative timestamps. The relative timestamp can then already be set directly in the capture template. Ten days gives me enough time to check whether the content is no longer important and to review the clocked times. +#+begin_src fundamental :noweb-ref org-capture-template-properties +:EXPIRY: +10d +#+end_src +As I do not always mark appointments as =DONE=, I set the =CLOSED= property already in the capture template (to the same time as the actual date). This is currently bugged.. +#+begin_src fundamental :noweb-ref org-capture-template-closed +CLOSED: %\\1 +#+end_src + +#+begin_src emacs-lisp +(use-package org-expiry + :after org + :straight (org-plus-contrib) + :custom + (org-expiry-handler-function 'org-expiry-archive-subtree) + (org-expiry-inactive-timestamps t) + (org-expiry-created-property-name "CLOSED")) +;; (defun fpi/org-insert-expiry (&optional date) +;; (interactive) +;; (let ((date (or date "fri"))) +;; (with-temp-buffer +;; (org-insert-time-stamp (org-read-date nil t "fri") nil t) +;; (buffer-string)))) +#+end_src +(org-read-date nil nil ".") *** Ricing #+begin_src emacs-lisp (setq line-spacing 0.1) @@ -3146,6 +3218,15 @@ time in a bibtex src block in the heading. The src blocks are tangled to compile into a separate =.bib= file. The function below creates new entries from a given doi and is called in my respective capture template. + +Here is my capture template. +#+BEGIN_SRC emacs-lisp :tangle no :noweb-ref org-capture-templates +("b" "Bibtex entry" + entry + (id "efc97963-b714-4020-94b6-c23ad2a286ee") + (function fpi/add-org-from-doi)) +#+END_SRC +And the function to create the file. #+begin_src emacs-lisp (defun fpi/add-org-from-doi (&optional doi) "Get bibtex entry from doi and format as Org header with -- cgit v1.2.3 From e1fdf7757e12a0abe90a5a9568d5bb110fa653b6 Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 1 Jul 2020 19:29:17 +0200 Subject: Add more org-time-budgets --- emacs-init.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emacs-init.org b/emacs-init.org index ed1b139..8899445 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2720,7 +2720,9 @@ Gives an overview of time spent on defined budgets this week. Great to track if :straight (:host github :repo "fpiper/org-time-budgets" :branch "develop") :custom - (org-time-budgets '((:title "Work" :match "+work-nowork" :budget "40:00" :block workweek)))) + (org-time-budgets '((:title "Work" :match "+work-nowork" :budget "40:00" :block workweek) + (:title "Research" :match "+work+research" :budget "24:00" :block total-only) + (:title "Teaching" :match "+work+teaching" :budget "8:00" :block total-only)))) #+end_src *** Column view #+begin_src emacs-lisp -- cgit v1.2.3 From 5e29df1426a7d88f64619b51e7a4dd7f360b3914 Mon Sep 17 00:00:00 2001 From: fpi Date: Mon, 29 Jun 2020 08:44:06 +0200 Subject: Add function to properly load & toggle the theme --- emacs-init.org | 51 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/emacs-init.org b/emacs-init.org index 8899445..d2f55ff 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -304,17 +304,24 @@ Instead of the above code I set the font directly using appreciate light themes more. [[https://gitlab.com/protesilaos/modus-themes][modus-operandi]] is an interesting light theme promising high color contrast. I ended up using the =spacemacs-light= and =spacemacs-dark= themes. -#+begin_src emacs-lisp + +This is written here for clarity, but only executed at the end of my +init files, after some variables which depend on the current theme are +defined, for example ~pdf-view-midnight-colors~. +#+NAME: themes +#+begin_src emacs-lisp :tangle no +<> (defcustom fpi/light-theme-list '(spacemacs-light spacemacs-light-customizations) "List of themes to activate when using a light theme.") (defcustom fpi/dark-theme-list '(spacemacs-dark spacemacs-dark-customizations) "List of themes to activate when using a dark theme.") (defcustom fpi/current-theme 'light - "Currently activated theme variation.") + "Currently activated theme variation." + :set #'fpi/set-and-reload-theme) #+end_src -Function to load themes based on the ~fpi/current-theme~ setting. -#+begin_src emacs-lisp +Functions to load themes based on the ~fpi/current-theme~ setting and to toggle the current theme between light and dark. +#+begin_src emacs-lisp :noweb-ref theme-functions :tangle no (defun fpi/load-themes (&optional theme-variation) "Load themes based on the value of `fpi/current-theme'. @@ -325,12 +332,24 @@ of `(format \"fpi/%s-theme-list\" fpi/current-theme)'" (mapc 'disable-theme custom-enabled-themes);; disable all themes (let* ((theme-variation (or theme-variation fpi/current-theme)) (themes (eval (intern (format "fpi/%s-theme-list" theme-variation))))) - (mapc (lambda (theme) (load-theme theme t)) themes) - )) + (mapc (lambda (theme) (load-theme theme t)) themes))) +(defun fpi/set-and-reload-theme (symbol value) + "Set SYMBOL to VALUE and update themes. + +Set SYMBOL to VALUE with `set-default'if it is not already set to +that value and update the loaded themes afterwards." + (when (not (and (boundp symbol) (eq (eval symbol) value))) + (set-default symbol value) + (fpi/load-themes))) +(defun fpi/toggle-theme () + "Toggle between light and dark theme." + (interactive) + (if (eq fpi/current-theme 'light) + (customize-save-variable 'fpi/current-theme 'dark) + (customize-save-variable 'fpi/current-theme 'light))) #+end_src -Load the themes. This is written here for clarity, but only executed at the end of the initialization after ~pdf-view-midnight-colors~, etc. are defined. -#+begin_src emacs-lisp :tangle no :noweb-ref load-theme -(fpi/load-themes) +#+begin_src emacs-lisp :tangle no :noweb-ref fpi-bindings +(define-key fpi/toggle-map "dt" #'fpi/toggle-theme) #+end_src *** Getting themes #+begin_src emacs-lisp @@ -362,7 +381,7 @@ First a function to replace colors in the face specs. This call now creates a custom theme based on the settings in the sections [[id:82021d54-89d6-4712-8e5a-df2fc6177c96][Colors]] and [[id:a3b74d3b-675e-426d-b675-e70dcfd3d2b6][Faces]]. These are my customizations to the spacemacs theme. Make sure to manually run these customization blocks after changing a face, as only the result blocks are tangled! -#+begin_src emacs-lisp :tangle no :results code replace :wrap "src emacs-lisp :tangle tangle/spacemacs-dark-customizations-theme.el" +#+begin_src emacs-lisp :tangle no :results code replace :wrap "src emacs-lisp :tangle tangle/spacemacs-dark-customizations-theme.el" :exports both `(progn (deftheme spacemacs-dark-customizations "My customizations to spacemacs-dark (Created 2020-06-27)") @@ -707,7 +726,7 @@ This call now creates a custom theme based on the settings in the sections (provide-theme 'spacemacs-dark-customizations)) #+end_src -#+begin_src emacs-lisp :tangle no :results code replace :wrap "src emacs-lisp :tangle tangle/spacemacs-light-customizations-theme.el" +#+begin_src emacs-lisp :tangle no :results code replace :wrap "src emacs-lisp :tangle tangle/spacemacs-light-customizations-theme.el" :exports both `(progn (deftheme spacemacs-light-customizations "My customizations to spacemacs-light (Created 2020-06-27)") @@ -2353,10 +2372,12 @@ would be better to unbind them only when in ~pdf-view-mode~. Advice =load-theme= to update the colors for =pdf-view-midnight-mode= after the theme changes. -#+begin_src emacs-lisp :tangle no :noweb-ref pre-load-theme +#+NAME: theme-dependent-vars +#+begin_src emacs-lisp :tangle no (defadvice load-theme (after update-pdf-view-midnight-color activate) - (setq pdf-view-midnight-colors `(,(face-attribute 'default :foreground) . ,(face-attribute 'default :background)))) + (customize-save-variable 'pdf-view-midnight-colors `(,(face-attribute 'default :foreground) . ,(face-attribute 'default :background)))) #+end_src + ** Latex #+begin_src emacs-lisp (use-package tex-site @@ -4493,6 +4514,6 @@ temporary buffer is created. Some stuff that is run after everything else. #+begin_src emacs-lisp -<> -<> +<> +<> #+end_src -- cgit v1.2.3 From a460e55eb34906700bfac034ddb0b6ddf06720aa Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 1 Jul 2020 19:32:16 +0200 Subject: Dumb fix for org-roam link faces calling tramp --- emacs-init.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/emacs-init.org b/emacs-init.org index d2f55ff..7ed76fe 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2847,8 +2847,13 @@ Set some prettify symbols for org mode. ("C-c n f" . org-roam-find-file) ("C-c n g" . org-roam-show-graph)) :map org-mode-map - (("C-c n i" . org-roam-insert)))) + (("C-c n i" . org-roam-insert))) + :config (defun org-roam--roam-file-link-face (path) + "Return `org-link'" + 'org-link) + ) #+end_src +Fix for hanging emacs. The original function calls file-exist-p which opens a slow tramp connection. **** org-roam-bibtex #+begin_src emacs-lisp :tangle no (use-package org-roam-bibtex -- cgit v1.2.3 From 5b77fb5a4cd57be9bf29c9bdcaf7a2e9c23ca2b5 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 3 Jul 2020 13:47:01 +0200 Subject: Change org-mode repository to my github fork --- emacs-init.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs-init.org b/emacs-init.org index 7ed76fe..e2602f6 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2452,7 +2452,7 @@ Hansen's]] configs. #+begin_src emacs-lisp (use-package org - :straight (org-plus-contrib) + :straight (org-plus-contrib :host github :repo "fpiper/org-mode" :branch "develop" :local-repo "org" :files (:defaults "contrib/lisp/*.el")) :delight (org-cdlatex-mode) :bind (("C-c c" . org-capture) -- cgit v1.2.3 From ab9b61c1b42f86c28c75537ca14a58a633287b72 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 3 Jul 2020 13:47:14 +0200 Subject: Update package versions --- package-versions.el | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/package-versions.el b/package-versions.el index c3b58b9..d6a3ef5 100644 --- a/package-versions.el +++ b/package-versions.el @@ -1,14 +1,18 @@ (("Try" . "8831ded1784df43a2bd56c25ad3d0650cdb9df1d") + ("alert" . "7046393272686c7a1a9b3e7f7b1d825d2e5250a6") ("auctex" . "6abf890a485b2ff734d8f87f38393f9b8f6bbbf6") ("auth-password-store" . "ff4940c647786914b3cbef69103d96a4ea334111") + ("avy" . "2dde8b71a0feb366c8ee5e2a1400a0d3a0f06424") ("bbdb" . "45529e315ba861f9df2914f9b88d2f7b991d5595") ("biblio.el" . "eb9baf1d2bf6a073d24ccb717025baa693e98f3e") ("cdlatex" . "480387b39f6ddd9cd2a9511ecee064ad8e1dd324") + ("closql" . "9371635bc3e259b73a075985ebbfc58b45fa5e9d") ("dash.el" . "ea4a4cc7cce7c3b93862a22df8bca8b83052ccbf") ("deft" . "fca9ea05ef4fdac825e2ad3921baa7042f6b82c8") ("delight" . "02e73b69708e23053105866a58fe14f75c272dee") ("diff-hl" . "176f931a9bfc6bc6fc5360c6ed7128ff96b21289") ("dired-du" . "d6571317673ba44566ba411d26b7af74e3139ff7") + ("dired-git-info" . "b47f2b0c3a6cb9b7a62a4ee2605a492e512d40a9") ("dired-hacks" . "f49a8bbf95f70671a74a24f7f4de453b2686be46") ("dired-sidebar" . "6e569c851418890c21fd37d03a62f85343aa0900") ("elfeed" . "a2cae98b4f04616c06455b6104d2ca5ff4b86867") @@ -22,8 +26,11 @@ ("emacsql-sqlite3" . "1e411fd38a0137553986db209642fe93cae96060") ("epl" . "78ab7a85c08222cd15582a298a364774e3282ce6") ("f.el" . "1814209e2ff43cf2e6d38c4cd476218915f550fb") + ("forge" . "048efbba83b1df591de0487202ff968250ea4fc5") + ("ghub" . "3da5d8827f6b697ef71dca0a44eb8134689c1dad") ("git-auto-commit-mode" . "dd0c2441de0f5ff8c69c8260d9450d0b607e3e55") - ("git-identity.el" . "8471e6f8ef6c502dc999e513b552d6b23974d40d") + ("git-identity.el" . "eec910b2a5459345321b5b9d166383f1323501f5") + ("gntp.el" . "767571135e2c0985944017dc59b0be79af222ef5") ("gnu-elpa-mirror" . "f07e244acca36061cc03c63463246b848748e804") ("gnuplot" . "f0001c30010b2899e36d7d89046322467e923088") ("gnuplot-mode" . "601f6392986f0cba332c87678d31ae0d0a496ce7") @@ -31,18 +38,22 @@ ("helm-bibtex" . "8a0dd9841316793aacddea744d6b8ca4a7857a35") ("hydra" . "8a9124f80b6919ad5288172b3e9f46c5332763ca") ("ibuffer-vc" . "1249c1e30cf11badfe032ac3b1058f24ba510ace") + ("icomplete-vertical" . "a5871d39c5850ac4d9aac48350eaa1d31f3aaef7") ("key-chord" . "72443e9ff3c4f1c3ccaced3130236801efde3d83") ("language-detection.el" . "54a6ecf55304fba7d215ef38a4ec96daff2f35a4") ("ledger-mode" . "f8463744191b4feb9fea54190917663f7ba26102") ("let-alist" . "ef3c02fa292b6e32769945bbbfb7f2e5ac574b64") - ("magit" . "c9b9afe8b6e92bee763ed1f6843766efaf87094d") + ("log4e" . "7df0c1ff4656f8f993b87064b1567618eadb5546") + ("magit" . "8b45756390e43bfc3247dd85bf5f7738516e569a") ("magit-gitflow" . "cc41b561ec6eea947fe9a176349fb4f771ed865b") ("magit-popup" . "b8e886c4f2242d6c58f84d4549af712e86360db1") + ("markdown-mode" . "399df42755ccf31cecb61c9f5d8ad72bc30d7e4b") + ("matlab-mode" . "e14d97df706049ea2e2d6e5b515fdbd08cd94dd3") ("melpa" . "ee055cc258692a92f727633306adf7df31267479") ("messages-are-flowing" . "d582a564a63b7b90764ffc5c618bc5300225d0ab") - ("nadvice" . "2dfcf614dc5472fb21e48f93d0ebb4546276377f") ("notmuch" . "963e363a234f1c8bdf1ae68956f80a2538bee7dc") - ("org" . "a8cc4f72441acd468f400aeb53549735d698f84c") + ("orderless" . "1f1e0380e2a8cd4fc29b8cc2e00cb01b56d86fbc") + ("org" . "583012b5e129ca79c05109ba68c37f17ffca4930") ("org-bullets" . "767f55feb58b840a5a04eabfc3fbbf0d257c4792") ("org-caldav" . "8569941a0a5a9393ba51afc8923fd7b77b73fa7a") ("org-clock-convenience" . "4e522706a90a504c75d377161005f9543575ea02") @@ -52,6 +63,7 @@ ("org-ref" . "9465abc54a296b4b2f745b4bb3a28ec4dad3a0cb") ("org-reveal" . "84039bb499290926511b04749882ecb5eda45a0c") ("org-roam" . "87403b330ce713a892e3e35ff4174a8e2727e24d") + ("org-time-budgets" . "207dda6308cfc73e16dcfd84237a560c27428beb") ("parsebib" . "3497b6068d78ae15ba1eaf94e4315d18e9ae6b00") ("pass" . "919d8e3826d556433ab67d4ee21a509d209d1baa") ("password-store" . "07b169ec32ad6961ed8625a0b932a663abcb01d2") @@ -62,6 +74,7 @@ ("pkg-info" . "76ba7415480687d05a4353b27fea2ae02b8d9d61") ("popup-el" . "9d104d4bbbcb37bbc9d9ce762e74d41174683f86") ("projectile" . "33bc91e7518fb8cecd89580f16e0ac21799de2c2") + ("rainbow-mode" . "f780ddb18c2a73a666d093f606df92058e5601ea") ("s.el" . "43ba8b563bee3426cead0e6d4ddc09398e1a349d") ("shell-pop-el" . "4b4394037940a890a313d715d203d9ead2d156a6") ("shr-tag-pre-highlight.el" . "6182f43a36b0f82ba6edcf6e423b5f69a46a814e") @@ -72,6 +85,7 @@ ("swiper" . "f8b1ab8c0ec331a4f8f6621f9021811075c71332") ("tablist" . "faab7a035ef2258cc4ea2182f67e3aedab7e2af9") ("transient" . "88d935c7cb9f175871c4cfea7eef2c0514d03b06") + ("treepy.el" . "306f7031d26e4ebfc9ff36614acdc6993f3e23c3") ("use-package" . "d2640fec376a8458a669e7526e63e5870d875118") ("use-package-hydra" . "8cd55a1128fbdf6327bb38a199d206225896d146") ("window-numbering.el" . "10809b3993a97c7b544240bf5d7ce9b1110a1b89") -- cgit v1.2.3 From 070f4284de76c2ac7b8f8011a5e810e2dd014564 Mon Sep 17 00:00:00 2001 From: fpi Date: Tue, 7 Jul 2020 19:41:51 +0200 Subject: Add next weeks agenda view --- emacs-init.org | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/emacs-init.org b/emacs-init.org index e2602f6..67d6abe 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2629,9 +2629,16 @@ Switch projects and subprojects from NEXT back to TODO" (org-agenda-custom-commands `(("d" "Day agenda" ((agenda "" ((org-agenda-span 'day))) - (org-time-budgets-in-agenda-maybe))) - ("w" "Week agenda" + (org-time-budgets-in-agenda-maybe) + (tags-todo "/+INPROGRESS" + ((org-agenda-overriding-header "Active Tasks"))))) + ("w" . "Week agendas") + ("ww" "Standard week agenda" ((agenda "" ((org-agenda-span 'week))))) + ("wn" "Next Week's agenda" + ((agenda "" ((org-agenda-span 'week) + (org-agenda-start-day "mon"))) + (tags-todo "+work"))) ("n" "Agenda and all TODOs" ((todo "INPROGRESS" ((org-agenda-overriding-header "Inprogress Tasks"))) -- cgit v1.2.3 From dc53548cf32dbd963f68e48064593d900df1c64c Mon Sep 17 00:00:00 2001 From: fpi Date: Tue, 7 Jul 2020 19:42:06 +0200 Subject: Enable resetting checkboxes for repeating task --- emacs-init.org | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/emacs-init.org b/emacs-init.org index 67d6abe..cd0b1de 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2711,6 +2711,21 @@ Use imagemagick and standalone class for latex preview. (use-package org-num :delight) #+end_src +*** org-checklist +#+begin_quote +This file provides some functions for handing repeated tasks which involve +checking off a list of items. By setting the RESET_CHECK_BOXES property in an +item, when the TODO state is set to done all checkboxes under that item are +cleared. If the LIST_EXPORT_BASENAME property is set, a file will be created +using the value of that property plus a timestamp, containing all the items +in the list which are not checked. Additionally the user will be prompted to +print the list. +#+end_quote +#+begin_src emacs-lisp +(use-package org-checklist + :after org + :straight (org-plus-contrib)) +#+end_src *** Inline images Resize inline images to 400px but respect width specifications in attribute lines. -- cgit v1.2.3 From 29cb3385a9b60603ce9b040db1fa8ce49f38facb Mon Sep 17 00:00:00 2001 From: fpi Date: Tue, 7 Jul 2020 19:43:35 +0200 Subject: Add gnorb to combine gnus, org & bbdb --- emacs-init.org | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- gnus.org | 31 ++++++++++++++++++++--- 2 files changed, 105 insertions(+), 4 deletions(-) diff --git a/emacs-init.org b/emacs-init.org index cd0b1de..77a5662 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2585,7 +2585,8 @@ Switch projects and subprojects from NEXT back to TODO" :straight t :hook (org-load . org-pdftools-setup-link)) (use-package org-id - :custom (org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)) + :custom (org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id) + <>) (use-package org-clock :custom (org-clock-out-remove-zero-time-clocks t) @@ -2726,6 +2727,78 @@ print the list. :after org :straight (org-plus-contrib)) #+end_src +*** Gnorb +:PROPERTIES: +:ID: 990e2668-11d6-45eb-9c9b-1dc0b89b556d +:END: +This combines [[file:gnus.org][Gnus]] conversations with Org mode for note taking and [[id:390b66e5-b123-4cb1-9a56-61e41d7a818a][BBDB]] for contact information. +#+begin_src emacs-lisp +(use-package gnorb + :straight t + :config + (gnorb-install-defaults) + :custom + <>) +#+end_src +To setup =gnorb= we need to do several things according to [[info:gnorb#Tracking Setup][the manual]]: +1. Activate the gnus registry with ~(gnus-registry-initialize)~ +2. Make sure global id tracking in org-id is enabled + #+begin_src emacs-lisp :noweb-ref org-id-custom :tangle no + (org-id-track-globally t) + #+end_src +3. Add nngnorb to ~gnus-secondary-select-methods~ +4. Call ~(gnorb-tracking-initialize)~. As this requires =gnus= to be loaded, this is called in =gnus.org= +5. Set gnorb saved messages groups + #+begin_src emacs-lisp :tangle no :noweb-ref gnorb-custom + (gnorb-gnus-sent-groups '("nnimap+imsmail:INBOX/work" "nnimap+imsmail:Gesendete ELemente")) + #+end_src +6. Set todo capture template + #+begin_src emacs-lisp :tangle no :noweb-ref gnorb-custom + (gnorb-gnus-new-todo-capture-key "t") + #+end_src + +Default keybindings: +#+begin_example emacs-lisp +(global-set-key (kbd "C-c A") 'gnorb-restore-layout) +(eval-after-load "gnorb-bbdb" + '(progn + (define-key bbdb-mode-map (kbd "C-c S") #'gnorb-bbdb-mail-search) + (define-key bbdb-mode-map (kbd "C-c l") #'gnorb-bbdb-open-link) + (define-key bbdb-mode-map [remap bbdb-mail] #'gnorb-bbdb-mail) + (eval-after-load "gnorb-org" + (org-defkey org-mode-map (kbd "C-c C") #'gnorb-org-contact-link)))) +(eval-after-load "gnorb-org" + '(progn + (org-defkey org-mode-map (kbd "C-c t") #'gnorb-org-handle-mail) + (org-defkey org-mode-map (kbd "C-c v") #'gnorb-org-view) + (org-defkey org-mode-map (kbd "C-c E") #'gnorb-org-email-subtree) + (setq gnorb-org-agenda-popup-bbdb t) + (eval-after-load "org-agenda" + '(progn (org-defkey org-agenda-mode-map (kbd "C-c t") #'gnorb-org-handle-mail) + (org-defkey org-agenda-mode-map (kbd "C-c v") #'gnorb-org-view))))) +(eval-after-load "gnorb-gnus" + '(progn + (define-key gnus-summary-mime-map "a" #'gnorb-gnus-article-org-attach) + (define-key gnus-summary-mode-map (kbd "C-c t") #'gnorb-gnus-incoming-do-todo) + (define-key gnus-summary-mode-map (kbd "C-c v") #'gnorb-gnus-view) + (define-key gnus-summary-mode-map (kbd "C-c C-t") #'gnorb-gnus-tag-message) + (define-key gnus-summary-limit-map (kbd "g") #'gnorb-gnus-insert-tagged-messages) + (define-key gnus-summary-limit-map (kbd "G") #'gnorb-gnus-insert-tracked-messages) + (setq gnorb-gnus-capture-always-attach t) + (push '("attach to org heading" . gnorb-gnus-mime-org-attach) + gnus-mime-action-alist) + (push '(gnorb-gnus-mime-org-attach "a" "Attach to Org heading") + gnus-mime-button-commands) + (setq gnus-mime-button-map + (let ((map (make-sparse-keymap))) + (dolist (c gnus-mime-button-commands) + (define-key map (cadr c) (car c))) + map)))) +(eval-after-load "message" + '(progn + (define-key message-mode-map (kbd "C-c t") #'gnorb-gnus-outgoing-do-todo))) +#+end_example + *** Inline images Resize inline images to 400px but respect width specifications in attribute lines. @@ -4187,6 +4260,9 @@ For now I use this bad code. (footnote-section-tag "")) #+end_src ** BBDB +:PROPERTIES: +:ID: 390b66e5-b123-4cb1-9a56-61e41d7a818a +:END: #+begin_src emacs-lisp (use-package bbdb :straight t) diff --git a/gnus.org b/gnus.org index 84d5a33..d59780f 100644 --- a/gnus.org +++ b/gnus.org @@ -1,4 +1,4 @@ -#+PROPERTY: header-args:emacs-lisp :tangle tangle/gnus.el +#+PROPERTY: header-args:emacs-lisp :tangle tangle/gnus.el :noweb yes #+begin_src shell :results silent :tangle tangle/symlink.sh :shebang "#!/bin/bash" ln -siv $(pwd)/tangle/gnus.el ~/.gnus.el @@ -56,6 +56,7 @@ RSS/Atom Feeds asynchronously. (nnir-search-engine imap) (nnimap-inbox "INBOX"))) (add-to-list 'gnus-secondary-select-methods '(nntp "localhost" 4321)) +<> #+end_src ** Options *** General @@ -193,6 +194,30 @@ Slow scoring decay prevents huge scores from building up. Only run on =.ADAPT= s gnus-score-decay-constant 1 gnus-score-decay-scale 0.01) #+end_src +**** Registry +Use the [[info:gnus#The Gnus Registry][Gnus Registry]]. This is required to use [[id:990e2668-11d6-45eb-9c9b-1dc0b89b556d][Gnorb]]. +#+begin_src emacs-lisp +(gnus-registry-initialize) +#+end_src +#+begin_src emacs-lisp :tangle no :noweb-ref secondary-select-methods +(add-to-list 'gnus-secondary-select-methods '(nngnorb "Gnorb server")) +#+end_src +Enable gnorb tracking +#+begin_src emacs-lisp +(gnorb-tracking-initialize) +#+end_src +Hint for existing relevant tracked conversations in the summary buffer (see [[info:gnorb#Hinting in Gnus][info:gnorb#Hinting in Gnus]]). Already tracked messages are marked with =&= and new maybe relevant messages with =¡=. +#+begin_src fundamental :tangle no :noweb-ref gnorb-summary-line-format +%ug +#+end_src +Display [[info:gnorb#Tagging Messages and Contacts][message tags]] in the summary line. Stop other summary line content at column 120 and insert the tags after. +#+begin_src fundamental :tangle no :noweb-ref gnorb-summary-tags +%-120=%uG +#+end_src +Also automatically set message tags +#+begin_src emacs-lisp +(setq gnorb-gnus-auto-tag-messages t) +#+end_src *** Display Sort by newest first #+begin_src emacs-lisp @@ -220,8 +245,8 @@ Also try to connect threads by guessing which articles are missing Better thread display (from [[https://www.emacswiki.org/emacs/GnusFormatting][emacswiki/GnusFormatting)]]. #+begin_src emacs-lisp (setq - gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %B%s%)\n" - gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M")) + gnus-summary-line-format "%U%R%z<> %(%&user-date; %-15,15f %B%s%) <>\n" + gnus-user-date-format-alist '((t . "%y-%m-%d %H:%M")) gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references gnus-sum-thread-tree-false-root "" gnus-sum-thread-tree-indent " " -- cgit v1.2.3 From 99f445575ec26b13b1803a2bc24c3b2e8a445866 Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 8 Jul 2020 16:25:10 +0200 Subject: Fix gnorb in summary-line-format --- gnus.org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnus.org b/gnus.org index d59780f..71f7041 100644 --- a/gnus.org +++ b/gnus.org @@ -244,8 +244,10 @@ Also try to connect threads by guessing which articles are missing #+end_src Better thread display (from [[https://www.emacswiki.org/emacs/GnusFormatting][emacswiki/GnusFormatting)]]. #+begin_src emacs-lisp -(setq - gnus-summary-line-format "%U%R%z<> %(%&user-date; %-15,15f %B%s%) <>\n" +(setq gnus-summary-line-format (concat "%U%R%z" + "<>" + " %(%&user-date; %-15,15f %B%s%) " + "<>" "\n") gnus-user-date-format-alist '((t . "%y-%m-%d %H:%M")) gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references gnus-sum-thread-tree-false-root "" -- cgit v1.2.3