-(use-package boxquote
- :defer 0.6
- :bind
- (:prefix-map a/boxquote-prefix-map
- :prefix "C-c q"
- ("b" . boxquote-buffer)
- ("B" . boxquote-insert-buffer)
- ("d" . boxquote-defun)
- ("F" . boxquote-insert-file)
- ("hf" . boxquote-describe-function)
- ("hk" . boxquote-describe-key)
- ("hv" . boxquote-describe-variable)
- ("hw" . boxquote-where-is)
- ("k" . boxquote-kill)
- ("p" . boxquote-paragraph)
- ("q" . boxquote-boxquote)
- ("r" . boxquote-region)
- ("s" . boxquote-shell-command)
- ("t" . boxquote-text)
- ("T" . boxquote-title)
- ("u" . boxquote-unbox)
- ("U" . boxquote-unbox-region)
- ("y" . boxquote-yank)
- ("M-q" . boxquote-fill-paragraph)
- ("M-w" . boxquote-kill-ring-save)))
-
-(use-package orgalist
- ;; http://lists.gnu.org/archive/html/emacs-orgmode/2019-04/msg00007.html
- :disabled t
- :after message
- :hook (message-mode . orgalist-mode))
-
-;; easily type pretty quotes & other typography, like ‘’“”-–—«»‹›
-(use-package typo
- :defer 0.5
- :config
- (typo-global-mode 1)
- :hook (text-mode . typo-mode))
-
-;; highlight TODOs in buffers
-(use-package hl-todo
- :defer 0.5
- :config
- (global-hl-todo-mode))
-
-(use-package shrink-path
- :defer 0.5
- :after eshell
- :config
- (defvar user-@-host (concat (user-login-name) "@" (system-name) " "))
- (defun +eshell/prompt ()
- (let ((base/dir (shrink-path-prompt default-directory)))
- (concat (propertize user-@-host 'face 'default)
- (propertize (car base/dir)
- 'face 'font-lock-comment-face)
- (propertize (cdr base/dir)
- 'face 'font-lock-constant-face)
- (propertize "> " 'face 'default))))
- (setq eshell-prompt-regexp (concat user-@-host ".*> ")
- eshell-prompt-function #'+eshell/prompt))
-
-(use-package eshell-up
- :after eshell
- :commands eshell-up)
-
-(use-package multi-term
- :defer 0.6
- :bind (("C-c a s m m" . multi-term)
- ("C-c a s m d" . multi-term-dedicated-toggle)
- ("C-c a s m p" . multi-term-prev)
- ("C-c a s m n" . multi-term-next)
- :map term-mode-map
- ("C-c C-j" . term-char-mode))
- :config
- (setq multi-term-program "screen"
- multi-term-program-switches (concat "-c"
- (getenv "XDG_CONFIG_HOME")
- "/screen/screenrc")
- ;; TODO: add separate bindings for connecting to existing
- ;; session vs. always creating a new one
- multi-term-dedicated-select-after-open-p t
- multi-term-dedicated-window-height 20
- multi-term-dedicated-max-window-height 30
- term-bind-key-alist
- '(("C-c C-c" . term-interrupt-subjob)
- ("C-c C-e" . term-send-esc)
- ("C-c C-j" . term-line-mode)
- ("C-k" . kill-line)
- ;; ("C-y" . term-paste)
- ("C-y" . term-send-raw)
- ("M-f" . term-send-forward-word)
- ("M-b" . term-send-backward-word)
- ("M-p" . term-send-up)
- ("M-n" . term-send-down)
- ("M-j" . term-send-raw-meta)
- ("M-y" . term-send-raw-meta)
- ("M-/" . term-send-raw-meta)
- ("M-0" . term-send-raw-meta)
- ("M-1" . term-send-raw-meta)
- ("M-2" . term-send-raw-meta)
- ("M-3" . term-send-raw-meta)
- ("M-4" . term-send-raw-meta)
- ("M-5" . term-send-raw-meta)
- ("M-6" . term-send-raw-meta)
- ("M-7" . term-send-raw-meta)
- ("M-8" . term-send-raw-meta)
- ("M-9" . term-send-raw-meta)
- ("<C-backspace>" . term-send-backward-kill-word)
- ("<M-DEL>" . term-send-backward-kill-word)
- ("M-d" . term-send-delete-word)
- ("M-," . term-send-raw)
- ("M-." . comint-dynamic-complete))
- term-unbind-key-alist
- '("C-z" "C-x" "C-c" "C-h"
- ;; "C-y"
- "<ESC>")))
-
-(use-package page-break-lines
- :defer 0.5
- :config
- (global-page-break-lines-mode))
-
-(use-package expand-region
- :bind ("C-=" . er/expand-region))
-
-(use-package multiple-cursors
- :bind
- (("C-S-<mouse-1>" . mc/add-cursor-on-click)
- (:prefix-map a/mc-prefix-map
- :prefix "C-c m"
- ("c" . mc/edit-lines)
- ("n" . mc/mark-next-like-this)
- ("p" . mc/mark-previous-like-this)
- ("a" . mc/mark-all-like-this))))
-
-(use-package forge
- :after magit
- :demand)
-
-(use-package yasnippet
- :defer 0.6
- :config
- (defconst yas-verbosity-cur yas-verbosity)
- (setq yas-verbosity 2)
- (add-to-list 'yas-snippet-dirs "~/src/git/guix/etc/snippets")
- (yas-reload-all)
- (setq yas-verbosity yas-verbosity-cur)
- :hook
- (text-mode . yas-minor-mode))
-
-(use-package debbugs
- :straight (debbugs
- :host github
- :repo "emacs-straight/debbugs"
- :files (:defaults "Debbugs.wsdl")))
-
-(use-package org-ref
- :init
- (a/setq-every '("~/usr/org/references.bib")
- reftex-default-bibliography
- org-ref-default-bibliography)
- (setq
- org-ref-bibliography-notes "~/usr/org/notes.org"
- org-ref-pdf-directory "~/usr/org/bibtex-pdfs/"))
-
-(use-package alert
- :commands (alert)
- :init (setq alert-default-style 'notifications))
-
-(use-package ivy-xref
- :init
- (setq xref-show-xrefs-function #'ivy-xref-show-xrefs))
-
-\f
-;;; Email (with Gnus)
-
-(defvar a/maildir (expand-file-name "~/mail/"))
-(with-eval-after-load 'recentf
- (add-to-list 'recentf-exclude a/maildir))
-
-(setq
- a/gnus-init-file (no-littering-expand-etc-file-name "gnus")
- mail-user-agent 'gnus-user-agent
- read-mail-command 'gnus)
-
-(use-feature gnus
- :bind (("s-m" . gnus)
- ("s-M" . gnus-unplugged))
- :init
- (setq
- gnus-select-method '(nnnil "")
- gnus-secondary-select-methods
- '((nnimap "amin"
- (nnimap-stream plain)
- (nnimap-address "127.0.0.1")
- (nnimap-server-port 143)
- (nnimap-authenticator plain)
- (nnimap-user "amin@bndl.local"))
- (nnimap "uw"
- (nnimap-stream plain)
- (nnimap-address "127.0.0.1")
- (nnimap-server-port 143)
- (nnimap-authenticator plain)
- (nnimap-user "abandali@uw.local"))
- (nnimap "csc"
- (nnimap-stream plain)
- (nnimap-address "127.0.0.1")
- (nnimap-server-port 143)
- (nnimap-authenticator plain)
- (nnimap-user "abandali@csc.uw.local")))
- gnus-message-archive-group "nnimap+amin:Sent"
- gnus-parameters
- '(("gnu\\.deepspec"
- (to-address . "deepspec@lists.cs.princeton.edu")
- (to-list . "deepspec@lists.cs.princeton.edu")
- (list-identifier . "\\[deepspec\\]"))
- ("gnu\\.emacs-devel"
- (to-address . "emacs-devel@gnu.org")
- (to-list . "emacs-devel@gnu.org"))
- ("gnu\\.emacs-orgmode"
- (to-address . "emacs-orgmode@gnu.org")
- (to-list . "emacs-orgmode@gnu.org")
- (list-identifier . "\\[O\\]"))
- ("gnu\\.emacsconf-discuss"
- (to-address . "emacsconf-discuss@gnu.org")
- (to-list . "emacsconf-discuss@gnu.org"))
- ("gnu\\.fencepost-users"
- (to-address . "fencepost-users@gnu.org")
- (to-list . "fencepost-users@gnu.org")
- (list-identifier . "\\[Fencepost-users\\]"))
- ("gnu\\.gnunet-developers"
- (to-address . "gnunet-developers@gnu.org")
- (to-list . "gnunet-developers@gnu.org")
- (list-identifier . "\\[GNUnet-developers\\]"))
- ("gnu\\.guile-devel"
- (to-address . "guile-devel@gnu.org")
- (to-list . "guile-devel@gnu.org"))
- ("gnu\\.guix-devel"
- (to-address . "guix-devel@gnu.org")
- (to-list . "guix-devel@gnu.org"))
- ("gnu\\.haskell-art"
- (to-address . "haskell-art@we.lurk.org")
- (to-list . "haskell-art@we.lurk.org")
- (list-identifier . "\\[haskell-art\\]"))
- ("gnu\\.haskell-cafe"
- (to-address . "haskell-cafe@haskell.org")
- (to-list . "haskell-cafe@haskell.org")
- (list-identifier . "\\[Haskell-cafe\\]"))
- ("gnu\\.help-gnu-emacs"
- (to-address . "help-gnu-emacs@gnu.org")
- (to-list . "help-gnu-emacs@gnu.org"))
- ("gnu\\.info-gnu-emacs"
- (to-address . "info-gnu-emacs@gnu.org")
- (to-list . "info-gnu-emacs@gnu.org"))
- ("gnu\\.info-guix"
- (to-address . "info-guix@gnu.org")
- (to-list . "info-guix@gnu.org"))
- ("gnu\\.notmuch"
- (to-address . "notmuch@notmuchmail.org")
- (to-list . "notmuch@notmuchmail.org"))
- ("gnu\\.parabola-dev"
- (to-address . "dev@lists.parabola.nu")
- (to-list . "dev@lists.parabola.nu")
- (list-identifier . "\\[Dev\\]"))
- ("gnu\\.webmasters"
- (to-address . "webmasters@gnu.org")
- (to-list . "webmasters@gnu.org"))
- ("gnu\\.www-commits"
- (to-address . "www-commits@gnu.org")
- (to-list . "www-commits@gnu.org"))
- ("gnu\\.www-discuss"
- (to-address . "www-discuss@gnu.org")
- (to-list . "www-discuss@gnu.org"))
- ("gnu\\.~bandali\\.public-inbox"
- (to-address . "~bandali/public-inbox@lists.sr.ht")
- (to-list . "~bandali/public-inbox@lists.sr.ht"))
- ("gnu\\.~sircmpwn\\.srht-admins"
- (to-address . "~sircmpwn/sr.ht-admins@lists.sr.ht")
- (to-list . "~sircmpwn/sr.ht-admins@lists.sr.ht"))
- ("gnu\\.~sircmpwn\\.srht-announce"
- (to-address . "~sircmpwn/sr.ht-announce@lists.sr.ht")
- (to-list . "~sircmpwn/sr.ht-announce@lists.sr.ht"))
- ("gnu\\.~sircmpwn\\.srht-dev"
- (to-address . "~sircmpwn/sr.ht-dev@lists.sr.ht")
- (to-list . "~sircmpwn/sr.ht-dev@lists.sr.ht"))
- ("gnu\\.~sircmpwn\\.srht-discuss"
- (to-address . "~sircmpwn/sr.ht-discuss@lists.sr.ht")
- (to-list . "~sircmpwn/sr.ht-discuss@lists.sr.ht"))
- ("gnu.*"
- (gcc-self . t))
- ("gnu\\."
- (subscribed . t))
- ("nnimap\\+uw:.*"
- (gcc-self . t)))
- gnus-large-newsgroup 50
- gnus-home-directory (no-littering-expand-var-file-name "gnus/")
- gnus-directory (concat gnus-home-directory "news/")
- message-directory (concat gnus-home-directory "mail/")
- nndraft-directory (concat gnus-home-directory "drafts/")
- gnus-save-newsrc-file nil
- gnus-read-newsrc-file nil
- gnus-interactive-exit nil
- gnus-gcc-mark-as-read t)
- :config
- (require 'ebdb)
- (require 'ebdb-mua)
- (require 'ebdb-gnus)
-
- (with-eval-after-load 'recentf
- (add-to-list 'recentf-exclude gnus-home-directory)))
-
-(use-feature gnus-art
- :config
+(run-with-idle-timer 0.6 nil #'require 'boxquote)
+(with-eval-after-load 'boxquote
+ (defvar b/boxquote-prefix-map)
+ (define-prefix-command 'b/boxquote-prefix-map)
+ (global-set-key (kbd "C-c q") 'b/boxquote-prefix-map)
+ (define-key b/boxquote-prefix-map (kbd "b") #'boxquote-buffer)
+ (define-key b/boxquote-prefix-map (kbd "B") #'boxquote-insert-buffer)
+ (define-key b/boxquote-prefix-map (kbd "d") #'boxquote-defun)
+ (define-key b/boxquote-prefix-map (kbd "F") #'boxquote-insert-file)
+ (define-key b/boxquote-prefix-map (kbd "hf") #'boxquote-describe-function)
+ (define-key b/boxquote-prefix-map (kbd "hk") #'boxquote-describe-key)
+ (define-key b/boxquote-prefix-map (kbd "hv") #'boxquote-describe-variable)
+ (define-key b/boxquote-prefix-map (kbd "hw") #'boxquote-where-is)
+ (define-key b/boxquote-prefix-map (kbd "k") #'boxquote-kill)
+ (define-key b/boxquote-prefix-map (kbd "p") #'boxquote-paragraph)
+ (define-key b/boxquote-prefix-map (kbd "q") #'boxquote-boxquote)
+ (define-key b/boxquote-prefix-map (kbd "r") #'boxquote-region)
+ (define-key b/boxquote-prefix-map (kbd "s") #'boxquote-shell-command)
+ (define-key b/boxquote-prefix-map (kbd "t") #'boxquote-text)
+ (define-key b/boxquote-prefix-map (kbd "T") #'boxquote-title)
+ (define-key b/boxquote-prefix-map (kbd "u") #'boxquote-unbox)
+ (define-key b/boxquote-prefix-map (kbd "U") #'boxquote-unbox-region)
+ (define-key b/boxquote-prefix-map (kbd "y") #'boxquote-yank)
+ (define-key b/boxquote-prefix-map (kbd "M-q") #'boxquote-fill-paragraph)
+ (define-key b/boxquote-prefix-map (kbd "M-w") #'boxquote-kill-ring-save))
+
+;; `debbugs'
+(global-set-key (kbd "C-c D d") #'debbugs-gnu)
+(global-set-key (kbd "C-c D b") #'debbugs-gnu-bugs)
+(global-set-key (kbd "C-c D e") ; bug-gnu-emacs
+ (lambda ()
+ (interactive)
+ (setq debbugs-gnu-current-suppress t)
+ (debbugs-gnu debbugs-gnu-default-severities
+ '("emacs"))))
+(global-set-key (kbd "C-c D g") ; bug-gnuzilla
+ (lambda ()
+ (interactive)
+ (setq debbugs-gnu-current-suppress t)
+ (debbugs-gnu debbugs-gnu-default-severities
+ '("gnuzilla"))))
+
+(with-eval-after-load 'url
+ (setq url-configuration-directory (b/var "url/configuration/")))
+
+(with-eval-after-load 'url-cache
+ (setq url-cache-directory (b/var "url/cache/")))
+
+(with-eval-after-load 'eww