X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/568f899369d2b24f9f43675937cf44c1c58a3e91..64b53575544eaed58507c52bb3034e695e2495d3:/.emacs.d/init.el diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 5e3ce80..2b84887 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -266,9 +266,21 @@ (previous-line) (insert "\n \n;;; ")) +(defvar b/fill-column 47 + "My custom `fill-column'.") + +(defconst b/asterism "* * *") + (defun b/insert-asterism () + "Insert a centred asterism." (interactive) - (insert "\n\n * * *\n\n")) + (insert + (concat + "\n\n" + (make-string (floor (/ (- b/fill-column (length b/asterism)) 2)) + ?\s) + b/asterism + "\n\n"))) (defun b/no-mouse-autoselect-window () "Conveniently disable `focus-follows-mouse'. @@ -1314,7 +1326,8 @@ This function is intended for use with `ivy-ignore-buffers'." (use-feature text-mode :bind (:map text-mode-map ("C-*" . b/insert-asterism)) - :hook (text-mode . indicate-buffer-boundaries-left)) + :hook ((text-mode . indicate-buffer-boundaries-left) + (text-mode . flyspell-mode))) (use-feature conf-mode :mode "\\.*rc$") @@ -1676,10 +1689,10 @@ This function is intended for use with `ivy-ignore-buffers'." ;; prefixes for global prefixes and minor modes "C-c @" "outline" "C-c !" "flycheck" - "C-c 8" "typo" - "C-c 8 -" "typo/dashes" - "C-c 8 <" "typo/left-brackets" - "C-c 8 >" "typo/right-brackets" + ;; "C-c 8" "typo" + ;; "C-c 8 -" "typo/dashes" + ;; "C-c 8 <" "typo/left-brackets" + ;; "C-c 8 >" "typo/right-brackets" "C-x RET" "coding system" "C-x 8" "unicode" "C-x @" "event modifiers" @@ -1737,7 +1750,7 @@ This function is intended for use with `ivy-ignore-buffers'." (use-package crux ; results in Waiting for git... [2 times] :defer 0.4 :bind (("C-c d" . crux-duplicate-current-line-or-region) - ("C-c D" . crux-duplicate-and-comment-current-line-or-region) + ("C-c M-d" . crux-duplicate-and-comment-current-line-or-region) ("C-c f C" . crux-copy-file-preserve-attributes) ("C-c f D" . crux-delete-file-and-buffer) ("C-c f R" . crux-rename-file-and-buffer) @@ -1834,12 +1847,19 @@ This function is intended for use with `ivy-ignore-buffers'." ;; easily type pretty quotes & other typography, like ‘’“”-–—«»‹› (use-package typo + :disabled :defer 0.5 :config (typo-global-mode 1) :hook (((text-mode erc-mode web-mode) . typo-mode) (tex-mode . (lambda ()(typo-mode -1))))) +(use-feature electric + :disabled + :demand + :config + (electric-quote-mode)) + ;; highlight TODOs in buffers (use-package hl-todo :defer 0.5 @@ -1968,7 +1988,24 @@ This function is intended for use with `ivy-ignore-buffers'." :straight (debbugs :host github :repo "emacs-straight/debbugs" - :files (:defaults "Debbugs.wsdl"))) + :files (:defaults "Debbugs.wsdl")) + :bind + (("C-c D d" . debbugs-gnu) + ("C-c D e" . + (lambda () + (interactive) + (setq debbugs-gnu-current-suppress t) + (debbugs-gnu debbugs-gnu-default-severities '("emacs")))) + ("C-c D g" . + (lambda () + (interactive) + (setq debbugs-gnu-current-suppress t) + (debbugs-gnu debbugs-gnu-default-severities '("gnuzilla")))) + ("C-c D G" . + (lambda () + (interactive) + (setq debbugs-gnu-current-suppress t) + (debbugs-gnu debbugs-gnu-default-severities '("guix")))))) (use-package org-ref :init @@ -2116,6 +2153,12 @@ This function is intended for use with `ivy-ignore-buffers'." :custom (debpaste-paste-is-hidden t)) +(use-package scpaste + :disabled + :config + (setq scpaste-http-destination "https://p.bndl.org" + scpaste-scp-destination "nix:/var/www/p.bndl.org")) + ;;; Email (with Gnus) @@ -2330,7 +2373,7 @@ This function is intended for use with `ivy-ignore-buffers'." (to-list . "webmasters@gnu.org")) ("gnu.*" (gcc-self . t)) - ("gnu\\." + ("l\\." (subscribed . t)) ("nnimap\\+uw:.*" (gcc-self . t))) @@ -2552,8 +2595,8 @@ https://csclub.uwaterloo.ca/~abandali") :hook (;; (message-setup . mml-secure-message-sign-pgpmime) (message-mode . flyspell-mode) (message-mode . (lambda () - ;; (setq fill-column 65 - ;; message-fill-column 65) + (setq-local fill-column b/fill-column + message-fill-column b/fill-column) (make-local-variable 'company-idle-delay) (setq company-idle-delay 0.2)))) ;; :custom-face @@ -2589,6 +2632,7 @@ https://csclub.uwaterloo.ca/~abandali") ("s" . footnote-set-style))) (use-package bbdb + :disabled :demand :after gnus :bind (:map gnus-group-mode-map ("e" . bbdb)) @@ -2598,49 +2642,47 @@ https://csclub.uwaterloo.ca/~abandali") (bbdb-complete-mail-allow-cycling t) (bbdb-user-mail-address-re message-dont-reply-to-names)) -(comment - (use-package ebdb - :demand - :after gnus - :bind (:map gnus-group-mode-map ("e" . ebdb)) - :config - (setq ebdb-sources (b/var "ebdb")) - (with-eval-after-load 'swiper - (add-to-list 'swiper-font-lock-exclude 'ebdb-mode t))) +(use-package ebdb + :demand + :after gnus + :bind (:map gnus-group-mode-map ("e" . ebdb)) + :config + (setq ebdb-sources (b/var "ebdb")) + (with-eval-after-load 'swiper + (add-to-list 'swiper-font-lock-exclude 'ebdb-mode t))) - (use-feature ebdb-com - :after ebdb) +(use-feature ebdb-com + :after ebdb) - (use-feature ebdb-complete - :after ebdb - :config - ;; (setq ebdb-complete-mail 'capf) - (ebdb-complete-enable)) +(use-feature ebdb-complete + :after ebdb + :config + ;; (setq ebdb-complete-mail 'capf) + (ebdb-complete-enable)) - (use-feature ebdb-message - :demand - :after ebdb) +(use-feature ebdb-message + :demand + :after ebdb) - ;; (use-package company-ebdb - ;; :config - ;; (defun company-ebdb--post-complete (_) nil)) +;; (use-package company-ebdb +;; :config +;; (defun company-ebdb--post-complete (_) nil)) - (use-feature ebdb-gnus - :after ebdb - :custom - (ebdb-gnus-window-size 0.3)) +(use-feature ebdb-gnus + :after ebdb + :custom + (ebdb-gnus-window-size 0.3)) - (use-feature ebdb-mua - :demand - :after ebdb - :custom (ebdb-mua-pop-up t)) +(use-feature ebdb-mua + :demand + :after ebdb + :custom (ebdb-mua-pop-up t)) - ;; (use-package ebdb-message - ;; :after ebdb) +;; (use-package ebdb-message +;; :after ebdb) - ;; (use-package ebdb-vcard - ;; :after ebdb) - ) +;; (use-package ebdb-vcard +;; :after ebdb) (use-package message-x)