-(use-package boxquote
- :defer 0.6
- :bind
- (:prefix-map b/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
- :delight " typo"
- :config
- (typo-global-mode 1)
- :hook (((text-mode erc-mode) . typo-mode)
- (tex-mode . (lambda ()(typo-mode -1)))))
-
-;; 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
- :delight " pgln"
- :custom
- (page-break-lines-max-width fill-column)
- :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 b/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)))
- :config
- (setq mc/list-file (b/var "mc-list.el")))
-
-(comment
- ;; TODO
- (use-package forge
- :after magit
- :demand))
-
-(use-package yasnippet
- :defer 0.6
- :config
- (defconst yas-verbosity-cur yas-verbosity)
- (setq yas-verbosity 2)
- (setq yas-snippet-dirs (list (b/etc "yasnippet/snippets/")))
- (add-to-list 'yas-snippet-dirs "~/src/git/guix/etc/snippets" t)
- (yas-reload-all)
- (setq yas-verbosity yas-verbosity-cur)
-
- (defun b/yas--maybe-expand-key-filter (cmd)
- (when (and (yas--maybe-expand-key-filter cmd)
- (not (bound-and-true-p git-commit-mode)))
- cmd))
- (defconst b/yas-maybe-expand
- '(menu-item "" yas-expand :filter b/yas--maybe-expand-key-filter))
- (define-key yas-minor-mode-map
- (kbd "SPC") b/yas-maybe-expand)
-
- (yas-global-mode))
-
-(use-package debbugs)
-
-(use-package org-ref
- :init
- (b/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 fill-column-indicator)
-
-(use-package emojify
- :config
- (make-directory (b/var "emojify/") t)
- (setq emojify-emojis-dir (b/var "emojify/"))
- :hook (erc-mode . emojify-mode))
-
-(use-package window
- :bind
- (("C-c w <right>" . split-window-right)
- ("C-c w <down>" . split-window-below)
- ("C-c w s l" . split-window-right)
- ("C-c w s j" . split-window-below)
- ("C-c w q" . quit-window))
- :custom
- (split-width-threshold 150))
-
-(use-package windmove
- :defer 0.6
- :bind
- (("C-c w h" . windmove-left)
- ("C-c w j" . windmove-down)
- ("C-c w k" . windmove-up)
- ("C-c w l" . windmove-right)
- ("C-c w H" . windmove-swap-states-left)
- ("C-c w J" . windmove-swap-states-down)
- ("C-c w K" . windmove-swap-states-up)
- ("C-c w L" . windmove-swap-states-right)))
-
-(use-package pass
- :commands pass
- :bind ("C-c a p" . pass)
- :hook (pass-mode . View-exit))
-
-(use-package pdf-tools
- :defer 0.5
- :bind (:map pdf-view-mode-map
- ("<XF86Back>" . pdf-history-backward)
- ("<XF86Forward>" . pdf-history-forward)
- ("M-RET" . image-previous-line))
- :config (pdf-tools-install nil t)
- :custom (pdf-view-resize-factor 1.05))
-
-(use-package biblio)
-
-(use-package reftex
- :hook (latex-mode . reftex-mode))
-
-(use-package reftex-cite
- :after reftex
- :disabled ; enable to disable
- ; reftex-cite's default choice
- ; of previous word
- :config
- (defun reftex-get-bibkey-default ()
- "If the cursor is in a citation macro, return the word before the macro."
- (let* ((macro (reftex-what-macro 1)))
- (save-excursion
- (when (and macro (string-match "cite" (car macro)))
- (goto-char (cdr macro)))
- (reftex-this-word)))))
-
-\f
-;;; Email (with Gnus)
-
-(defvar b/maildir (expand-file-name "~/mail/"))
-(with-eval-after-load 'recentf
- (add-to-list 'recentf-exclude b/maildir))
-
-(setq
- b/gnus-init-file (b/etc "gnus")
- mail-user-agent 'gnus-user-agent
- read-mail-command 'gnus)
-
-(use-package gnus
- :bind (("s-m" . gnus)
- ("s-M" . gnus-unplugged)
- ("C-c a m" . gnus)
- ("C-c a M" . gnus-unplugged))
- :init
- (setq
- gnus-select-method '(nnnil "")
- gnus-secondary-select-methods
- '((nnimap "shemshak"
- (nnimap-stream plain)
- (nnimap-address "127.0.0.1")
- (nnimap-server-port 143)
- (nnimap-authenticator plain)
- (nnimap-user "amin@shemshak.local"))
- (nnimap "gnu"
- (nnimap-stream plain)
- (nnimap-address "127.0.0.1")
- (nnimap-server-port 143)
- (nnimap-authenticator plain)
- (nnimap-user "bandali@gnu.local")
- (nnimap-inbox "INBOX")
- (nnimap-split-methods 'nnimap-split-fancy)
- (nnimap-split-fancy (|
- ;; (: gnus-registry-split-fancy-with-parent)
- ;; (: gnus-group-split-fancy "INBOX" t "INBOX")
- ;; gnu
- (list ".*<\\(.*\\)\\.\\(non\\)?gnu\\.org>.*" "l.\\1")
- ;; *@lists.sr.ht, omitting one dot if present
- ;; add more \\.?\\([^.@]*\\) if needed
- (list ".*<~\\(.*\\)/\\([^.@]*\\)\\.?\\([^.@]*\\)@lists.sr.ht>.*" "l.~\\1.\\2\\3")
- ;; webmasters
- (from "webmasters\\(-comment\\)?@gnu\\.org" "webmasters")
- ;; other
- (list ".*atreus.freelists.org" "l.atreus")
- (list ".*deepspec.lists.cs.princeton.edu" "l.deepspec")
- ;; (list ".*haskell-art.we.lurk.org" "l.haskell.art") ;d
- (list ".*haskell-cafe.haskell.org" "l.haskell-cafe")
- ;; (list ".*notmuch.notmuchmail.org" "l.notmuch") ;u
- ;; (list ".*dev.lists.parabola.nu" "l.parabola-dev") ;u
- ;; ----------------------------------
- ;; legend: (u)nsubscribed | (d)ead
- ;; ----------------------------------
- ;; otherwise, leave mail in INBOX
- "INBOX")))
- (nnimap "uw"
- (nnimap-stream plain)
- (nnimap-address "127.0.0.1")
- (nnimap-server-port 143)
- (nnimap-authenticator plain)
- (nnimap-user "abandali@uw.local")
- (nnimap-inbox "INBOX")
- (nnimap-split-methods 'nnimap-split-fancy)
- (nnimap-split-fancy (|
- ;; (: gnus-registry-split-fancy-with-parent)
- ;; se212-f19
- ("subject" "SE\\s-?212" "course.se212-f19")
- (from "SE\\s-?212" "course.se212-f19")
- ;; catch-all
- "INBOX")))
- (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+shemshak:Sent"
- gnus-parameters
- '(("l\\.atreus"
- (to-address . "atreus@freelists.org")
- (to-list . "atreus@freelists.org"))
- ("l\\.deepspec"
- (to-address . "deepspec@lists.cs.princeton.edu")
- (to-list . "deepspec@lists.cs.princeton.edu")
- (list-identifier . "\\[deepspec\\]"))
- ("l\\.emacs-devel"
- (to-address . "emacs-devel@gnu.org")
- (to-list . "emacs-devel@gnu.org"))
- ("l\\.help-gnu-emacs"
- (to-address . "help-gnu-emacs@gnu.org")
- (to-list . "help-gnu-emacs@gnu.org"))
- ("l\\.info-gnu-emacs"
- (to-address . "info-gnu-emacs@gnu.org")
- (to-list . "info-gnu-emacs@gnu.org"))
- ("l\\.emacs-orgmode"
- (to-address . "emacs-orgmode@gnu.org")
- (to-list . "emacs-orgmode@gnu.org")
- (list-identifier . "\\[O\\]"))
- ("l\\.emacs-tangents"
- (to-address . "emacs-tangents@gnu.org")
- (to-list . "emacs-tangents@gnu.org"))
- ("l\\.emacsconf-discuss"
- (to-address . "emacsconf-discuss@gnu.org")
- (to-list . "emacsconf-discuss@gnu.org"))
- ("l\\.emacsconf-register"
- (to-address . "emacsconf-register@gnu.org")
- (to-list . "emacsconf-register@gnu.org"))
- ("l\\.emacsconf-submit"
- (to-address . "emacsconf-submit@gnu.org")
- (to-list . "emacsconf-submit@gnu.org"))
- ("l\\.fencepost-users"
- (to-address . "fencepost-users@gnu.org")
- (to-list . "fencepost-users@gnu.org")
- (list-identifier . "\\[Fencepost-users\\]"))
- ("l\\.gnewsense-art"
- (to-address . "gnewsense-art@nongnu.org")
- (to-list . "gnewsense-art@nongnu.org")
- (list-identifier . "\\[gNewSense-art\\]"))
- ("l\\.gnewsense-dev"
- (to-address . "gnewsense-dev@nongnu.org")
- (to-list . "gnewsense-dev@nongnu.org")
- (list-identifier . "\\[Gnewsense-dev\\]"))
- ("l\\.gnewsense-users"
- (to-address . "gnewsense-users@nongnu.org")
- (to-list . "gnewsense-users@nongnu.org")
- (list-identifier . "\\[gNewSense-users\\]"))
- ("l\\.gnunet-developers"
- (to-address . "gnunet-developers@gnu.org")
- (to-list . "gnunet-developers@gnu.org")
- (list-identifier . "\\[GNUnet-developers\\]"))
- ("l\\.help-gnunet"
- (to-address . "help-gnunet@gnu.org")
- (to-list . "help-gnunet@gnu.org")
- (list-identifier . "\\[Help-gnunet\\]"))
- ("l\\.bug-gnuzilla"
- (to-address . "bug-gnuzilla@gnu.org")
- (to-list . "bug-gnuzilla@gnu.org")
- (list-identifier . "\\[Bug-gnuzilla\\]"))
- ("l\\.gnuzilla-dev"
- (to-address . "gnuzilla-dev@gnu.org")
- (to-list . "gnuzilla-dev@gnu.org")
- (list-identifier . "\\[Gnuzilla-dev\\]"))
- ("l\\.guile-devel"
- (to-address . "guile-devel@gnu.org")
- (to-list . "guile-devel@gnu.org"))
- ("l\\.guile-user"
- (to-address . "guile-user@gnu.org")
- (to-list . "guile-user@gnu.org"))
- ("l\\.guix-devel"
- (to-address . "guix-devel@gnu.org")
- (to-list . "guix-devel@gnu.org"))
- ("l\\.help-guix"
- (to-address . "help-guix@gnu.org")
- (to-list . "help-guix@gnu.org"))
- ("l\\.info-guix"
- (to-address . "info-guix@gnu.org")
- (to-list . "info-guix@gnu.org"))
- ("l\\.savannah-hackers-public"
- (to-address . "savannah-hackers-public@gnu.org")
- (to-list . "savannah-hackers-public@gnu.org"))
- ("l\\.savannah-users"
- (to-address . "savannah-users@gnu.org")
- (to-list . "savannah-users@gnu.org"))
- ("l\\.www-commits"
- (to-address . "www-commits@gnu.org")
- (to-list . "www-commits@gnu.org"))
- ("l\\.www-discuss"
- (to-address . "www-discuss@gnu.org")
- (to-list . "www-discuss@gnu.org"))
- ("l\\.haskell-art"
- (to-address . "haskell-art@we.lurk.org")
- (to-list . "haskell-art@we.lurk.org")
- (list-identifier . "\\[haskell-art\\]"))
- ("l\\.haskell-cafe"
- (to-address . "haskell-cafe@haskell.org")
- (to-list . "haskell-cafe@haskell.org")
- (list-identifier . "\\[Haskell-cafe\\]"))
- ("l\\.notmuch"
- (to-address . "notmuch@notmuchmail.org")
- (to-list . "notmuch@notmuchmail.org"))
- ("l\\.parabola-dev"
- (to-address . "dev@lists.parabola.nu")
- (to-list . "dev@lists.parabola.nu")
- (list-identifier . "\\[Dev\\]"))
- ("l\\.~bandali\\.public-inbox"
- (to-address . "~bandali/public-inbox@lists.sr.ht")
- (to-list . "~bandali/public-inbox@lists.sr.ht"))
- ("l\\.~sircmpwn\\.free-writers-club"
- (to-address . "~sircmpwn/free-writers-club@lists.sr.ht")
- (to-list . "~sircmpwn/free-writers-club@lists.sr.ht"))
- ("l\\.~sircmpwn\\.srht-admins"
- (to-address . "~sircmpwn/sr.ht-admins@lists.sr.ht")
- (to-list . "~sircmpwn/sr.ht-admins@lists.sr.ht"))
- ("l\\.~sircmpwn\\.srht-announce"
- (to-address . "~sircmpwn/sr.ht-announce@lists.sr.ht")
- (to-list . "~sircmpwn/sr.ht-announce@lists.sr.ht"))
- ("l\\.~sircmpwn\\.srht-dev"
- (to-address . "~sircmpwn/sr.ht-dev@lists.sr.ht")
- (to-list . "~sircmpwn/sr.ht-dev@lists.sr.ht"))
- ("l\\.~sircmpwn\\.srht-discuss"
- (to-address . "~sircmpwn/sr.ht-discuss@lists.sr.ht")
- (to-list . "~sircmpwn/sr.ht-discuss@lists.sr.ht"))
- ("webmasters"
- (to-address . "webmasters@gnu.org")
- (to-list . "webmasters@gnu.org"))
- ("gnu.*"
- (gcc-self . t))
- ("gnu\\."
- (subscribed . t))
- ("nnimap\\+uw:.*"
- (gcc-self . t)))
- gnus-large-newsgroup 50
- gnus-home-directory (b/var "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)
-
- (when (version< emacs-version "27")
- (add-to-list
- 'nnmail-split-abbrev-alist
- '(list . "list-id\\|list-post\\|x-mailing-list\\|x-beenthere\\|x-loop")
- t))
-
- ;; (gnus-registry-initialize)
-
- (with-eval-after-load 'recentf
- (add-to-list 'recentf-exclude gnus-home-directory)))
-
-(use-package gnus-art
- :config