From 3b1cde98977eadabc1ad8854aa87856284f03d40 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Wed, 16 Oct 2024 22:46:20 +0200 Subject: . --- emacs | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/emacs b/emacs index bb2aadb..ecefdca 100644 --- a/emacs +++ b/emacs @@ -257,8 +257,8 @@ (use-package exwm-mff :demand t :load-path "elisp" - :init - (exwm-mff-mode)) + :hook + ((server-after-make-frame . exwm-mff-mode))) (use-package avy :ensure t @@ -402,7 +402,8 @@ (ido-mode t)) (use-package org-link-minor-mode - :ensure nil) + :load-path "elisp" + :defer t) (use-package calendar :defer t @@ -410,8 +411,8 @@ (add-to-list 'auto-mode-alist '("~/personal-db/log" . diary-mode)) :hook ((diary-mode . variable-pitch-mode) - (diary-mode . org-link-minor-mode) - (diary-fancy-display-mode . org-link-minor-mode) +; (diary-mode . org-link-minor-mode) +; (diary-fancy-display-mode . org-link-minor-mode) (diary-fancy-display-mode . variable-pitch-mode) (diary-mode . (lambda () (add-hook 'after-save-hook 'sync-org nil t))) @@ -427,8 +428,9 @@ (use-package nix-mode :ensure t :hook - ((before-save . nix-format-buffer) - (nix-mode . nix-prettify-mode))) + ((nix-mode . (lambda () + (add-hook 'before-save-hook #'nix-format-buffer nil t)))) + (nix-mode . nix-prettify-mode)) (use-package eglot :config @@ -442,7 +444,10 @@ (use-package go-mode :ensure t - :hook ((before-save . eglot-format-buffer))) + :hook + ((go-mode . (lambda () + (add-hook + 'before-save-hook 'eglot-format-buffer nil t))))) (use-package rec-mode :ensure nil @@ -509,7 +514,7 @@ org-log-done 'time org-capture-templates '(("t" "Todo" - entry (file+headline "~/personal-db/notes/todo.org" "Todo") + entry (file "~/personal-db/notes/todo.org") "* TODO %?\n%i\n%a\n " :empty-lines 0) ("l" "Log" plain (file "~/personal-db/log") @@ -531,6 +536,9 @@ (global-set-key (kbd "C-c s") #'project-find-regexp) (global-set-key (kbd "C-c C-o") #'org-open-at-point-global) (global-set-key (kbd "C-c C-s") #'sync-org) + ;; Something errors out with capture logs and non-org files + (add-to-list 'warning-suppress-log-types '(org-element)) + (add-to-list 'warning-suppress-types '(org-element)) :hook ((org-mode . auto-save-visited-mode) (org-mode . org-indent-mode) @@ -546,7 +554,8 @@ (use-package magit :ensure t) -(use-package magit-extras) +(use-package magit-extras + :ensure nil) (use-package yasnippet :diminish t @@ -572,15 +581,19 @@ ((string-match "marc@mccd.space" from) "home")))) (setq message-sendmail-extra-arguments (list '"-a" account)))))) -(add-hook 'message-send-mail-hook 'marc/set-msmtp-account) -(add-hook 'message-mode-hook 'flyspell-mode) +(use-package message + :defer t + :hook + ((message-send-mail . marc/set-msmtp-account) + (message-mode-hook flyspell-mode))) + (use-package flyspell - :bind (:map flyspell-mode-map - ("C-." . repeat))) + :defer t) (use-package mu4e :ensure nil + :load-path "/usr/share/emacs/site-lisp/mu4e/" :config @@ -787,7 +800,7 @@ '((:name "Last 7 days" :query "date:7d..now" :hide-unread t :key 119) (:name "Messages with images" :query "mime:image/*" :key 112))) '(org-agenda-files - '("/home/mccd/personal-db/notes/ethics-and-software.org" "/home/mccd/personal-db/notes/reminders.org" "/home/mccd/builds/sustainably/piva.org" "/home/mccd/personal-db/notes/programming.org" "/home/mccd/personal-db/notes/unix.org" "/home/mccd/personal-db/notes/sustainable-software.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/personal-db/notes/emacs-teaches.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/notes/inbox.org" "/home/mccd/personal-db/notes/todo.org")) + '("~/personal-db/notes/calendar-beorg.org" "/home/mccd/personal-db/notes/ethics-and-software.org" "/home/mccd/personal-db/notes/reminders.org" "/home/mccd/builds/sustainably/piva.org" "/home/mccd/personal-db/notes/programming.org" "/home/mccd/personal-db/notes/unix.org" "/home/mccd/personal-db/notes/sustainable-software.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/personal-db/notes/emacs-teaches.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/notes/inbox.org" "/home/mccd/personal-db/notes/todo.org")) '(org-fold-core-style 'overlays) '(package-selected-packages '(exwm-mff eat pinentry exwm emms company orglink web-mode flycheck nix-mode nix-ts-mode avy pdf-tools elfeed-protocol lem yasnippet-snippets elfeed yasnippet smartparens markdown-mode mastodon tldr almost-mono-themes rec-mode magit go-mode expand-region devdocs)) -- cgit v1.2.3