summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/common-lisp/source-registry.conf.d/50-my-lisp.conf1
-rw-r--r--.config/common-lisp/source-registry.conf.d/50-my-lisp.conf.in1
-rw-r--r--.config/foot/foot.ini.in (renamed from .config/foot/foot.ini)7
-rw-r--r--.config/git/config.in (renamed from .config/git/config)19
-rw-r--r--.config/gtk-3.0/settings.ini3
-rw-r--r--.config/mutt/muttrc2
-rw-r--r--.config/ncdu/config2
-rwxr-xr-x.config/notmuch/default/hooks/post-new2
-rw-r--r--.duply/melete-spwhitton-home/exclude2
-rw-r--r--.emacs.d/early-init.el2
-rw-r--r--.emacs.d/eshell/alias3
-rw-r--r--.emacs.d/init.el1314
-rw-r--r--.gitignore3
-rw-r--r--.gtkrc-2.02
-rw-r--r--.hstow-local-ignore2
-rw-r--r--.hstow-unstow-ignore2
-rw-r--r--.mbsyncrc116
-rw-r--r--.notmuch-config4
-rw-r--r--.sbuildrc3
-rw-r--r--.shinit4
-rw-r--r--.ssh/config6
-rw-r--r--Makefile15
-rw-r--r--README18
-rwxr-xr-xbin/athenet-apt-add (renamed from bin/athena-apt-add)6
-rwxr-xr-xbin/bstraph1
-rwxr-xr-xbin/buildssrht-preupload2
-rwxr-xr-xbin/doccheckin4
-rwxr-xr-xbin/locmaint11
-rwxr-xr-xbin/movemymail4
-rwxr-xr-xbin/reprepro-rebuilder5
-rwxr-xr-xbin/yt-dlp-scrot6
-rw-r--r--lib-src/certs/fastmail.crt41
-rw-r--r--lib-src/git/includes4
-rw-r--r--lib-src/git/lib/athenet-apt (renamed from lib-src/git/lib/athena-apt)2
-rw-r--r--lib-src/hostinfo.m414
-rw-r--r--lib-src/mr/config56
-rwxr-xr-xscripts/git/sort-into-yyyy2
37 files changed, 737 insertions, 954 deletions
diff --git a/.config/common-lisp/source-registry.conf.d/50-my-lisp.conf b/.config/common-lisp/source-registry.conf.d/50-my-lisp.conf
deleted file mode 100644
index 0ed6822f..00000000
--- a/.config/common-lisp/source-registry.conf.d/50-my-lisp.conf
+++ /dev/null
@@ -1 +0,0 @@
-(:tree "/home/spwhitton/src/cl/")
diff --git a/.config/common-lisp/source-registry.conf.d/50-my-lisp.conf.in b/.config/common-lisp/source-registry.conf.d/50-my-lisp.conf.in
new file mode 100644
index 00000000..a9a21051
--- /dev/null
+++ b/.config/common-lisp/source-registry.conf.d/50-my-lisp.conf.in
@@ -0,0 +1 @@
+(:tree "SH_HOME/src/cl/")
diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini.in
index eb214222..1c293b6c 100644
--- a/.config/foot/foot.ini
+++ b/.config/foot/foot.ini.in
@@ -1,6 +1,7 @@
-# size=6.5 is required for two 80-col Emacs windows on smaller screens.
-# size=7 for now because not using Sway on any machines with smaller screens.
-font = Hack:size=7
+dnl Sizes are chosen to ensure we can fit two 80-col Emacs frames on-screen.
+font = Hack:size=ifelse(SH_FQDN, zephyr.silentflame.com, 10,
+ SH_FQDN, melete.silentflame.com, 7,
+ 6.5)
term = xterm-256color
[colors]
diff --git a/.config/git/config b/.config/git/config.in
index 09c01894..d2ba8db1 100644
--- a/.config/git/config
+++ b/.config/git/config.in
@@ -41,10 +41,7 @@
upload-host = ssh-upload
[format]
- # There's no tilde expansion for this. When can assume git 2.31 can
- # set GIT_CONFIG_KEY_0=format.outputDirectory &
- # GIT_CONFIG_VALUE_0="$HOME/tmp" in ~/.profile instead.
- outputDirectory = /home/spwhitton/tmp
+ outputDirectory = SH_HOME/tmp
# These defaults turn off anonymous recipients to minimise key usage prompts.
[gcrypt]
@@ -52,6 +49,9 @@
participants = 0F56D0553B6D411B
signingkey = 0F56D0553B6D411B
+[merge]
+ conflictStyle = zdiff3
+
[merge "dpkg-mergechangelogs"]
name = debian/changelog merge driver
driver = dpkg-mergechangelogs -m %O %A %B %A
@@ -83,16 +83,18 @@
email = spwhitton@spwhitton.name
[url "https://git.spwhitton.name/"]
- insteadOf = demeter:
+ insteadOf = spw:
insteadOf = git://git.spwhitton.name/
insteadOf = http://git.spwhitton.name/
insteadOf = athena: # for compatibility only
+ insteadOf = demeter: # for compatibility only
insteadOf = git://spwhitton.name/ # for compatibility only
[url "git@git.spwhitton.name:"]
pushInsteadOf = http://git.spwhitton.name/
pushInsteadOf = https://git.spwhitton.name/
pushInsteadOf = git://git.spwhitton.name/
- pushInsteadOf = demeter:
+ pushInsteadOf = spw:
+ pushInsteadOf = demeter: # for compatibility only
pushInsteadOf = athena: # for compatibility only
pushInsteadOf = git://spwhitton.name/ # for compatibility only
@@ -117,6 +119,11 @@
[url "spwhitton@git.savannah.gnu.org:/srv/git/"]
pushInsteadOf = https://git.savannah.gnu.org/git/
+[log]
+ excludeDecoration = refs/remotes/*/HEAD
+ excludeDecoration = refs/remotes/dgit/
+ excludeDecoration = refs/tags/archive/debian/
+
[include]
# Mostly local overrides, e.g. of user.name and user.email.
path = ~/.config/git/local
diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini
deleted file mode 100644
index 7e447047..00000000
--- a/.config/gtk-3.0/settings.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[Settings]
-gtk-key-theme-name=Emacs
-gtk-application-prefer-dark-theme=0
diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc
index 2825f7ec..25e097be 100644
--- a/.config/mutt/muttrc
+++ b/.config/mutt/muttrc
@@ -29,7 +29,7 @@ unset crypt_use_gpgme # Some Debian services require inline sigs.
unset mark_old # Better with mbsync.
unset wait_key
-mailboxes +inbox +notes +sent +ham +spam +junk +trash
+mailboxes +inbox +notes +sent +junk +trash
ignore *
unignore From: Subject: To: Cc: Date: Reply-To: Message-Id:
diff --git a/.config/ncdu/config b/.config/ncdu/config
new file mode 100644
index 00000000..6e3c5701
--- /dev/null
+++ b/.config/ncdu/config
@@ -0,0 +1,2 @@
+--exclude-kernfs
+--color dark-bg
diff --git a/.config/notmuch/default/hooks/post-new b/.config/notmuch/default/hooks/post-new
index b46d08bd..1774b148 100755
--- a/.config/notmuch/default/hooks/post-new
+++ b/.config/notmuch/default/hooks/post-new
@@ -1,7 +1,7 @@
#!/bin/sh
# mark all spam as spam, and as read, for Gnus
-notmuch tag -unread +spam -- folder:junk folder:spam
+notmuch tag -unread +spam -- folder:junk
# mark all trash as trash, and as read, for Gnus
notmuch tag -unread +deleted -- folder:trash
diff --git a/.duply/melete-spwhitton-home/exclude b/.duply/melete-spwhitton-home/exclude
index d230f72b..17866820 100644
--- a/.duply/melete-spwhitton-home/exclude
+++ b/.duply/melete-spwhitton-home/exclude
@@ -1,6 +1,6 @@
- /home/spwhitton/lib/annex/.git/annex
- /home/spwhitton/annex/.git/annex
-- /home/spwhitton/lib/athena-apt/pool
+- /home/spwhitton/lib/athenet-apt/pool
- /home/spwhitton/lib/dionysus/.git/annex/objects
- /home/spwhitton/lib/podcasts/.git/annex/objects
- /home/spwhitton/lib/rt
diff --git a/.emacs.d/early-init.el b/.emacs.d/early-init.el
index a3793e15..08a4aa02 100644
--- a/.emacs.d/early-init.el
+++ b/.emacs.d/early-init.el
@@ -1,6 +1,6 @@
;;; early-init.el --- frames conf. -*- lexical-binding:t;no-byte-compile:t -*-
-;; Copyright (C) 2020-2022 Sean Whitton <spwhitton@spwhitton.name>
+;; Copyright (C) 2020-2023 Sean Whitton <spwhitton@spwhitton.name>
;;
;; This file is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
diff --git a/.emacs.d/eshell/alias b/.emacs.d/eshell/alias
index 5e66ab3b..29a43d2d 100644
--- a/.emacs.d/eshell/alias
+++ b/.emacs.d/eshell/alias
@@ -2,7 +2,7 @@ alias grep-queued { cd /ssh:ssh.upload.debian.org: && *grep $* /srv/upload.debia
alias grep-dak { cd /ssh:ftp-master.debian.org: && *grep $* /srv/ftp-master.debian.org/log/current }
alias push-develacc-dotfiles-branch git push -f origin develacc/develacc-"${hostname}":develacc-"${hostname}"
alias sbuild-prerelease sbuild --dpkg-source-opts='-Zgzip -z1 --format=1.0 -sn' $*
-alias sbuild-lts quilt pop -a; git is-clean ':!debian/patches/' && sbuild --no-clean-source --no-run-lintian $*
+alias sbuild-lts quilt pop -a; git is-clean ':!debian/patches/' && sbuild --no-clean-source $*
alias dpkg-bp-lts quilt pop -a; git is-clean && dpkg-buildpackage -S -nc --force-sign $*
alias dpkg-buildpackage-lts dpkg-bp-lts $*
alias d dired $1
@@ -18,6 +18,7 @@ alias afsid apt-file --filter-suites unstable $*
alias grepcopy grep -Eir '(copyright|©)' *
alias pdfwords pdftotext "$1" - | wc -w
alias dlp lp -o sides=two-sided-long-edge $*
+alias pdd dd bs=4M status=progress conv=fdatasync $*
alias tail-dak { cd /ssh:ftp-master.debian.org:/srv/ftp-master.debian.org/log && tail -f current }
alias tail-queued { cd /ssh:ssh.upload.debian.org:/srv/upload.debian.org/queued/run && tail -f log }
alias package-plan-unpack ~/src/dotfiles/scripts/debian/package-plan-unpack "$1"; cd "/tmp/$1"
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index e220af96..5daa401f 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -23,11 +23,6 @@
;; matching ~/.emacs.d/*.el, since the "spw-" and "spw--" prefixes would be
;; for a file called "spw.el" with a defined API, providing an `spw' feature.
;;
-;; Prefer using the customise interface for variables, faces and enabling and
-;; disabling global minor modes, except when we want to associate an extended
-;; comment to a number of settings (typically we use the customise interface's
-;; facility for adding comments for only short comments).
-;;
;; Aim for compatibility with the version of Emacs included in Debian stable.
;;
;; Bind only key sequences reserved for users or which are already bound to
@@ -82,40 +77,49 @@
;;;; Customisation & appearance
-(custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
+;; The customisation system is additionally used to save safe local variable
+;; values, SSL certificate overrides etc. (cf. `customize-push-and-save').
+;; Most of these should not be committed to git: they're often host-specific,
+;; usually only relevant for a short time, and sometimes private.
+;; So we use a disposable, local custom file, and `custom-theme-set-faces',
+;; `customize-set-variable' and `custom-theme-set-variables' in this file.
+;; (Re `setopt' vs. `customize-set-variable': former is for when we're making
+;; a dynamic change that is not just host-specific but session-specific.)
+(load (setq custom-file (expand-file-name "custom" user-emacs-directory))
+ 'noerror 'nomessage 'nosuffix)
+
+(custom-theme-set-faces
+ 'user
'(default ((t (:weight medium :height 105 :foundry "SRC" :family "Hack"))))
+ '(fixed-pitch ((t (:foundry "SRC" :family "Hack"))))
+ '(variable-pitch ((t (:weight regular :height 120
+ :foundry "bitstream" :family "Bitstream Charter"))))
+ ;; We want to handle the `variable-pitch'/`variable-pitch-text' distinction
+ ;; using `spw/maybe-scale-basic-faces' instead.
+ '(variable-pitch-text ((t (:inherit variable-pitch))))
+
'(comint-highlight-prompt ((t (:inherit minibuffer-prompt :weight bold))))
'(fill-column-indicator ((t (:background "light gray"))))
- '(fixed-pitch ((t (:foundry "SRC" :family "Hack"))))
- '(org-code ((t (:inherit (shadow fixed-pitch)))))
- '(org-date ((t (:inherit fixed-pitch :foreground "Purple" :underline t))))
- '(org-verbatim ((t (:inherit (shadow fixed-pitch)))))
- '(region ((t (:extend t :background "#EECD82"))) nil "Colour is from the Lucid build.")
- '(variable-pitch ((t (:weight regular :height 120 :foundry "bitstream" :family "Bitstream Charter"))))
- '(variable-pitch-text ((t (:inherit variable-pitch))) nil "Handled by `spw/maybe-scale-basic-faces' instead."))
-
-;; Set background colour but don't touch text terminals.
-(dolist (ws '(x pgtk w32 ns))
- (add-to-list
- 'window-system-default-frame-alist
- ;; If we were not started with --daemon or by 'emacsclient -a ""', then
- ;; we're probably a shortlived instance of Emacs just to test something.
- ;; Set a different background colour to more easily distinguish frames
- ;; belonging to shortlived instances from those belonging to main instance.
- `(,ws
- . ((background-color
- . ,(pcase (daemonp)
- ('nil "honeydew") ("gdbmacs" "linen") (_ "#FFFFF6")))))))
+
+ ;; The colour is from the Lucid build of Emacs.
+ '(region ((t (:extend t :background "#EECD82")))))
+
+;; Set background colours for graphical frames; leave TUI frames alone.
+;; If we were not started with --daemon or by 'emacsclient -a ""', then
+;; we're probably a shortlived instance of Emacs just to test something.
+;; Set a different background colour to more easily distinguish frames
+;; belonging to shortlived instances from those belonging to main instance.
+(let ((colour (pcase (daemonp)
+ ('nil "#F0FFF0") ("gdbmacs" "#F5F5DC") (_ "#FFFFF6"))))
+ (dolist (ws '(x pgtk w32 ns))
+ (add-to-list 'window-system-default-frame-alist
+ `(,ws . ((background-color . ,colour))))))
(defun spw/maybe-scale-basic-faces (frame)
- "Entry for `window-size-change-functions' to increase font sizes
-from those set by `custom-set-faces' for frames on wide monitors,
-except where doing so would itself prevent fitting two 80-column
-windows side-by-side in the frame."
+ "Entry for `window-size-change-functions' to increase font sizes,
+relative to those set by the call to `custom-theme-set-faces' above, for
+frames on wide monitors, except where doing so would itself prevent fitting
+two 80-column windows side-by-side in the frame."
(when (display-graphic-p frame)
(let ((wide-monitor-p (> (cadddr (assoc 'geometry
(frame-monitor-attributes frame)))
@@ -167,32 +171,22 @@ windows side-by-side in the frame."
(set-terminal-parameter nil 'background-mode 'light)))
(add-hook 'tty-setup-hook #'spw/set-tmux-background-mode)
-(custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
+(custom-theme-set-variables
+ 'user
'(Man-notify-method 'aggressive)
'(after-save-hook '(executable-make-buffer-file-executable-if-script-p))
- '(appt-display-diary nil)
- '(appt-display-interval 6)
'(async-shell-command-buffer 'rename-buffer)
+
+ ;; Always update buffers when files change on disk -- if we want to go back
+ ;; to the version of the file we had in Emacs, we can just hit C-/.
+ '(auto-revert-use-notify nil)
+ '(global-auto-revert-mode 1)
+
'(auth-source-save-behavior nil)
'(auto-save-file-name-transforms '((".*" "~/.emacs.d/auto-saves/" t)))
'(backup-by-copying-when-linked t)
'(backup-directory-alist '(("." . "~/.emacs.d/backups/")))
- '(bongo-default-directory "~/annex/music/")
- '(bongo-insert-album-covers t)
- '(bongo-insert-whole-directory-trees t)
- '(bongo-mode-line-indicator-mode nil)
- '(bongo-prefer-library-buffers nil)
- '(c-default-style "linux")
'(calc-kill-line-numbering nil)
- '(calendar-date-display-form
- '((format "%s-%.2d-%.2d %.3s" year (string-to-number month)
- (string-to-number day) dayname)))
- '(calendar-date-style 'iso)
- '(calendar-week-start-day 1)
'(column-number-mode t)
'(comint-prompt-read-only t)
'(compilation-scroll-output 'first-error)
@@ -202,223 +196,67 @@ windows side-by-side in the frame."
'(copy-region-blink-delay 0)
'(copyright-names-regexp "Sean Whitton")
'(copyright-year-ranges t)
- '(cperl-close-paren-offset -4 nil nil "See `cperl-indent-parens-as-block'.")
- '(cperl-indent-level 4)
- '(cperl-indent-parens-as-block t nil nil "Makes it easier to use longer names for subroutines.")
- '(cperl-lineup-step 1)
'(cursor-type 'box)
- '(cycle-spacing-actions '(just-one-space) nil nil "Restore Emacs 28 behaviour of M-SPC.")
+
+ ;; C-u M-\ to delete only before point, M-SPC M-SPC to delete only after.
+ '(cycle-spacing-actions '(just-one-space (delete-space-after -)))
+
'(dabbrev-case-fold-search t)
- '(diary-file "~/doc/emacs-diary")
- '(diary-list-entries-hook '(diary-include-other-diary-files diary-sort-entries))
- '(diary-mark-entries-hook '(diary-mark-included-diary-files))
- '(dired-clean-up-buffers-too nil)
- '(dired-dwim-target t)
- '(dired-free-space 'separate)
- '(dired-isearch-filenames t)
- '(dired-listing-switches "--group-directories-first -alh")
- '(dired-omit-files "\\`[.]?#\\|\\`[.][.]?\\'\\|\\`\\.git\\'")
- '(dired-recursive-copies 'always)
'(display-fill-column-indicator-character 32)
'(ediff-split-window-function 'split-window-horizontally)
'(eldoc-minor-mode-string nil)
'(emacs-lisp-docstring-fill-column 75)
'(enable-recursive-minibuffers t)
- '(eshell-cmpl-cycle-completions nil nil nil "This makes Eshell completions a bit more like bash's.")
- '(eshell-cmpl-ignore-case t)
- '(eshell-hist-ignoredups 'erase)
- '(eshell-history-append t)
- '(eshell-history-size 5000)
- '(eshell-save-history-on-exit nil)
- '(eshell-visual-commands
- '("vi" "screen" "tmux" "top" "htop" "less" "more" "mutt" "locmaint" "gen-DSA"
- "gen-DLA" "gen-ELA"))
'(fill-column 78)
- '(font-lock-maximum-decoration '((lisp-mode . 1) (consfigurator-lisp-mode . 1) (t . t)))
+ '(font-lock-maximum-decoration
+ '((lisp-mode . 1) (consfigurator-lisp-mode . 1) (t . t)))
'(gc-cons-threshold 16777216)
'(gdb-many-windows t)
- '(gdb-show-main t nil nil "This is helpful when gdb-many-windows is turned off.")
- '(git-rebase-confirm-cancel nil)
+
+ ;; This is helpful when gdb-many-windows is turned off.
+ '(gdb-show-main t)
+
'(global-so-long-mode t)
- '(gnus-article-skip-boring t)
- '(gnus-auto-center-summary nil)
- '(gnus-auto-select-next 'slightly-quietly)
- '(gnus-buttonized-mime-types
- '("text/x-\\(?:diff\\|patch\\)" "multipart/\\(?:alternative\\|signed\\)"))
- '(gnus-directory "~/local/News/")
- '(gnus-extra-headers '(To Cc List-Id))
- '(gnus-gcc-mark-as-read t)
- '(gnus-global-score-files '("~/doc/News/"))
- '(gnus-interactive-exit 'quiet)
- '(gnus-kill-files-directory "~/src/athpriv/News/")
- '(gnus-kill-summary-on-exit t nil nil "Would prefer nil but t seems advisable for notmuch groups.")
- '(gnus-large-ephemeral-newsgroup 8000)
- '(gnus-large-newsgroup 8000)
- '(gnus-mark-article-hook '(spw/gnus-mark-article-hook))
- '(gnus-message-archive-group "sent")
- '(gnus-message-archive-method '(nnmaildir "fmail" (directory "~/.fmail/")))
- '(gnus-permanently-visible-groups "^nnmaildir\\+fmail:\\(?:notes\\|sent\\)$")
- '(gnus-read-newsrc-file nil)
- '(gnus-refer-thread-use-search '(("nnmaildir:fmail")))
- '(gnus-save-killed-list
- "^\\(?:[^n]\\|n[^n]\\|nn[^s]\\|nns[^e]\\|nnse[^l]\\|nnsel[^e]\\|nnsele[^c]\\|nnselec[^t]\\|nnselect[^:]\\)")
- '(gnus-save-newsrc-file nil)
- '(gnus-search-default-engines '((nnmaildir . notmuch)))
- '(gnus-search-notmuch-remove-prefix "~/.fmail/")
- '(gnus-secondary-select-methods '((nnmaildir "fmail" (directory "~/.fmail/"))))
- '(gnus-sum-thread-tree-false-root "")
- '(gnus-sum-thread-tree-indent " ")
- '(gnus-sum-thread-tree-leaf-with-other "├► ")
- '(gnus-sum-thread-tree-root "")
- '(gnus-sum-thread-tree-single-leaf "╰► ")
- '(gnus-sum-thread-tree-vertical "│")
- '(gnus-summary-line-format "%U%R%z %(%12&user-date; %*%-23,23f%) %B%s\12")
- '(gnus-summary-mode-line-format "Gnus: %u&summary;%g [%A] %Z")
- '(gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references)
- '(gnus-suppress-duplicates t)
- '(gnus-thread-sort-functions
- '(gnus-thread-sort-by-number gnus-thread-sort-by-total-score))
- '(gnus-topic-display-empty-topics nil)
- '(gnus-update-message-archive-method t)
- '(gnus-user-date-format-alist
- '((32042 . "%2l:%M%#p") (118823 . "Yest %2l:%M%#p") (604800 . "%a %2l:%M%#p")
- (16102447 . "%d %B") (t . "%Y-%b-%d")))
- '(haskell-indentation-layout-offset 4)
- '(haskell-indentation-left-offset 4)
+ '(help-display-function-type nil)
'(help-window-keep-selected t)
- '(holiday-bahai-holidays nil)
- '(holiday-hebrew-holidays nil)
- '(holiday-islamic-holidays nil)
- '(howm-directory "~/doc/howm/")
- '(howm-file-name-format "%Y/%Y-%m-%d-%H%M.org")
- '(howm-keyword-file "~/doc/howm/.howm-keys")
- '(howm-view-use-grep t)
- '(icomplete-hide-common-prefix nil)
- '(icomplete-in-buffer t)
- '(icomplete-mode t)
- '(icomplete-show-matches-on-no-input t)
- '(icomplete-tidy-shadowed-file-names t)
'(imenu-auto-rescan t)
+ '(inferior-lisp-program "sbcl")
'(initial-major-mode 'spw/scratch-lisp-interaction-mode)
'(kill-read-only-ok t)
- '(log-edit-hook
- '(log-edit-insert-message-template log-edit-insert-cvs-template
- log-edit-insert-changelog
- spw/log-edit-show-diff) nil nil "Drop log-edit-show-files to avoid its window becoming most recently used for C-x o.")
- '(mail-envelope-from 'header nil nil "Bypass MTA rewriting user@localhost.")
- '(mail-specify-envelope-from t nil nil "Bypass MTA rewriting user@localhost.")
+
+ ;; Bypass MTA rewriting user@localhost.
+ '(mail-envelope-from 'header)
+ '(mail-specify-envelope-from t)
+
'(mail-user-agent 'gnus-user-agent)
'(mailscripts-detach-head-from-existing-branch 'ask)
'(mailscripts-extract-patches-branch-prefix "mail/")
'(mailscripts-project-library 'project)
- '(major-mode-remap-alist '((perl-mode . cperl-mode)) nil nil "cperl-mode doesn't try to indent lines within a POD, and usefully font locks scalars that are members of hashes and arrays.")
- '(make-pointer-invisible t nil nil "Works only for self-insert chars and undone by changes in window manager focus, but less annoying than `mouse-avoidance-mode'.")
- '(message-auto-save-directory "~/tmp/" nil nil "So locmaint will catch them.")
- '(message-citation-line-format "On %a %d %b %Y at %I:%M%p %Z, %N wrote:\12")
- '(message-citation-line-function 'message-insert-formatted-citation-line)
- '(message-forward-as-mime nil nil nil "For compatibility.")
- '(message-forward-before-signature nil nil nil "For compatibility.")
- '(message-forward-included-headers
- '("^From:" "^Subject:" "^Date:" "^To:" "^Cc:" "^Message-ID:") nil nil "For compatibility.")
- '(message-ignored-resent-headers
- "^Return-receipt\\|^X-Gnus\\|^Gnus-Warning:\\|^>?From \\|^Delivered-To:\\|^\\(?:X-\\)?Content-Length:\\|^X-UIDL:\\|^X-TUID:\\|^\\(?:X-\\)?Status:\\|^Lines:")
- '(message-make-forward-subject-function '(message-forward-subject-fwd) nil nil "For compatibility.")
- '(message-sendmail-envelope-from 'header nil nil "Bypass MTA rewriting user@localhost.")
- '(message-wash-forwarded-subjects t)
+
+ ;; `cperl-mode' doesn't try to indent lines within a POD, and usefully font
+ ;; locks scalars that are members of hashes and arrays.
+ '(major-mode-remap-alist '((perl-mode . cperl-mode)))
+
+ ;; Works only for self-insert chars and undone by changes in window manager
+ ;; focus, but less annoying than `mouse-avoidance-mode'.
+ '(make-pointer-invisible t)
+
'(minibuffer-follows-selected-frame nil)
- '(mm-decrypt-option 'known)
- '(mm-default-directory "~/tmp/")
- '(mm-file-name-rewrite-functions
- '(mm-file-name-delete-control mm-file-name-delete-gotchas
- mm-file-name-trim-whitespace
- mm-file-name-collapse-whitespace
- mm-file-name-replace-whitespace))
- '(mml-secure-openpgp-encrypt-to-self t nil nil "So I can read copies in my sent mail directory.")
- '(mml-secure-openpgp-sign-with-sender t)
'(mode-line-compact 'long)
- '(mouse-drag-copy-region t nil nil "X primary selection-like behaviour within Emacs even when not available outside.")
- '(mouse-highlight 1 nil nil "See `make-pointer-invisible'.")
+
+ ;; X primary selection-like behaviour within Emacs even when not available
+ ;; outside.
+ '(mouse-drag-copy-region t)
+
+ ;; See `make-pointer-invisible'.
+ '(mouse-highlight 1)
+
'(mouse-yank-at-point t)
'(native-comp-async-jobs-number 1)
'(native-comp-async-report-warnings-errors 'silent)
- '(nnmail-extra-headers '(To Cc List-Id))
- '(notmuch-address-use-company nil)
- '(nov-text-width 78)
- '(org-adapt-indentation t nil nil "Sometimes set to nil in .dir-locals.el, e.g. in ~/doc/newpapers.")
- '(org-agenda-entry-text-maxlines 3)
- '(org-agenda-files "~/doc/emacs-org-agenda-files")
- '(org-agenda-persistent-filter t)
- '(org-agenda-remove-times-when-in-prefix 'beg)
- '(org-agenda-restore-windows-after-quit nil nil nil "Interacts badly with `tab-bar-history-mode'.")
- '(org-agenda-skip-deadline-if-done t)
- '(org-agenda-skip-deadline-prewarning-if-scheduled 3)
- '(org-agenda-skip-scheduled-if-deadline-is-shown 'not-today)
- '(org-agenda-skip-scheduled-if-done t)
- '(org-agenda-skip-timestamp-if-done t)
- '(org-agenda-start-on-weekday nil)
- '(org-agenda-sticky t)
- '(org-agenda-timegrid-use-ampm t)
- '(org-agenda-todo-ignore-scheduled 'future)
- '(org-agenda-window-setup 'current-window)
- '(org-archive-location "~/doc/archive/howm/archive.org::* From %s")
- '(org-archive-save-context-info '(time file olpath))
- '(org-archive-subtree-save-file-p t)
- '(org-blank-before-new-entry '((heading . t) (plain-list-item . auto)))
- '(org-bookmark-names-plist nil nil nil "Turn off to avoid git merge conflicts.")
- '(org-cycle-separator-lines 0)
- '(org-deadline-warning-days 60)
- '(org-default-notes-file "~/doc/howm/refile.org")
- '(org-directory "~/doc/howm/")
- '(org-enforce-todo-checkbox-dependencies t)
- '(org-enforce-todo-dependencies t)
- '(org-fold-catch-invisible-edits 'show)
- '(org-fold-show-context-detail
- '((agenda . local) (bookmark-jump . lineage) (isearch . lineage)
- (default . ancestors-full)))
- '(org-footnote-section "Notes")
- '(org-imenu-depth 4)
- '(org-list-allow-alphabetical nil nil nil "So I can start lines with \"P. 211 - \" to refer to p. 211 not start a list.")
- '(org-list-demote-modify-bullet
- '(("-" . "+") ("+" . "*") ("*" . "-") ("1." . "-") ("1)" . "-")))
- '(org-list-use-circular-motion t)
- '(org-log-done 'time)
- '(org-log-into-drawer t)
- '(org-log-repeat nil nil nil "Cluttering, and information probably in git.")
- '(org-log-states-order-reversed nil)
- '(org-outline-path-complete-in-steps nil nil nil "Desirable with `icomplete-mode'.")
- '(org-read-date-prefer-future 'time)
- '(org-refile-allow-creating-parent-nodes 'confirm)
- '(org-refile-targets '((org-agenda-files :maxlevel . 5) (nil :maxlevel . 5)))
- '(org-refile-use-outline-path 'file)
- '(org-special-ctrl-a/e t)
- '(org-special-ctrl-k t)
- '(org-startup-folded nil)
- '(org-startup-indented nil nil nil "Ensures buffer text doesn't go beyond 80 columns.")
- '(org-tags-match-list-sublevels 'indented)
- '(org-todo-keyword-faces
- '(("SOMEDAY" :foreground "#0000FF" :weight bold)
- ("NEXT" :foreground "#DD0000" :weight bold)))
- '(org-todo-keywords
- '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
- (sequence "WAITING(w@)" "SOMEDAY(s)" "|" "CANCELLED(c)")))
- '(org-treat-S-cursor-todo-selection-as-state-change nil)
- '(org-treat-insert-todo-heading-as-state-change t)
- '(org-use-fast-todo-selection 'expert)
- '(org-yank-folded-subtrees nil)
'(proced-enable-color-flag t)
'(proced-show-remote-processes t)
'(project-switch-commands 'project-prefix-or-any-command)
- '(rcirc-default-full-name "Sean Whitton [spwhitton@spwhitton.name]")
- '(rcirc-default-nick "spwhitton")
- '(rcirc-default-user-name "spwhitton")
- '(rcirc-display-server-buffer nil)
- '(rcirc-log-directory "~/local/irclogs")
- '(rcirc-log-filename-function 'spw/rcirc-generate-log-filename)
- '(rcirc-log-flag t)
- '(rcirc-time-format "%b/%d %H:%M ")
- '(rcirc-track-abbreviate-flag nil)
- '(rcirc-track-ignore-server-buffer-flag t)
- '(rcirc-track-minor-mode t)
'(read-buffer-completion-ignore-case t)
'(read-file-name-completion-ignore-case t)
'(read-mail-command 'gnus)
@@ -427,39 +265,55 @@ windows side-by-side in the frame."
'(remember-notes-buffer-name "*scratch*")
'(remote-file-name-inhibit-delete-by-moving-to-trash t)
'(require-final-newline t)
- '(save-interprogram-paste-before-kill nil nil nil "See <https://debbugs.gnu.org/53728>.")
- '(save-place-mode t nil nil "If quitting Emacs is slow, set `save-place-forget-unreadable-files' to nil.")
+
+ ;; See <https://debbugs.gnu.org/53728>.
+ '(save-interprogram-paste-before-kill nil)
+
+ ;; If quitting Emacs is slow set `save-place-forget-unreadable-files' to nil.
+ '(save-place-mode t)
+
'(savehist-additional-variables '(compile-history log-edit-comment-ring))
'(savehist-mode t)
'(select-active-regions 'only)
'(select-enable-primary t)
'(send-mail-function 'sendmail-send-it)
'(shell-command-prompt-show-cwd t)
- '(show-paren-when-point-in-periphery t nil nil "Useful for C-M-d.")
+
+ ;; Useful for C-M-d.
+ '(show-paren-when-point-in-periphery t)
+
'(shr-max-width 78)
'(slime-load-failed-fasl 'never)
'(tab-bar-history-mode t)
'(tab-bar-show 1)
'(text-mode-ispell-word-completion nil)
- '(tramp-auto-save-directory "~/.emacs.d/auto-saves/" nil nil "Put TRAMP auto-saves under local `user-emacs-directory'.")
- '(tramp-backup-directory-alist '(("." . "~/.emacs.d/backups/")) nil nil "Put TRAMP backups under remote ~/.emacs.d/.")
+
+ ;; Put TRAMP auto-saves under local `user-emacs-directory'.
+ '(tramp-auto-save-directory "~/.emacs.d/auto-saves/")
+ ;; Put TRAMP backups under remote ~/.emacs.d/.
+ '(tramp-backup-directory-alist '(("." . "~/.emacs.d/backups/")))
+
'(tramp-copy-size-limit nil)
'(tramp-default-method "rsync")
- '(tramp-use-connection-share nil nil nil "Rely on my ~/.ssh/config.")
- '(tramp-verbose 1 nil nil "Manual says this should improve performance.")
+
+ ;; Rely on my ~/.ssh/config.
+ '(tramp-use-connection-share nil)
+
+ ;; Manual says this should improve performance.
+ '(tramp-verbose 1)
+
'(transient-cycles-buffer-siblings-mode t)
'(transient-cycles-tab-bar-mode t)
- '(transient-cycles-window-buffers-cycle-backwards-key [134217777] nil nil "M-1.")
- '(transient-cycles-window-buffers-cycle-forwards-key [134217780] nil nil "M-4.")
+ '(transient-cycles-window-buffers-cycle-backwards-key [134217777]) ; M-1
+ '(transient-cycles-window-buffers-cycle-forwards-key [134217780]) ; M-4
'(transient-cycles-window-buffers-mode t)
'(uniquify-buffer-name-style 'forward nil (uniquify))
'(use-short-answers t)
- '(vc-deduce-backend-nonvc-modes t)
- '(vc-find-revision-no-save t)
- '(vc-follow-symlinks t)
- '(vc-git-diff-switches '("--patch-with-stat" "-M" "-C") nil nil "We might also consider -B.")
- '(vc-git-print-log-follow t)
- '(view-read-only t nil nil "Rebind otherwise useless self-insert keys, and means existing C-x C-r, C-x 4 r etc. usable for getting into mode.")
+
+ ;; Rebind otherwise useless self-insert keys, and means existing C-x C-r,
+ ;; C-x 4 r etc. usable for getting into the mode.
+ '(view-read-only t)
+
'(warning-suppress-types '((comp)))
'(window-combination-resize t)
'(x-stretch-cursor t))
@@ -523,6 +377,11 @@ available are present in the `load-path'."
for form = `(add-hook ',hook #',function)
if name collect `(with-eval-after-load ',name ,form) else collect form)))
+(defmacro spw/feature-add-to-list (list-var feature &rest elements)
+ (declare (indent 2))
+ `(with-eval-after-load ',feature
+ ,@(cl-loop for el in elements collect `(add-to-list ',list-var ,el))))
+
(cl-defmacro spw/define-skeleton
(command (mode &key abbrev key (file `',mode)
(map (intern (concat (symbol-name mode) "-map")))
@@ -1005,11 +864,6 @@ To be used only when it seems to be necessary."
;; calling emacsclient(1), this is like '<ESC>ZZ' in vi.
(global-set-key "\C-cz" "\C-x\C-s\C-x#")
-;; always update buffers when files change on disk -- if we want to go back to
-;; the version of the file we had in Emacs, we can just hit undo
-(setq auto-revert-use-notify nil)
-(global-auto-revert-mode 1)
-
;; C-x x g should not ask for confirmation.
(global-set-key "\C-xxg" (lambda ()
(interactive)
@@ -1057,10 +911,30 @@ To be used only when it seems to be necessary."
(add-hook 'text-mode-hook #'goto-address-mode)
(add-hook 'prog-mode-hook #'goto-address-prog-mode)
+;; message-mode is sensitive to trailing whitespace in sig dashes and empty
+;; headers. markdown-mode is sensitive in empty headers (e.g. "# " which I
+;; use in writing essays) and newlines that indicate paragraph flow (obscure
+;; Markdown feature)
+;;
+;; The message-mode case is handled by `spw/normalise-message', which is
+;; better than setting `ws-butler-trim-predicate' to a complicated function
+;; because the code in `spw/normalise-message' gets called less often. Could
+;; try setting `ws-butler-trim-predicate' to handle the markdown-mode case,
+;; but chances are someday I'll want to use that obscure markdown-mode feature
+(define-globalized-minor-mode spw/ws-butler-global-mode ws-butler-mode
+ (lambda () (when (buffer-file-name) (ws-butler-mode 1)))
+ :predicate '((not markdown-mode
+ message-mode
+ lisp-interaction-mode)
+ prog-mode text-mode))
+(spw/ws-butler-global-mode 1)
+
+(spw/feature-add-hook rainbow-mode (sgml-mode html-mode-hook) css-mode)
+
(global-set-key "\C-cih" #'add-file-local-variable-prop-line)
;; don't do anything with abbrevs if ~/doc is not checked out
-(defvar spw/doc-abbrevs-file (expand-file-name "~/doc/emacs-abbrevs"))
+(defvar spw/doc-abbrevs-file (expand-file-name "~/doc/abbrevs"))
(when (file-exists-p spw/doc-abbrevs-file)
(setq abbrev-file-name spw/doc-abbrevs-file)
(quietly-read-abbrev-file)
@@ -1071,7 +945,7 @@ To be used only when it seems to be necessary."
(setf (cadr (assq 'abbrev-mode minor-mode-alist)) nil))
;; similar
-(defvar spw/doc-bookmarks-file (expand-file-name "~/doc/emacs-bookmarks"))
+(defvar spw/doc-bookmarks-file (expand-file-name "~/doc/bookmarks"))
(when (file-exists-p spw/doc-bookmarks-file)
(setq bookmark-default-file spw/doc-bookmarks-file
bookmark-save-flag 1))
@@ -1188,6 +1062,14 @@ To be used only when it seems to be necessary."
;;; Icomplete
+(custom-theme-set-variables
+ 'user
+ '(icomplete-hide-common-prefix nil)
+ '(icomplete-in-buffer t)
+ '(icomplete-mode t)
+ '(icomplete-show-matches-on-no-input t)
+ '(icomplete-tidy-shadowed-file-names t))
+
;; Possibly we could call `minibuffer-complete-word' if we know we're
;; completing the name of a Lisp symbol.
(spw/reclaim-keys-from minibuffer minibuffer-local-completion-map " " "?")
@@ -1295,45 +1177,6 @@ To be used only when it seems to be necessary."
;;;; Buffers and windows
-(defvar spw/arrow-keys-mode-map
- (let ((map (make-sparse-keymap)))
- (dolist (key '(up down left right
- S-up S-down S-left S-right
- M-up M-down M-left M-right))
- (define-key map (vector ?\C-z key) #'spw/arrow-keys-mode-passthru))
- map)
- "Keymap for `spw/arrow-keys-mode'.")
-
-(define-minor-mode spw/arrow-keys-mode
- "Apply the bindings in `spw/arrow-keys-mode-map', but
-additionally bind the sequences of C-z followed by each of the
-four arrow keys to activate a transient map in which the four
-arrow keys have the bindings they would have absent this mode.
-
-Permits globally re-binding the four arrow keys without rendering
-it impossible to access mode-specific bindings for those four
-keys (e.g. the use of the left and right arrow keys in
-`fido-mode' minibuffers)."
- ;; :init-value t
- :lighter nil :keymap spw/arrow-keys-mode-map :global t)
-
-(defun spw/arrow-keys-mode-passthru ()
- (interactive)
- ;; Possibly we could cache the map in a buffer-local variable. It'd get
- ;; cleared if the major mode changes, but we'd also need to figure out
- ;; clearing it (but not recomputing it until and unless this function is
- ;; called) if the minor modes change.
- (let ((map (make-sparse-keymap))
- (cell (cl-find 'spw/arrow-keys-mode minor-mode-map-alist :key #'car)))
- (cl-letf (((car cell) nil))
- (dolist (key '([up] [down] [left] [right]
- [S-up] [S-down] [S-left] [S-right]
- [M-up] [M-down] [M-left] [M-right]))
- (define-key map key (key-binding key))))
- (let ((key (vector last-command-event)))
- (call-interactively (lookup-key map key) t key))
- (set-transient-map map t)))
-
(defun spw/get-mru-window (&optional exclude)
"Like `get-mru-window' but also consider the minibuffer, and
don't consider windows satisfying the predicate EXCLUDE."
@@ -1377,8 +1220,8 @@ don't consider windows satisfying the predicate EXCLUDE."
;;; <left>/<right>. We could still put something on unmodified <down>/<up>,
;;; which I used to use for `tab-bar-history-mode' forward & back commands.
;;; (`spw/arrow-keys-mode' made it feasible to bind things to unmodified arrow
-;;; keys in the global map. That's disabled at present, as the unmodified
-;;; arrow keys are not in use.)
+;;; keys in the global map. That's archived to git history at present, as the
+;;; unmodified arrow keys are not in use.)
;;;
;;; We might put one of the other sets of windmove commands, such as
;;; windmove-swap-states-* commands, on C-z M-7/8/9/0, or possibly
@@ -1555,9 +1398,8 @@ state, attempt to produce some useful side window(s)."
(let ((default-directory (expand-file-name "~/")))
(slime))))
(t (error "No side windows state & no heuristic")))))))
-;; Possibly this command should go on M-5 or M-6.
-(global-set-key [remap window-toggle-side-windows]
- #'spw/window-toggle-side-windows)
+(define-key spw/personal-bindings-mode-map "\M-6"
+ #'spw/window-toggle-side-windows)
(defun spw/delete-other-windows--toggle-side-windows
(&optional window &rest _ignore)
@@ -1584,54 +1426,20 @@ the non-side windows deleted by `delete-other-windows' will also reappear."
(define-key ctl-x-5-map "\C-j" "\C-x55\C-x\C-j")
(define-key tab-prefix-map "\C-j" "\C-xtt\C-x\C-j")
-;;; For when the buffer's name isn't much help for switching to it, as is
-;;; often the case with `notmuch-show' buffers. We select the most recent
-;;; buffer but then transient cycling can take us to other buffers of the same
-;;; major mode.
-
-(defun spw/read-major-mode-recent-buffer ()
- (let ((buffers (make-hash-table)))
- (dolist (buffer (buffer-list))
- (with-current-buffer buffer
- (unless (gethash major-mode buffers)
- (puthash major-mode buffer buffers))))
- (list
- (gethash
- (intern
- (completing-read
- "Most recent buffer of major mode: " (hash-table-keys buffers) nil t))
- buffers))))
-
-(spw/transient-cycles-define-buffer-switch
- ((("\C-zb" . spw/switch-to-recent-major-mode-buffer) (buffer)
- (interactive (spw/read-major-mode-recent-buffer))
- (switch-to-buffer buffer t))
-
- (("\C-z4b" . spw/switch-to-recent-major-mode-buffer-other-window) (buffer)
- (interactive (spw/read-major-mode-recent-buffer))
- (switch-to-buffer-other-window buffer t))
-
- (("\C-z5b" . spw/switch-to-recent-major-mode-buffer-other-frame) (buffer)
- (interactive (spw/read-major-mode-recent-buffer))
- (switch-to-buffer-other-frame buffer t))
-
- (("\C-z4\C-o" . spw/display-recent-major-mode-buffer) (buffer)
- (interactive (spw/read-major-mode-recent-buffer))
- (display-buffer buffer))))
+(autoload 'redtick "redtick")
+(global-set-key "\C-cP" #'redtick)
+(autoload 'redtick-mode "redtick")
+(global-set-key "\C-cgP" #'redtick-mode)
;;;; TRAMP
-(with-eval-after-load 'tramp
- (add-to-list 'tramp-connection-properties
- ;; Activate direct-async-process for all non-multihop SSH
- ;; connections.
- '("/ssh:" "direct-async-process" t)
- ;; session-timeout is about dropping a connection for security
- ;; reasons alone: never do that.
- '(nil "session-timeout" nil))
-
- (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
+(spw/feature-add-to-list tramp-connection-properties tramp
+ ;; Activate `direct-async-process' for all non-multihop SSH connections.
+ '("/ssh:" "direct-async-process" t)
+ ;; Don't drop connections for security reasons alone.
+ '(nil "session-timeout" nil))
+(spw/feature-add-to-list tramp-remote-path tramp 'tramp-own-remote-path)
(unless (string-match ; Emacs 28: unquote and `string-search'
(regexp-quote tramp-file-name-regexp) vc-ignore-dir-regexp)
@@ -1642,6 +1450,21 @@ the non-side windows deleted by `delete-other-windows' will also reappear."
;;;; The Emacs shell
+(custom-theme-set-variables
+ 'user
+ ;; This makes Eshell completions a bit more like bash's.
+ '(eshell-cmpl-cycle-completions nil)
+
+ '(eshell-cmpl-ignore-case t)
+ '(eshell-hist-ignoredups 'erase)
+ '(eshell-history-append t)
+ '(eshell-history-size 5000)
+ '(eshell-save-history-on-exit nil))
+(spw/feature-add-to-list eshell-modules-list esh-module
+ 'eshell-elecslash 'eshell-tramp 'eshell-xtra)
+(spw/feature-add-to-list eshell-visual-commands em-term
+ "locmaint" "gen-DSA" "gen-ELA")
+
(with-eval-after-load 'esh-cmd
(add-hook 'eshell-pre-command-hook
(lambda ()
@@ -1676,19 +1499,6 @@ the non-side windows deleted by `delete-other-windows' will also reappear."
;; history of recent dirs is effectively buffer-local.
(setq eshell-last-dir-ring-file-name nil)
-(defun spw/eshell-cd-project-root ()
- (interactive)
- (if-let ((project (project-current)))
- (spw/eshell-cd (project-root project))
- (user-error "No current project")))
-(with-eval-after-load 'esh-mode
- (define-key eshell-mode-map "\C-zp" #'spw/eshell-cd-project-root))
-
-;; Work around Emacs bug #54977.
-(with-eval-after-load 'esh-module
- (mapc (apply-partially #'add-to-list 'eshell-modules-list)
- '(eshell-elecslash eshell-tramp eshell-xtra)))
-
(spw/define-skeleton spw/eshell-libexec
(eshell-mode :abbrev "le" :file "esh-mode")
"" "" "~/" '(eshell-electric-forward-slash) "src/dotfiles/scripts/")
@@ -1885,7 +1695,11 @@ Some ideas behind these behaviours are as follows.
(spw/transient-cycles-define-buffer-switch
((("e" . spw/project-eshell) ()
(interactive)
- (spw/eshell-jump 'project 'interactive)))
+ (prog1 (spw/eshell-jump 'project 'interactive)
+ ;; Make it possible to use M-& to repeat C-x p e.
+ (let ((map (make-sparse-keymap)))
+ (define-key map "\M-&" #'transient-cycles-cmd-spw/project-eshell)
+ (set-transient-map map)))))
;; Bind into project-prefix-map, rather than adding a remap, so that we
;; have it under C-x 4 p, C-x 5 p etc. too.
:keymap project-prefix-map)))
@@ -1893,8 +1707,6 @@ Some ideas behind these behaviours are as follows.
;;;; Miscellaneous functions & commands
-;;;; This is meant to be like ~/src/dotfiles/bin & ~/src/dotfiles/scripts, not
-;;;; so much about Emacs startup, except that we do want them always loaded.
;; This is an alternative way to activate the mark temporarily when
;; `transient-mark-mode' is off, and whether it's on or off, makes it
@@ -1938,15 +1750,6 @@ Some ideas behind these behaviours are as follows.
(add-hook 'isearch-mode-end-hook hook nil t)))
(define-key spw/ctl-z-map "\s" #'spw/ensure-whole-lines-mode)
-;; If know the name of group might try `gnus-read-ephemeral-gmane-group' (and
-;; if that works well, might want to make this function prompt for a group to
-;; pass to that function, and if blank, do what function does now).
-(defun spw/browse-gmane ()
- (interactive)
- (gnus-no-server)
- (gnus-group-browse-foreign-server '(nntp "news.gmane.io")))
-(global-set-key "\C-cgG" #'spw/browse-gmane)
-
(defun spw/org-reformat-subtree ()
(interactive)
;; we have to set the mark, rather than just narrowing to the subtree, or
@@ -2023,14 +1826,6 @@ Some ideas behind these behaviours are as follows.
(global-set-key "\C-cD" #'spw/delete-visited-file)
(global-set-key "\C-cvD" #'spw/vc-delete-visited-file)
-(defun spw/link-stat-block (start end)
- (interactive "r")
- (when-let ((region-text (buffer-substring start end)))
- (org-insert-link
- nil
- (concat "file:~/annex/gaming/5eblocks/" region-text ".png")
- region-text)))
-
;; Possibly this should be replaced with something like `project-find-regexp'
;;
;; Input e.g.: lisp "Emacs configuration"
@@ -2044,21 +1839,6 @@ Some ideas behind these behaviours are as follows.
nil (expand-file-name "~/doc")))
(global-set-key "\C-cog" #'spw/git-grep-docs)
-;; this is called by .dir-locals.el in ~/doc/{pres,papers}
-(defun spw/set-pandoc-compile-command (&rest exts)
- (setq-local compile-command
- (concat "make "
- (mapconcat
- (lambda (ext)
- (file-name-nondirectory
- (concat (file-name-sans-extension
- (buffer-file-name))
- "."
- ext)))
- (or exts '("pdf"))
- " ")))
- (local-set-key "\C-z\C-c" #'compile))
-
(defun spw/all-programming-projects ()
(call-process "src-register-all")
(let ((default-directory (expand-file-name "~/src")))
@@ -2134,36 +1914,6 @@ Some ideas behind these behaviours are as follows.
(display-buffer buffer))))
(global-set-key "\C-cvc" #'spw/clone-repo)
-;; author unknown
-(defun spw/toggle-frame-split ()
- "Toggle the orientation of a two-window split.
-
-Useful after resizing the frame."
- (interactive)
- (when (= (count-windows) 2)
- (let* ((this-win-buffer (window-buffer))
- (next-win-buffer (window-buffer (next-window)))
- (this-win-edges (window-edges (selected-window)))
- (next-win-edges (window-edges (next-window)))
- (this-win-2nd (not (and (<= (car this-win-edges)
- (car next-win-edges))
- (<= (cadr this-win-edges)
- (cadr next-win-edges)))))
- (splitter
- (if (= (car this-win-edges)
- (car (window-edges (next-window))))
- 'split-window-horizontally
- 'split-window-vertically)))
- (delete-other-windows)
- (let ((first-win (selected-window)))
- (funcall splitter)
- (when this-win-2nd (other-window 1))
- (set-window-buffer (selected-window) this-win-buffer)
- (set-window-buffer (next-window) next-win-buffer)
- (select-window first-win)
- (when this-win-2nd (other-window 1))))))
-(define-key spw/personal-bindings-mode-map "\M-5" #'spw/toggle-frame-split)
-
(defun spw/maybe-toggle-split-after-resize (frame)
(when (and (framep frame)
(frame-size-changed-p frame)
@@ -2251,78 +2001,6 @@ Useful after resizing the frame."
(interactive)
(spw/myrepos-global-action "sync")))
-;; There are many variations on this online. This one by Robert Bost, based
-;; on work by Steve Yegge, Colin Doering and others
-(defun spw/rotate-windows (arg)
- "Rotate your windows, reversing direction if ARG."
- (interactive "P")
- (if (not (> (count-windows) 1))
- (message "You can't rotate a single window!")
- (let* ((rotate-times (prefix-numeric-value arg))
- (direction (if (or (< rotate-times 0) (equal arg '(4)))
- 'reverse 'identity)))
- (dotimes (_ (abs rotate-times))
- (dotimes (i (- (count-windows) 1))
- (let* ((w1 (elt (funcall direction (window-list)) i))
- (w2 (elt (funcall direction (window-list)) (+ i 1)))
- (b1 (window-buffer w1))
- (b2 (window-buffer w2))
- (s1 (window-start w1))
- (s2 (window-start w2))
- (p1 (window-point w1))
- (p2 (window-point w2)))
- (set-window-buffer-start-and-point w1 b2 s2 p2)
- (set-window-buffer-start-and-point w2 b1 s1 p1)))))))
-;; This gets this key because we're likely to want to invoke it repeatedly.
-(define-key spw/personal-bindings-mode-map "\M-6" #'spw/rotate-windows)
-
-;; some influence here from Michael Stapelberg's config -- we both had a
-;; function to do this, I discovered
-(defun spw/recipient-first-name ()
- "Attempt to extract the first name of the recipient of a `message-mode' message.
-
-Used in my `message-mode' yasnippets."
- (if-let ((to (save-excursion
- (save-restriction
- (message-narrow-to-headers-or-head)
- (message-fetch-field "To")))))
- (let ((full-name (car (mail-extract-address-components to))))
- (if (string-match "\\([^ ]+\\)" full-name)
- (let ((first-name (match-string 0 full-name)))
- (cond
- ;; some names which may be in a longer form in the From header
- ;; but which I would never type out in full in a salutation
- ((string= first-name "Nathaniel") "Nathan")
- ((string= first-name "Thomas") "Tom")
- (t first-name)))
- ;; no spaces -- assume whole thing is an alias and use it
- full-name))
- ""))
-
-(spw/define-skeleton spw/message-dear
- (message-mode :abbrev "dear" :file "message")
- ""
- (completing-read "Dear " (ignore-errors (list (spw/recipient-first-name))))
- '(when (setq v1 (looking-at ">")) (forward-line -2))
- "Dear " str "," \n \n
- '(when v1 (forward-line 2)))
-
-(spw/define-skeleton spw/message-hello
- (message-mode :abbrev "hl" :file "message")
- ""
- (completing-read "Hello " (ignore-errors (list (spw/recipient-first-name))))
- '(when (setq v1 (looking-at ">")) (forward-line -2))
- "Hello " str '(when (zerop (length str)) (delete-backward-char 1)) "," \n \n
- '(when v1 (forward-line 2)))
-
-(spw/define-skeleton spw/message-thanks
- (message-mode :abbrev "ty" :file "message")
- ""
- (completing-read "Dear " (ignore-errors (list (spw/recipient-first-name))))
- '(when (setq v1 (looking-at ">")) (forward-line -2))
- "Dear " str "," \n \n "Thank you for your e-mail." \n \n
- '(when v1 (forward-line 2)))
-
(defun spw/copy-to-annotated ()
(interactive)
(let* ((source (expand-file-name (dired-file-name-at-point)))
@@ -2572,56 +2250,6 @@ Called by '~/src/dotfiles/bin/emacsclient --spw/update-environment'."
(not (string= (daemonp) "gdbmacs"))
(eq (server-running-p "gdbmacs") t)))
-;; open a frame on a new workspace with only the relevant dired buffer open,
-;; eval this form: (global-set-key "\C-cG" #'spw/grading-advance)
-;; and then use C-c G to open the first item (will need C-c f t after just
-;; this first one, and also maybe C-i =)
-(defun spw/grading-advance ()
- (interactive)
- (unless (eq major-mode 'dired-mode)
- (when (eq major-mode 'org-mode)
- (ignore-errors (org-ctrl-c-ctrl-c)))
- (save-buffer)
- (other-window 1))
- (dired-display-file)
- (dired-next-line 1)
- (let ((pdf (dired-get-filename)))
- (dired-next-line 1)
- (other-window 1)
- (goto-char (point-min))
-
- ;; assignment-specific
- (search-forward "Grammar")
- (org-cycle)
- (set-goal-column nil)
- ;; (overwrite-mode 1)
-
- (start-process "pdf" "pdf" "xdg-open" pdf)
- (sleep-for 1)
- (call-process-shell-command
- (concat (if (executable-find "i3-msg") "i3-msg" "swaymsg")
- " move right"))
- (let ((pdf-words (substring (with-temp-buffer
- (call-process-shell-command
- (concat "pdftotext "
- (shell-quote-argument pdf)
- " - | wc -w")
- nil
- (current-buffer))
- (buffer-string))
- 0
- -1)))
- (message (concat pdf-words " words")))))
-
-(defun spw/untabify-project ()
- (interactive)
- (save-window-excursion
- (dolist (file (project-files
- (project-current nil (project-prompt-project-dir))))
-
- (find-file file)
- (untabify (point-min) (point-max)))))
-
(defun spw/go-to-consfig ()
(interactive)
;; (let ((repo (expand-file-name "~/src/cl/consfig")))
@@ -2707,32 +2335,6 @@ Called by '~/src/dotfiles/bin/emacsclient --spw/update-environment'."
(string-join (cons "rm -f config.cache; ./configure -C" (cdr conf)) " ")
nil :system t)))
-(defun spw/read-athenet-lxc ()
- (let (lxcs
- (file (expand-file-name "~/src/cl/consfig/hosts.lisp")))
- (unless (file-exists-p file)
- (user-error "Looks like consfig not checked out"))
- (with-current-buffer (find-file-noselect file)
- (save-excursion
- (save-restriction
- (widen)
- (goto-char (point-min))
- (while (re-search-forward
- "(define-athenet-container \\([a-z0-9-.]+\\)
-\\s-*\"\\([a-z0-9-.]+\\)"
- nil t)
- (push (list (substring-no-properties (match-string 1))
- (substring-no-properties (match-string 2)))
- lxcs)))))
- (assoc (completing-read "LXC: " lxcs nil t) lxcs #'string=)))
-
-(defun spw/ssh-and-lxc-attach-term (container host)
- (interactive (spw/read-athenet-lxc))
- (start-process "ssh-and-tmux" nil "foot" "ssh-and-tmux" host
- (format "--container-name=%s" container)
-"--container-cmd=lxc-unpriv-attach -n %s --keep-var TERM --clear-env -vHOME=/root"))
-(global-set-key "\C-cgL" #'spw/ssh-and-lxc-attach-term)
-
(defun spw/proced-root ()
(interactive)
(require 'proced)
@@ -2797,6 +2399,7 @@ Called by '~/src/dotfiles/bin/emacsclient --spw/update-environment'."
;; `compile' or `project-compile' is called, and one Emacs frame/tab for GUD.
(defun spw/run-or-restore-gud (arg)
(interactive "P")
+ (require 'gdb-mi)
(if (or arg (not (and (bound-and-true-p gud-comint-buffer)
(get-buffer-process gud-comint-buffer))))
;; Start a new debugging session even if one already exists.
@@ -2825,7 +2428,7 @@ Called by '~/src/dotfiles/bin/emacsclient --spw/update-environment'."
(interactive)
(let ((string (ignore-errors (cdr (bounds-of-thing-at-point 'string)))))
(fill-region-as-paragraph
- (car (bounds-of-thing-at-point 'sentence))
+ (point)
(cond (string (min string (cdr (bounds-of-thing-at-point 'paragraph))))
((cl-fifth (syntax-ppss))
(min (cdr (bounds-of-thing-at-point 'paragraph))
@@ -2848,6 +2451,25 @@ Called by '~/src/dotfiles/bin/emacsclient --spw/update-environment'."
(global-set-key "\C-ce" #'spw/fill-rest-of-paragraph)
(global-set-key "\C-cj" "\M-j\C-ce")
+(defun spw/backward-upcase-sexp (arg &optional interactive)
+ (interactive "p\nd")
+ (upcase-region (save-excursion (backward-sexp arg interactive)
+ (point))
+ (point)))
+(define-key spw/ctl-z-map "\C-u" #'spw/backward-upcase-sexp)
+
+(defun spw/qrencode-region (beg end)
+ (interactive "r")
+ (let ((buf (get-buffer-create "*qrencode*")))
+ (with-current-buffer buf
+ (let ((inhibit-read-only t))
+ (erase-buffer)))
+ (call-process-region beg end "qrencode" nil buf nil "-s10" "-o-")
+ (with-current-buffer buf
+ (image-mode))
+ (display-buffer buf)))
+
+;;;; "Miscellaneous functions & commands" page ends here
;;;; Terminal emulation
@@ -2876,6 +2498,43 @@ Called by '~/src/dotfiles/bin/emacsclient --spw/update-environment'."
;;;; Composing mail
+(custom-theme-set-variables
+ 'user
+ ;; So locmaint will catch them.
+ '(message-auto-save-directory "~/tmp/")
+
+ '(message-citation-line-format "On %a %d %b %Y at %I:%M%p %Z, %N wrote:\12")
+ '(message-citation-line-function 'message-insert-formatted-citation-line)
+
+ ;; For compatibility.
+ '(message-forward-as-mime nil)
+ '(message-forward-before-signature nil)
+ '(message-forward-included-headers
+ '("^From:" "^Subject:" "^Date:" "^To:" "^Cc:" "^Message-ID:"))
+ '(message-make-forward-subject-function '(message-forward-subject-fwd))
+
+ '(message-ignored-resent-headers
+ "^Return-receipt\\|^X-Gnus\\|^Gnus-Warning:\\|^>?From \\|^Delivered-To:\\|^\\(?:X-\\)?Content-Length:\\|^X-UIDL:\\|^X-TUID:\\|^\\(?:X-\\)?Status:\\|^Lines:")
+
+ ;; Bypass MTA rewriting user@localhost.
+ '(message-sendmail-envelope-from 'header)
+
+ '(message-wash-forwarded-subjects t)
+ '(mm-decrypt-option 'known)
+ '(mm-default-directory "~/tmp/")
+ '(mm-file-name-rewrite-functions
+ '(mm-file-name-delete-control mm-file-name-delete-gotchas
+ mm-file-name-trim-whitespace
+ mm-file-name-collapse-whitespace
+ mm-file-name-replace-whitespace))
+
+ ;; So I can read copies in my sent mail directory.
+ '(mml-secure-openpgp-encrypt-to-self t)
+
+ '(mml-secure-openpgp-sign-with-sender t)
+ '(nnmail-extra-headers '(To Cc List-Id))
+ '(notmuch-address-use-company nil))
+
(defvar spw/debian-bts-pseudoheader-regexp
;; "^\\([A-Za-z][a-z]+: [^ ]+\\|[cC]ontrol: .+\\)$"
"^[A-Za-z][a-z]+: [^ ]+"
@@ -3064,6 +2723,9 @@ mutt's review view, after exiting EDITOR."
(require 'notmuch-address) (notmuch-address-setup))
(add-hook 'message-mode-hook #'footnote-mode)
+ (spw/when-library-available orgalist
+ (add-hook 'message-mode-hook #'orgalist-mode))
+ (add-hook 'message-mode-hook #'orgtbl-mode)
(define-key message-mode-map
[remap message-newline-and-reformat] #'spw/message-newline-and-reformat)
@@ -3076,6 +2738,15 @@ mutt's review view, after exiting EDITOR."
;;;; Dired
+(custom-theme-set-variables
+ 'user
+ '(dired-clean-up-buffers-too nil)
+ '(dired-dwim-target t)
+ '(dired-free-space 'separate)
+ '(dired-listing-switches "--group-directories-first -alh")
+ '(dired-omit-files "\\`[.]?#\\|\\`[.][.]?\\'\\|\\`\\.git\\'")
+ '(dired-recursive-copies 'always))
+
;; this is the way you're meant to request dired-aux, not just dired-x,
;; according to (info "(dired-x) Installation")
(with-eval-after-load 'dired (require 'dired-x))
@@ -3152,7 +2823,7 @@ mutt's review view, after exiting EDITOR."
"&" #'spw/dired-copy-filename-as-kill)
-;;;; EWW
+;;;; EWW / shr
;; this should ensure that M-a and M-e work for most webpages
(add-hook 'eww-mode-hook (lambda ()
@@ -3182,9 +2853,66 @@ mutt's review view, after exiting EDITOR."
(setq-local bookmark-make-record-function
#'spw/bookmark-eww-bookmark-make-record)))
+(customize-set-variable 'nov-text-width 78)
+(spw/when-library-available nov
+ (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)))
+
;;;; Gnus
+(custom-theme-set-variables
+ 'user
+ '(gnus-article-skip-boring t)
+ '(gnus-auto-center-summary nil)
+ '(gnus-auto-select-next 'slightly-quietly)
+ '(gnus-buttonized-mime-types
+ '("text/x-\\(?:diff\\|patch\\)" "multipart/\\(?:alternative\\|signed\\)"))
+ '(gnus-directory "~/local/News/")
+ '(gnus-extra-headers '(To Cc List-Id))
+ '(gnus-gcc-mark-as-read t)
+ '(gnus-global-score-files '("~/doc/News/"))
+ '(gnus-interactive-exit 'quiet)
+ '(gnus-kill-files-directory "~/src/athpriv/News/")
+
+ ;; Would prefer nil but t seems advisable for notmuch groups.
+ '(gnus-kill-summary-on-exit t)
+
+ '(gnus-large-ephemeral-newsgroup 8000)
+ '(gnus-large-newsgroup 8000)
+ '(gnus-mark-article-hook '(spw/gnus-mark-article-hook))
+ '(gnus-message-archive-group "sent")
+ '(gnus-message-archive-method '(nnmaildir "fmail" (directory "~/.fmail/")))
+ '(gnus-permanently-visible-groups "^nnmaildir\\+fmail:\\(?:notes\\|sent\\)$")
+ '(gnus-read-newsrc-file nil)
+ '(gnus-refer-thread-use-search '(("nnmaildir:fmail")))
+ '(gnus-save-killed-list
+ "^\\(?:[^n]\\|n[^n]\\|nn[^s]\\|nns[^e]\\|nnse[^l]\\|nnsel[^e]\\|nnsele[^c]\\|nnselec[^t]\\|nnselect[^:]\\)")
+ '(gnus-save-newsrc-file nil)
+ '(gnus-search-default-engines '((nnmaildir . notmuch)))
+ '(gnus-search-notmuch-remove-prefix "~/.fmail/")
+ '(gnus-secondary-select-methods
+ '((nnmaildir "fmail" (directory "~/.fmail/"))))
+ '(gnus-sum-thread-tree-false-root "")
+ '(gnus-sum-thread-tree-indent " ")
+ '(gnus-sum-thread-tree-leaf-with-other "├► ")
+ '(gnus-sum-thread-tree-root "")
+ '(gnus-sum-thread-tree-single-leaf "╰► ")
+ '(gnus-sum-thread-tree-vertical "│")
+ '(gnus-summary-line-format "%U%R%z %(%12&user-date; %*%-23,23f%) %B%s\12")
+ '(gnus-summary-mode-line-format "Gnus: %u&summary;%g [%A] %Z")
+ '(gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references)
+ '(gnus-suppress-duplicates t)
+ '(gnus-thread-sort-functions
+ '(gnus-thread-sort-by-number gnus-thread-sort-by-total-score))
+ '(gnus-topic-display-empty-topics nil)
+ '(gnus-update-message-archive-method t)
+ '(gnus-user-date-format-alist
+ '((32042 . "%2l:%M%#p")
+ (118823 . "Yest %2l:%M%#p")
+ (604800 . "%a %2l:%M%#p")
+ (16102447 . "%d %B")
+ (t . "%Y-%b-%d"))))
+
(with-eval-after-load 'gnus
(cond ((spw/on-host-p "chiark.greenend.org.uk")
(setq gnus-select-method
@@ -3890,7 +3618,8 @@ unread."
;; `gnus-summary-save-parts' has some alternative ways to get the handles
;; if `gnus-article-mime-handles' is nil.
(let ((handles gnus-article-mime-handles))
- (when (stringp (car handles)) (pop handles))
+ (when (stringp (car handles))
+ (setq handles (cdr handles)))
(mapc #'mm-save-part (cl-remove-if-not #'mm-handle-filename handles)))))
(with-eval-after-load 'gnus-sum
@@ -3906,25 +3635,39 @@ unread."
(gnus-summary-goto-article article)))
(advice-add 'org-gnus-follow-link :around #'spw/org-gnus-follow-link)
-(defun spw/gnus-fastmail-trash (n)
+(defun spw/gnus-purelymail-trash (n)
(interactive "p")
(gnus-summary-move-article n "nnmaildir+fmail:trash"))
(with-eval-after-load 'gnus-sum
(define-key gnus-summary-mode-map
- [remap gnus-summary-delete-article] #'spw/gnus-fastmail-trash))
+ [remap gnus-summary-delete-article] #'spw/gnus-purelymail-trash))
-(defun spw/gnus-fastmail-learn-spam (n)
+(defun spw/gnus-purelymail-learn-spam (n)
(interactive "p")
(save-excursion (gnus-summary-mark-forward n))
- (gnus-summary-move-article n "nnmaildir+fmail:spam")
+ (gnus-summary-move-article n "nnmaildir+fmail:junk")
(gnus-summary-next-unread-article))
(with-eval-after-load 'gnus-sum
- (define-key gnus-summary-mode-map [f5] #'spw/gnus-fastmail-learn-spam)
- (define-key gnus-summary-mode-map "\C-z\C-s" #'spw/gnus-fastmail-learn-spam))
+ (define-key gnus-summary-mode-map [f5] #'spw/gnus-purelymail-learn-spam)
+ (define-key gnus-summary-mode-map "\C-z\C-s" #'spw/gnus-purelymail-learn-spam))
;;;; rcirc
+(custom-theme-set-variables
+ 'user
+ '(rcirc-default-full-name "Sean Whitton [spwhitton@spwhitton.name]")
+ '(rcirc-default-nick "spwhitton")
+ '(rcirc-default-user-name "spwhitton")
+ '(rcirc-display-server-buffer nil)
+ '(rcirc-log-directory "~/local/irclogs")
+ '(rcirc-log-filename-function 'spw/rcirc-generate-log-filename)
+ '(rcirc-log-flag t)
+ '(rcirc-time-format "%b/%d %H:%M ")
+ '(rcirc-track-abbreviate-flag nil)
+ '(rcirc-track-ignore-server-buffer-flag t)
+ '(rcirc-track-minor-mode t))
+
(defun spw/rcirc-generate-log-filename (process target)
(concat (file-name-concat (format-time-string "%Y/%m")
(process-name process) (or target "server"))
@@ -4004,6 +3747,28 @@ unread."
;;;; VC
+(custom-theme-set-variables
+ 'user
+ '(git-rebase-confirm-cancel nil)
+ '(vc-deduce-backend-nonvc-modes t)
+ '(vc-find-revision-no-save t)
+ '(vc-follow-symlinks t)
+
+ ;; We might also consider -B.
+ '(vc-git-diff-switches '("--patch-with-stat" "-M" "-C"))
+
+ ;; Drop the name & date to make more of the commit message visible.
+ '(vc-git-root-log-format
+ '("%d%h..: %s"
+ "^\\(?:[*/\\| ]+ \\)?\\(?2: ([^)]+)\\)?\\(?1:[0-9a-z]+\\)\\.\\.: "
+ ((1 'log-view-message) (2 'change-log-list nil lax)))))
+
+;; Avoid `log-edit-show-files' window becoming most recently used for C-x o.
+(with-eval-after-load 'log-edit
+ (customize-set-variable 'log-edit-hook
+ (cons 'spw/log-edit-show-diff
+ (delete 'log-edit-show-files log-edit-hook))))
+
(require 'git-commit nil t)
(spw/when-library-available mailscripts
@@ -4016,7 +3781,7 @@ unread."
"vt" notmuch-extract-thread-patches-to-project
"vw" mailscripts-extract-message-patches-to-project))
-;; Emacs 30: move into `custom-set-variables'.
+;; Emacs 30: move into `custom-theme-set-variables' call.
(when (>= emacs-major-version 30)
(setopt vc-git-log-switches '("--format=fuller" "--stat")))
@@ -4269,70 +4034,12 @@ unread."
(global-set-key "\C-cvf" 'spw/vc-next-action-for-git-fixup)
-;;;; Assorted packages
-
-;; message-mode is sensitive to trailing whitespace in sig dashes and empty
-;; headers. markdown-mode is sensitive in empty headers (e.g. "# " which I
-;; use in writing essays) and newlines that indicate paragraph flow (obscure
-;; Markdown feature)
-;;
-;; The message-mode case is handled by `spw/normalise-message', which is
-;; better than setting `ws-butler-trim-predicate' to a complicated function
-;; because the code in `spw/normalise-message' gets called less often. Could
-;; try setting `ws-butler-trim-predicate' to handle the markdown-mode case,
-;; but chances are someday I'll want to use that obscure markdown-mode feature
-(define-globalized-minor-mode spw/ws-butler-global-mode ws-butler-mode
- (lambda () (when (buffer-file-name) (ws-butler-mode 1)))
- :predicate '((not markdown-mode
- message-mode
- lisp-interaction-mode)
- prog-mode text-mode))
-(spw/ws-butler-global-mode 1)
-
-(autoload 'redtick "redtick")
-(global-set-key "\C-cP" #'redtick)
-(autoload 'redtick-mode "redtick")
-(global-set-key "\C-cgP" #'redtick-mode)
-
-(with-eval-after-load 'org-d20
- (setq org-d20-dice-sound
- "~/annex/media/sounds/147531__ziembee__diceland.wav"
- org-d20-display-rolls-buffer t
- ;; the roll20 tokens I'm using for NPCs are lettered
- org-d20-letter-monsters t
- ;; ... and they come in only two colours, so let's just have
- ;; one monster per letter
- org-d20-continue-monster-numbering t)
-
- (define-key org-d20-mode-map [f5] #'org-d20-initiative-dwim)
- (define-key org-d20-mode-map [f6] #'org-d20-damage)
-
- (define-key org-d20-mode-map [f7] (lambda (arg)
- (interactive "P")
- (call-interactively
- (if arg
- #'org-d20-roll-last
- #'org-d20-roll))))
- (define-key org-d20-mode-map [f8] #'org-d20-roll-at-point)
- (define-key org-d20-mode-map [f9] (lambda (arg)
- (interactive "P")
- (call-interactively
- (if arg
- #'org-d20-d%
- #'org-d20-d20)))))
+;;;; Haskell
-(spw/when-library-available nov
- (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)))
-
-(setq ggtags-mode-line-project-name nil)
-
-(spw/when-library-available ggtags
- (dolist (hook '(cperl-mode-hook c-mode-hook))
- (add-hook hook #'ggtags-mode)))
-
-(spw/when-library-available rainbow-mode
- (dolist (hook '(html-mode-hook css-mode-hook))
- (add-hook hook 'rainbow-mode)))
+(custom-theme-set-variables
+ 'user
+ '(haskell-indentation-layout-offset 4)
+ '(haskell-indentation-left-offset 4))
(spw/feature-add-hook subword-mode haskell-mode)
@@ -4349,10 +4056,16 @@ unread."
nil t))
haskell-mode))
-(spw/when-library-available orgalist
- (spw/feature-add-hook orgalist-mode message))
+
+;;;; Bongo
-(spw/feature-add-hook orgtbl-mode message)
+(custom-theme-set-variables
+ 'user
+ '(bongo-default-directory "~/annex/music/")
+ '(bongo-insert-album-covers t)
+ '(bongo-insert-whole-directory-trees t)
+ '(bongo-mode-line-indicator-mode nil)
+ '(bongo-prefer-library-buffers nil))
(spw/feature-add-hook (lambda ()
(dired-hide-details-mode
@@ -4388,14 +4101,6 @@ unread."
;; 'v' again to exit
(global-set-key "\C-cgv" #'volume)
-(with-eval-after-load 'elpher
- ;; standard Emacs conventions
- (define-key elpher-mode-map "l" #'elpher-back)
- (define-key elpher-mode-map "d" #'elpher-back-to-start)
- (define-key elpher-mode-map "<" #'elpher-root-dir)
-
- (add-hook 'elpher-mode-hook (lambda () (variable-pitch-mode 1))))
-
;;;; Lisp
@@ -4465,15 +4170,6 @@ unread."
(with-temp-buffer (call-interactively #'hyperspec-lookup)))
(global-set-key "\C-cgh" #'spw/hyperspec-lookup)
-;; `inf-lisp' says this is a defcustom and `slime' says it is a defvar, so
-;; `custom-save-variables' will print the NOW field in the corresponding
-;; argument to `custom-set-variables' as t or nil depending on whether or not
-;; `inf-lisp' and/or `slime' happen to be loaded, and possibly even depending
-;; on the order in which they were loaded. To prevent spurious changes to the
-;; NOW field randomly showing up in git diffs of init.el, set the variable
-;; without using the customisation interface.
-(setq inferior-lisp-program "sbcl")
-
(defvar spw/last-command-was-slime-async-eval nil)
(defvar spw/last-slime-async-eval-command-frame nil)
@@ -4537,22 +4233,6 @@ that the user is expecting that it might pop up."
(defslime-repl-shortcut nil ("clear-source-registry")
(:handler #'spw/slime-clear-source-registry)))
-(defun spw/comment-form (n)
- "Replacement for \\[comment-line] in Lisp modes which is more
-likely to keep parentheses balanced."
- (interactive "p")
- (if (use-region-p)
- (comment-line n)
- (let ((begin (point))
- (end (line-end-position)))
- (skip-chars-forward "; \t" end)
- (forward-sexp)
- (unless (> (point) (line-end-position))
- (comment-or-uncomment-region begin (point))))))
-(define-key lisp-mode-shared-map [?\C-x ?\C-\;] #'spw/comment-form)
-(when (boundp 'lisp-data-mode-map) ; Emacs 27
- (define-key lisp-data-mode-map [?\C-x ?\C-\;] #'spw/comment-form))
-
;; Loading `slime' puts `slime-macrostep' on `load-path'.
;; `slime-macrostep' knows how to load an embedded copy of `macrostep'.
(with-eval-after-load 'slime (require 'slime-macrostep))
@@ -4787,6 +4467,97 @@ before uploading to NEW again." \n \n
;;;; Org-mode
+(custom-theme-set-faces
+ 'user
+ '(org-code ((t (:inherit (shadow fixed-pitch)))))
+ '(org-date ((t (:inherit fixed-pitch :foreground "Purple" :underline t))))
+ '(org-verbatim ((t (:inherit (shadow fixed-pitch))))))
+
+(custom-theme-set-variables
+ 'user
+ ;; Sometimes set to nil in .dir-locals.el, e.g. in ~/doc/newpapers.
+ '(org-adapt-indentation t nil)
+
+ '(org-agenda-entry-text-maxlines 3)
+ '(org-agenda-files "~/doc/org-agenda-files")
+ '(org-agenda-persistent-filter t)
+ '(org-agenda-remove-times-when-in-prefix 'beg)
+
+ ;; Interacts badly with `tab-bar-history-mode'.
+ '(org-agenda-restore-windows-after-quit nil)
+
+ '(org-agenda-skip-deadline-if-done t)
+ '(org-agenda-skip-deadline-prewarning-if-scheduled 3)
+ '(org-agenda-skip-scheduled-if-deadline-is-shown 'not-today)
+ '(org-agenda-skip-scheduled-if-done t)
+ '(org-agenda-skip-timestamp-if-done t)
+ '(org-agenda-start-on-weekday nil)
+ '(org-agenda-sticky t)
+ '(org-agenda-timegrid-use-ampm t)
+ '(org-agenda-todo-ignore-scheduled 'future)
+ '(org-agenda-window-setup 'current-window)
+ '(org-archive-location "~/doc/archive/howm/archive.org::* From %s")
+ '(org-archive-save-context-info '(time file olpath))
+ '(org-archive-subtree-save-file-p t)
+ '(org-blank-before-new-entry '((heading . t) (plain-list-item . auto)))
+
+ ;; Turn off to avoid git merge conflicts.
+ '(org-bookmark-names-plist nil)
+
+ '(org-cycle-separator-lines 0)
+ '(org-deadline-warning-days 60)
+ '(org-default-notes-file "~/doc/howm/refile.org")
+ '(org-directory "~/doc/howm/")
+ '(org-enforce-todo-checkbox-dependencies t)
+ '(org-enforce-todo-dependencies t)
+ '(org-fold-catch-invisible-edits 'show)
+ '(org-fold-show-context-detail
+ '((agenda . local) (bookmark-jump . lineage) (isearch . lineage)
+ (default . ancestors-full)))
+ '(org-footnote-section "Notes")
+ '(org-imenu-depth 4)
+
+ ;; So I can start lines with \"P. 211 - \" to refer to p. 211, rather than
+ ;; starting a list.
+ '(org-list-allow-alphabetical nil)
+
+ '(org-list-demote-modify-bullet
+ '(("-" . "+") ("+" . "*") ("*" . "-") ("1." . "-") ("1)" . "-")))
+ '(org-list-use-circular-motion t)
+ '(org-log-done 'time)
+ '(org-log-into-drawer t)
+
+ ;; Cluttering, and information probably in git.
+ '(org-log-repeat nil)
+
+ '(org-log-states-order-reversed nil)
+
+ ;; Desirable with `icomplete-mode'.
+ '(org-outline-path-complete-in-steps nil)
+
+ '(org-read-date-prefer-future 'time)
+ '(org-refile-allow-creating-parent-nodes 'confirm)
+ '(org-refile-targets '((org-agenda-files :maxlevel . 5) (nil :maxlevel . 5)))
+ '(org-refile-use-outline-path 'file)
+ '(org-special-ctrl-a/e t)
+ '(org-special-ctrl-k t)
+ '(org-startup-folded nil)
+
+ ;; Ensures buffer text doesn't go beyond 80 columns.
+ '(org-startup-indented nil)
+
+ '(org-tags-match-list-sublevels 'indented)
+ '(org-todo-keyword-faces
+ '(("SOMEDAY" :foreground "#0000FF" :weight bold)
+ ("NEXT" :foreground "#DD0000" :weight bold)))
+ '(org-todo-keywords
+ '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
+ (sequence "WAITING(w@)" "SOMEDAY(s)" "|" "CANCELLED(c)")))
+ '(org-treat-S-cursor-todo-selection-as-state-change nil)
+ '(org-treat-insert-todo-heading-as-state-change t)
+ '(org-use-fast-todo-selection 'expert)
+ '(org-yank-folded-subtrees nil))
+
(global-set-key "\C-coc" #'org-capture)
(global-set-key "\C-col" #'org-store-link)
(global-set-key "\C-coa" #'org-agenda)
@@ -4841,17 +4612,17 @@ before uploading to NEW again." \n \n
("m" ((in-mode . "gnus-summary-mode"))))
org-capture-templates
'(("t" "Task to be refiled" entry (file org-default-notes-file)
- "* TODO %^{Title}\n%?")
+ "* TODO %^{Title}\n%?"
+ :empty-lines 1)
("T" "Task to be refiled" entry (file org-default-notes-file)
- "* TODO %^{Title}\n%?")
+ "* TODO %^{Title}\n%?"
+ :empty-lines 1)
("n" "Information to be refiled" entry (file org-default-notes-file)
- "* %^{Title}\n%?")
+ "* %^{Title}\n%?"
+ :empty-lines 1)
("m" "Task from mail to be refiled" entry (file org-default-notes-file)
- ;; Lisp is to filter square brackets out of the subject as these mean that
- ;; the Org-mode link does not properly form. In Org 9.3, the escaping
- ;; syntax for links has changed, so might be able to do something smarter
- ;; than this
- "* TODO [[gnus:%:group#%:message-id][%^{Title|\"%(replace-regexp-in-string \"\\\\\\[\\\\\\|\\\\\\]\" \"\" \"%:subject\")\" from %:fromname}]]\n%?")
+ "* TODO [[gnus:%:group#%:message-id][%^{Title|%:fromname ⁘ %:subject}]]\n%?"
+ :empty-lines 1)
;; ("a" "Appointment" entry (file+datetree "~/doc/howm/diary.org")
;; "* %^{Time} %^{Title & location}
@@ -4861,11 +4632,13 @@ before uploading to NEW again." \n \n
;; %^t" :immediate-finish t)
("s" "Task for the future to be refiled" entry (file org-default-notes-file)
- "* SOMEDAY %^{Title}\n%?")
- ("d" "Diary entry" entry (file+datetree "~/.labbook.gpg")
- "* %^{Title}\n%U\n\n%?")
+ "* SOMEDAY %^{Title}\n%?"
+ :empty-lines 1)
+ ("d" "Diary entry" entry (file+olp+datetree "~/.labbook.gpg") "* %U\n\n%?"
+ :jump-to-captured t :empty-lines 1 :tree-type month)
("u" "URI on clipboard" entry (file org-default-notes-file)
- "* SOMEDAY [[%^{URI|%x}][%^{Title}]]" :immediate-finish t)))
+ "* SOMEDAY [[%^{URI|%x}][%^{Title}]]"
+ :immediate-finish t :empty-lines 1)))
;; `org-forward-paragraph', `org-backward-paragraph' and `org-mark-element' do
;; not leave point where someone who uses `forward-paragraph',
@@ -4988,8 +4761,7 @@ Called by doccheckin script."
;; setting this means if we type C-c C-e o O then the PDF opens for inspection
(setq org-odt-preferred-output-format "pdf")
-(with-eval-after-load 'org
- (add-to-list 'org-file-apps '(system . "xdg-open %s")))
+(spw/feature-add-to-list org-file-apps org '(system . "xdg-open %s"))
;; ... but also ensure we get a .docx (would be better to make
;; `org-odt-preferred-output-format' accept a list)
@@ -4999,6 +4771,29 @@ Called by doccheckin script."
(org-odt-convert org-input "docx")))
(advice-add 'org-odt-export-to-odt :after #'spw/org-odt-export-docx)
+(custom-theme-set-variables
+ 'user
+ '(org-d20-dice-sound "~/annex/media/sounds/147531__ziembee__diceland.wav")
+ '(org-d20-display-rolls-buffer t)
+ ;; The Roll20 tokens I'm using for NPCs are lettered, and they come in only
+ ;; two colours, so one monster per letter.
+ '(org-d20-letter-monsters t)
+ '(org-d20-continue-monster-numbering t))
+(spw/feature-define-keys org-d20
+ [f5] org-d20-initiative-dwim
+ [f6] org-d20-damage
+ [f7] (lambda (arg)
+ (interactive "P")
+ (call-interactively (if arg
+ #'org-d20-roll-last
+ #'org-d20-roll)))
+ [f8] org-d20-roll-at-point
+ [f9] (lambda (arg)
+ (interactive "P")
+ (call-interactively (if arg
+ #'org-d20-d%
+ #'org-d20-d20))))
+
;;;; Org-mode agenda
@@ -5329,17 +5124,34 @@ different occasions."
;;;; Diary
+(custom-theme-set-variables
+ 'user
+ '(appt-display-diary nil)
+ '(appt-display-interval 6)
+ '(calendar-date-display-form
+ '((format "%s-%.2d-%.2d %.3s" year (string-to-number month)
+ (string-to-number day) dayname)))
+ '(calendar-date-style 'iso)
+ '(calendar-week-start-day 1)
+ '(diary-file "~/doc/diary")
+ '(diary-list-entries-hook
+ '(diary-include-other-diary-files diary-sort-entries))
+ '(diary-mark-entries-hook '(diary-mark-included-diary-files))
+ '(holiday-bahai-holidays nil)
+ '(holiday-hebrew-holidays nil)
+ '(holiday-islamic-holidays nil))
+
;; Don't bind `diary' globally as for viewing purposes we use Org agenda
;; bindings, and for editing purposes just C-x b suffices.
(global-set-key "\C-cC" #'calendar)
-(when (file-readable-p "~/doc/emacs-diary")
+(when (file-readable-p "~/doc/diary")
(require 'org-agenda) ; for `org-class'
(unless
(bound-and-true-p appt-timer) ; avoid msgs when `eval-buffer' init.el
(appt-activate 1))
(add-to-list 'auto-mode-alist
- `(,(format "\\`%s\\'" (expand-file-name "~/doc/emacs-diary"))
+ `(,(format "\\`%s\\'" (expand-file-name "~/doc/diary"))
. diary-mode)))
(defun spw/diary-archive-entry (year)
@@ -5350,7 +5162,7 @@ different occasions."
(let ((start (point)))
(forward-line 1)
(while (looking-at "[[:blank:]]+") (forward-line 1))
- (append-to-file start (point) (format "~/doc/archive/emacs-diary-%d" year))
+ (append-to-file start (point) (format "~/doc/archive/diary-%d" year))
(delete-region start (point))
(when (and (bolp) (eolp)) (delete-blank-lines))))
(with-eval-after-load 'diary-lib
@@ -5423,6 +5235,13 @@ We don't use the FILES parameter in the entry for \"d\" in
;;;; Howm
+(custom-theme-set-variables
+ 'user
+ '(howm-directory "~/doc/howm/")
+ '(howm-file-name-format "%Y/%Y-%m-%d-%H%M.org")
+ '(howm-keyword-file "~/doc/howm/.howm-keys")
+ '(howm-view-use-grep t))
+
(setq howm-prefix "\C-cc"
;; Use Org-mode style because our notes are in `org-mode'.
@@ -5491,59 +5310,52 @@ We don't use the FILES parameter in the entry for \"d\" in
(when (file-directory-p "~/doc/howm/") (require 'howm nil t))
-;;;; C and friends
-
-;; following setting also part of Linux kernel style, but it's from
-;; newcomment.el, not cc-mode, so must be set in addition to
-;; `c-default-style' -- and it's my preference in general
-(setq comment-style 'extra-line)
+;;;; CC mode
-(with-eval-after-load 'cc-mode
- ;; Use the mode-specific paren binding. Default M-( binding will insert
- ;; spaces before the paren which is not called for by all C styles
- (define-key c-mode-base-map "\M-(" #'c-electric-paren)
-
- ;; I've seen this interact badly with electric-indent-mode (which is now on
- ;; globally by default, and has been on locally in c-mode for longer I
- ;; believe) outside of comments, but I cannot currently reproduce the
- ;; problem. Can always just use C-M-j and M-q within comments
- (define-key c-mode-base-map (kbd "RET") #'c-context-line-break)
+(custom-theme-set-variables
+ 'user
+ '(c-default-style "linux")
+ '(comment-style 'extra-line))
- ;; would be nice to have a global version of this
- (define-key c-mode-base-map "\C-o" #'c-context-open-line))
+(spw/feature-define-keys ((cc-mode c-mode-base-map))
+ " " c-context-line-break
+ "\C-o" c-context-open-line)
-;; M-; is adequate for GNU-style comments. This is for other styles.
+;; M-; is enough for GNU-style comments. This is for other styles.
(spw/define-skeleton spw/cc-com (c-mode :abbrev "comm" :file 'cc-mode)
"" nil "/*" \n
" * " '(c-indent-line-or-region) - \n "*/" '(c-indent-line-or-region))
+(setq ggtags-mode-line-project-name nil)
+(spw/when-library-available ggtags
+ (spw/feature-add-hook ggtags-mode (cc-mode c-mode-hook) cperl-mode))
+
;;;; Perl
-(defun spw/perl-add-use (module)
- (interactive "suse ")
- (let ((line (concat "use " module
- (and (not (string-match ";$" module)) ";"))))
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward "^use " nil t))
- (forward-line 1)
- (open-line 1)
- (insert line)
- (message (concat "Inserted: " line)))))
+(custom-theme-set-variables
+ 'user
+ ;; See `cperl-indent-parens-as-block'.
+ '(cperl-close-paren-offset -4)
+
+ '(cperl-indent-level 4)
+
+ ;; Makes it easier to use longer names for subroutines.
+ '(cperl-indent-parens-as-block t)
+
+ '(cperl-lineup-step 1))
(defun spw/perltidy-region (begin end)
(interactive "r")
- (let ((perltidy-env (getenv "PERLTIDY")))
- (setenv "PERLTIDY"
- (or (concat (expand-file-name
- (locate-dominating-file
- (buffer-file-name)
- ".perltidyrc")) ".perltidyrc")
- perltidy-env))
- (shell-command-on-region begin end "perltidy -q" nil t)
- (font-lock-ensure)
- (setenv "PERLTIDY" perltidy-env)))
+ (let* ((dominating (locate-dominating-file default-directory ".perltidyrc"))
+ (process-environment
+ (if dominating
+ (cons (format "PERLTIDY=%s"
+ (expand-file-name ".perltidyrc" dominating))
+ process-environment)
+ process-environment)))
+ (shell-command-on-region begin end "perltidy -q" nil t))
+ (font-lock-ensure))
;; an older version of this would use the region if it's active, but that
;; rarely produces good results -- perltidy would get the indentation wrong
@@ -5576,11 +5388,9 @@ We don't use the FILES parameter in the entry for \"d\" in
(forward-sexp)
(forward-line)
(spw/perltidy-region begin (point))))))))
+(spw/feature-define-keys cperl-mode "\C-z\C-c" spw/perltidy-block-or-buffer)
-(spw/feature-define-keys cperl-mode
- "\C-ciu" spw/perl-add-use "\C-z\C-c" spw/perltidy-block-or-buffer)
-
-;; TODO Take "head" as input too so that we can do =method and =func too.
+;; Might adapt this so that it can do =func and =method too.
(spw/define-skeleton spw/cperl-headsub (cperl-mode :abbrev "headsub")
""
"Name and arguments: "
@@ -5591,14 +5401,6 @@ We don't use the FILES parameter in the entry for \"d\" in
> _ \n
"}")
-(spw/define-skeleton spw/cperl-trytiny (cperl-mode :abbrev "try")
- ""
- nil
- "#<<<" \n
- "try {" \n _ ?\n
- "} catch {" '(cperl-indent-line) \n _ \n "};" '(cperl-indent-line)
- \n "#>>>")
-
;; This is for turning one-liners into small scripts.
(spw/define-skeleton spw/cperl-shebang (cperl-mode :abbrev "shebang")
"" (read-string "Command line options: " "-w") ; e.g. -wln
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..35f9d7e7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+.config/foot/foot.ini
+.config/git/config
+.config/common-lisp/source-registry.conf.d/50-my-lisp.conf
diff --git a/.gtkrc-2.0 b/.gtkrc-2.0
deleted file mode 100644
index 62d8ede9..00000000
--- a/.gtkrc-2.0
+++ /dev/null
@@ -1,2 +0,0 @@
-include "/usr/share/themes/Emacs/gtk-2.0-key/gtkrc"
-gtk-key-theme-name = "Emacs"
diff --git a/.hstow-local-ignore b/.hstow-local-ignore
index c2f6b18e..741d8b98 100644
--- a/.hstow-local-ignore
+++ b/.hstow-local-ignore
@@ -5,7 +5,9 @@ lib-src/*
perl5/*
scripts/*
+*.in
GTAGS
GRTAGS
GPATH
README
+Makefile
diff --git a/.hstow-unstow-ignore b/.hstow-unstow-ignore
index ef6e3658..27accd71 100644
--- a/.hstow-unstow-ignore
+++ b/.hstow-unstow-ignore
@@ -3,7 +3,7 @@ doc/*
.emacs.d/eln-cache/*
.fmail/*
lib/annex/*
-lib/athena-apt/*
+lib/athenet-apt/*
lib/wikiannex/*
lib/podcasts/*
lib/priv/*
diff --git a/.mbsyncrc b/.mbsyncrc
index 995f5df0..3eb4264e 100644
--- a/.mbsyncrc
+++ b/.mbsyncrc
@@ -1,62 +1,51 @@
-# -*- mode: conf-space; -*-
-
-# ---- defaults
-
Create Near
-# FastMail always expunges server-side. mbsync author says this is a
-# really bad idea. Let's just have mbsync expunge client-side.
-Expunge Near
+Expunge Both
SyncState *
-# ---- stores
-
-MaildirStore fmmaildir
+MaildirStore pmmaildir
Path ~/.fmail/
Inbox ~/.fmail/inbox
-# Flatten .
-
-# Trash option doesn't seem to work. Setting Trash to trash and
-# Expunge to Near makes deleted mail get moved into the trash folder,
-# but it is left marked as deleted so it the FastMail IMAP server
-# won't add it to the folder, however many times mbsync tries to put
-# it there. So just unbind deletion in mutt for now.
-# Trash trash
-
-IMAPAccount fastmail
-Host imap.fastmail.com
-User spwhitton@fastmail.com
-AuthMechs LOGIN
-PassCmd "cat ~/local/auth/fmailsyncpass"
-SSLType IMAPS
-SSLVersions TLSv1.2
-CertificateFile ~/src/dotfiles/lib-src/certs/fastmail.crt
+IMAPAccount purelymail
+Host imap.purelymail.com
+User spwhitton@spwhitton.name
+AuthMechs LOGIN
+PassCmd "cat ~/local/auth/fmailsyncpass"
+SSLType IMAPS
+SSLVersions TLSv1.3
SystemCertificates no
+CertificateFile /etc/ssl/certs/ISRG_Root_X1.pem
+
+IMAPStore pmimap
+Account purelymail
-IMAPStore fmimap
-Account fastmail
-# UseNamespace no
-# PathDelimiter .
+Channel pmaili
+Far :pmimap:INBOX
+Near :pmmaildir:
-# ---- mailboxes
+Channel pmails
+Far :pmimap:Sent
+Near :pmmaildir:sent
-Channel fmaili
-Far :fmimap:INBOX
-Near :fmmaildir:
+Channel pmailj
+Far :pmimap:Junk
+Near :pmmaildir:junk
-Channel fmails
-Far :fmimap:"Sent Items"
-Near :fmmaildir:sent
+Channel pmailt
+Far :pmimap:Trash
+Near :pmmaildir:trash
-# if I find myself wanting to separate listservs into different
-# folders within Lists/ on the server side (unlikely because I am
-# using notmuch), something like this should allow downloading all of
-# them without the INBOX.Lists prefix:
+# notes written on smartphone
+Channel pmailn
+Far :pmimap:Notes
+Near :pmmaildir:notes
-# Channel fmaill
-# Far :fmimap:Lists/
-# Near :fmmaildir:
-# Patterns * !INBOX
+Group purelymail
+Channel pmaili
+Channel pmails
+Channel pmailj
+Channel pmailt
+Channel pmailn
# So long as I'm using a mail provider that supports Sieve, can install this
# to deliver all mail which has a List-Id into a separate Lists folder. The
@@ -83,38 +72,3 @@ Near :fmmaildir:sent
# {
# keep;
# }
-
-# Channel lists
-# Far :fmimap:Lists
-# Near :fmmaildir:lists
-
-Channel fmailt
-Far :fmimap:Trash
-Near :fmmaildir:trash
-
-Channel fmailj
-Far :fmimap:"Junk Mail"
-Near :fmmaildir:junk
-
-Channel spamtraining
-Far :fmimap:Training/Spam
-Near :fmmaildir:spam
-
-Channel hamtraining
-Far :fmimap:Training/Ham
-Near :fmmaildir:ham
-
-# notes from tablet computer / smartphone
-Channel notes
-Far :fmimap:Notes
-Near :fmmaildir:notes
-
-Group fastmail
-Channel fmaili
-Channel fmails
-Channel fmailt
-# Channel lists
-Channel notes
-Channel fmailj
-Channel spamtraining
-Channel hamtraining
diff --git a/.notmuch-config b/.notmuch-config
index 6f72698d..e90cf3e7 100644
--- a/.notmuch-config
+++ b/.notmuch-config
@@ -3,8 +3,8 @@
# For more information about notmuch, see https://notmuchmail.org
[database]
-mail_root=/home/spwhitton/.fmail
-path=/home/spwhitton/.local/share/notmuch/default
+mail_root=.fmail
+path=.local/share/notmuch/default
# User configuration
#
diff --git a/.sbuildrc b/.sbuildrc
index d3eee9b6..1d69220a 100644
--- a/.sbuildrc
+++ b/.sbuildrc
@@ -8,7 +8,8 @@ $build_source = 0;
$build_arch_all = 1;
$distribution = 'unstable';
-$run_lintian = 1;
+# don't run by default: see sbuild-preupload function in ~/.bashrc
+$run_lintian = 0;
$lintian_opts = [
'--allow-root',
'--color=never', # make the .build file more readable
diff --git a/.shinit b/.shinit
index 342a2e01..2ee29f95 100644
--- a/.shinit
+++ b/.shinit
@@ -10,6 +10,9 @@ ls --version 2>/dev/null | grep -q "GNU coreutils" \
grep --version 2>/dev/null | grep -q "GNU grep" \
&& alias grep="grep --color=auto"
+alias doas="doas "
+alias sudo="sudo "
+
alias e="$EDITOR"
alias d="emacsclient -te '(dired \".\")'"
alias ta="tmux new-session -A -s default -c ~"
@@ -28,6 +31,7 @@ alias arsync="rsync -aSHAXc --partial --numeric-ids --info=progress2"
alias axrsync="rsync -aSHAXxc --partial --numeric-ids --info=progress2"
# To have a terminal emulator exit upon remote tmux detach, like my C-i s.
alias sshta="exec ssh-and-tmux"
+alias pdd="dd bs=4M status=progress conv=fdatasync"
upenv () {
# don't want to do this outside of tmux as then tmux show-environment will
diff --git a/.ssh/config b/.ssh/config
index d1a97eb7..c09b9550 100644
--- a/.ssh/config
+++ b/.ssh/config
@@ -14,6 +14,7 @@ User spw
####################################################################
Host fasolo | ftp-master | ftp-master.debian.org
+User spwhitton
HostName ftp-master.debian.org
Host *.debian.org !*.ssh.debian.org !ssh.debian.org
@@ -34,7 +35,7 @@ HostName athena.silentflame.com
ForwardAgent yes
IdentityFile ~/.ssh/id_athena
-# For demeter's gitolite installation.
+# For personal gitolite installation.
Host git.spwhitton.name spwhitton.name
IdentityFile ~/.ssh/id_athena
@@ -48,6 +49,9 @@ Host melete.silentflame.com | melete
User spwhitton
ForwardAgent yes
+Host *.silentflame.com silentflame.com
+User spwhitton
+
####################################################################
Host github | github.com
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..bd356bf3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,15 @@
+.POSIX:
+.SUFFIXES:
+.SUFFIXES: .in
+OUTPUTS = \
+ .config/foot/foot.ini\
+ .config/git/config\
+ .config/common-lisp/source-registry.conf.d/50-my-lisp.conf
+all: $(OUTPUTS) .gitignore
+clean:
+ rm -f $(OUTPUTS)
+.gitignore: Makefile
+ printf "%s\n" $(OUTPUTS) >.gitignore
+# POSIX make does not support us adding hostinfo.m4 as a prerequisite here.
+.in:
+ m4 lib-src/hostinfo.m4 $< >$*
diff --git a/README b/README
index 3a240275..5d0f3e3f 100644
--- a/README
+++ b/README
@@ -3,11 +3,19 @@ written by me, and when they was taken from elsewhere. Things I've
written are released under the GNU General Public License, version 3,
or any later version as published by the Free Software Foundation.
-The master branch should work on most hosts, and host-specific
-configurations for host `host.domain' live in the branch `host'. All
-such host branches have master as their parent and are rebased onto
-master.
-
+The master branch should work on most hosts. Host- and user-specific
+configuration is preferably done in an application-specific way, such as by
+using tilde expansion to get the home directory. Where that is not possible,
+we have two generic mechanisms: m4 processing, and host-specific git branches.
+
+m4 processing is most suitable for my own machines, on which I can ensure that
+both m4 and make are available, and from which I can directly push the master
+branch. In general we want to avoid assuming that either m4 or make are
+available. Use this only when necessary: if a config file is not used
+anywhere where HOME is not /home/spwhitton, just hardcode /home/spwhitton.
+
+The host-specific branch for host `host.domain' is `host'. All such host
+branches have master as their parent and are rebased onto master.
This restriction is to make usage less complex, even if it results in
some patches being duplicated between multiple host branches (that
aren't suitable for master). My dotfiles are too important for the
diff --git a/bin/athena-apt-add b/bin/athenet-apt-add
index 0346fa54..d3784b94 100755
--- a/bin/athena-apt-add
+++ b/bin/athenet-apt-add
@@ -7,8 +7,8 @@ set -e
changes="$(readlink -f $1)"
dist="$(grep ^Distribution: $changes | cut -d \ -f2)"
-if ! [ -d "$HOME/lib/athena-apt" ]; then
- echo >&2 "athena-apt annex not checked out"
+if ! [ -d "$HOME/lib/athenet-apt" ]; then
+ echo >&2 "athenet-apt annex not checked out"
exit 1
fi
if ! [ -f "$changes" ]; then
@@ -18,6 +18,6 @@ fi
changestool "$changes" includeallsources || true
(
- cd "$HOME/lib/athena-apt"
+ cd "$HOME/lib/athenet-apt"
reprepro include "$dist" "$changes"
)
diff --git a/bin/bstraph b/bin/bstraph
index 785bb30a..a4f18043 100755
--- a/bin/bstraph
+++ b/bin/bstraph
@@ -34,6 +34,7 @@ for f in gpg.conf gpg-agent.conf dirmngr.conf .gpg-v21-migrated; do
[ -h "$HOME/.gnupg/$f" ] || rm -f "$HOME/.gnupg/$f"
done
+make -ks all ||:
bin/hstow restow .
if command -v git >/dev/null; then
diff --git a/bin/buildssrht-preupload b/bin/buildssrht-preupload
index ebae98f2..c39eebce 100755
--- a/bin/buildssrht-preupload
+++ b/bin/buildssrht-preupload
@@ -101,7 +101,7 @@ $manifest->{tasks} = [
[
build => [
"cd $source",
- "dgit --quilt=$quilt sbuild -d $dist --no-run-lintian"
+ "dgit --quilt=$quilt sbuild -d $dist"
]
],
[lintian => ["lintian $changes"]],
diff --git a/bin/doccheckin b/bin/doccheckin
index 7c09e819..fe2553e5 100755
--- a/bin/doccheckin
+++ b/bin/doccheckin
@@ -19,8 +19,8 @@ git add howm/*.org howm/*/*.org archive/howm/archive.org \
papers/*.org papers/*.md papers/*.bib \
newpapers/*/*.org \
dissert/*.md pres/*.md letters/*.tex \
- howm/.howm-keys emacs-abbrevs emacs-bookmarks \
- News/*.SCORE emacs-diary archive/emacs-diary-* \
+ howm/.howm-keys abbrevs bookmarks \
+ News/*.SCORE diary archive/diary-* \
|| true
# this command should never fail and stop mr
diff --git a/bin/locmaint b/bin/locmaint
index 9c170511..9bdce9ef 100755
--- a/bin/locmaint
+++ b/bin/locmaint
@@ -106,7 +106,7 @@ our @remote_annexes = (
{ origin => "athenag:annex.git", homedir => "lib/annex", lazy => 1 },
{ origin => "athenag:annex19.git", homedir => "annex" },
{ origin => "athenag:libpriv.git", homedir => "lib/priv" },
- { origin => "athena:wikiannex", homedir => "lib/wikiannex" },
+ { origin => "git@git.spwhitton.name:wikiannex", homedir => "lib/wikiannex" },
{ origin => "athenap:athpriv", homedir => "src/athpriv", synconlyannex => 1 });
for (getpwuid($<) . '@' . `hostname -f`) {
@@ -394,15 +394,16 @@ sub do_coldbkup {
# point, to grab metadata non-recursively
}
- # athena main repos
- mkdir catfile($gitbk, "athena"); # compat dirname
+ # git.spwhitton.name main repos
+ mkdir catfile($gitbk, "athena"); # use 'athena' for backup drive compat
my @athena_repos = map {
if (m|^/srv/git/repositories/priv/(.+)\.git$|) {
{ uri => "athenap:$1", dir => "priv/$1.git" }
} elsif (m|^/srv/git/repositories/(.+)\.git$|) {
{ uri => "athena:$1", dir => "$1.git" }
}
- } `ssh demeter find /srv/git/repositories -name "*.git" -type d 2>/dev/null`;
+ } `ssh spwhitton\@git.spwhitton.name\\
+ find /srv/git/repositories -name "*.git" -type d 2>/dev/null`;
backup_repo($_->{uri}, catfile($gitbk, "athena", $_->{dir}))
for @athena_repos;
@@ -410,7 +411,7 @@ sub do_coldbkup {
mkdir catfile($gitbk, "athena_gcrypt");
my @gcrypt_repos
= map { m|^local/gcrypt/(.+)$|; { uri => "athenag:$1", dir => "$1" } }
- `ssh athena find local/gcrypt -name "*.git" -type d`;
+ `ssh spwhitton\@athena find local/gcrypt -name "*.git" -type d`;
chomp @gcrypt_repos;
backup_repo($_->{uri}, catfile($gitbk, "athena_gcrypt", $_->{dir}))
for @gcrypt_repos;
diff --git a/bin/movemymail b/bin/movemymail
index fbe76178..06671043 100755
--- a/bin/movemymail
+++ b/bin/movemymail
@@ -45,11 +45,11 @@ if (hostfqdn eq "athena.silentflame.com") {
system "imap-dl", "$ENV{HOME}/.config/mailscripts/imap-dl.gmail";
}
-eval { system "mbsync", "fastmail" };
+eval { system "mbsync", "purelymail" };
if (my $exception = $@) {
local $ENV{XDG_RUNTIME_DIR} = "/run/user/$<";
system "notify-send", "--urgency=critical", "--icon=dialog-warning",
- "'mbsync fastmail' exited nonzero";
+ "'mbsync purelymail' exited nonzero";
die $exception;
}
diff --git a/bin/reprepro-rebuilder b/bin/reprepro-rebuilder
index 4007b0ed..354cd52f 100755
--- a/bin/reprepro-rebuilder
+++ b/bin/reprepro-rebuilder
@@ -33,7 +33,7 @@ use Getopt::Long;
use Term::UI;
use File::chdir;
-our $repo = "$ENV{HOME}/lib/athena-apt";
+our $repo = "$ENV{HOME}/lib/athenet-apt";
our $prefix = "athena";
our @dists = qw(bookworm bookworm-backports unstable experimental);
our $bpo_dist = "bookworm-backports";
@@ -186,7 +186,8 @@ sub build {
my $build_debs = sub {
my %opts = shift->%*;
- my @args = ("--no-run-lintian", "-d", $dist);
+ my @args = ("--no-run-piuparts", "--no-run-lintian",
+ "--no-run-autopkgtest", "-d", $dist);
push @args, $opts{all} ? "--arch-all" : "--no-arch-all";
for (@_) {
no autodie;
diff --git a/bin/yt-dlp-scrot b/bin/yt-dlp-scrot
new file mode 100755
index 00000000..a569bf7c
--- /dev/null
+++ b/bin/yt-dlp-scrot
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# source: https://news.ycombinator.com/item?id=39288379
+# The -ss must come before the -i to avoid downloading the whole video.
+ffmpeg -ss "${2:-01:23}" -i "$(yt-dlp "$1" --get-url | head -n1)" \
+ -t 1 -r 4/1 -q:v 2 -vf scale=0:-1 "${3:-folder}%02d.png"
diff --git a/lib-src/certs/fastmail.crt b/lib-src/certs/fastmail.crt
deleted file mode 100644
index ce40ed30..00000000
--- a/lib-src/certs/fastmail.crt
+++ /dev/null
@@ -1,41 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIHQDCCBiigAwIBAgIQDIVbcGvDCrksnNDtiwrz5zANBgkqhkiG9w0BAQsFADBZ
-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMTMwMQYDVQQDEypE
-aWdpQ2VydCBHbG9iYWwgRzIgVExTIFJTQSBTSEEyNTYgMjAyMCBDQTEwHhcNMjMx
-MDA0MDAwMDAwWhcNMjQxMTAxMjM1OTU5WjBoMQswCQYDVQQGEwJBVTERMA8GA1UE
-CBMIVmljdG9yaWExEjAQBgNVBAcTCU1lbGJvdXJuZTEZMBcGA1UEChMQRmFzdE1h
-aWwgUHR5IEx0ZDEXMBUGA1UEAwwOKi5mYXN0bWFpbC5jb20wggEiMA0GCSqGSIb3
-DQEBAQUAA4IBDwAwggEKAoIBAQDIK7bTmFkD3zDvFKpT6h2CRrTgKa+cnZ7zToRQ
-VdREXU+wDaqccWbihBR0sGhYeoUfqkjQfrFMyqK/FrGEB/ZWyxAx6q5HFnBQTuQV
-q2Cdf08lo+eLdGIOl+ojV2OVIA+C88z/Pfvj8Peqo13b/LpKoWDxsMEeR1CfW3yX
-oEVi/avIc2U0yoZ6YfqGQ9U/QX2gQMD1GqA1BIiCfxUr7bZxtAyL19y+Z87EtL9d
-GGTBV+Gjh/DyATMmy1kwLcoZXT3Gnieq2ensqROUxpQ2Y0U7iww55kU86Clx9KnR
-KqsWJGwbLtpQ+NFFbyDC/5tTTR6iNbetOGcPA6xpnsbFgI4TAgMBAAGjggPzMIID
-7zAfBgNVHSMEGDAWgBR0hYDAZsffN97PvSk3qgMdvu3NFzAdBgNVHQ4EFgQUA9QH
-pLBlScA8j+iaCIfKtcdi5/owgYEGA1UdEQR6MHiCDiouZmFzdG1haWwuY29tggxm
-YXN0bWFpbC5jb22CFSouY2FsZGF2LmZhc3RtYWlsLmNvbYIWKi5jYXJkZGF2LmZh
-c3RtYWlsLmNvbYITY2FsZGF2LmZhc3RtYWlsLmNvbYIUY2FyZGRhdi5mYXN0bWFp
-bC5jb20wPgYDVR0gBDcwNTAzBgZngQwBAgIwKTAnBggrBgEFBQcCARYbaHR0cDov
-L3d3dy5kaWdpY2VydC5jb20vQ1BTMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAU
-BggrBgEFBQcDAQYIKwYBBQUHAwIwgZ8GA1UdHwSBlzCBlDBIoEagRIZCaHR0cDov
-L2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0R2xvYmFsRzJUTFNSU0FTSEEyNTYy
-MDIwQ0ExLTEuY3JsMEigRqBEhkJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGln
-aUNlcnRHbG9iYWxHMlRMU1JTQVNIQTI1NjIwMjBDQTEtMS5jcmwwgYcGCCsGAQUF
-BwEBBHsweTAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMFEG
-CCsGAQUFBzAChkVodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRH
-bG9iYWxHMlRMU1JTQVNIQTI1NjIwMjBDQTEtMS5jcnQwDAYDVR0TAQH/BAIwADCC
-AX4GCisGAQQB1nkCBAIEggFuBIIBagFoAHYA7s3QZNXbGs7FXLedtM0TojKHRny8
-7N7DUUhZRnEftZsAAAGK+6wcvgAABAMARzBFAiA1ar7gEFUKD92a7bFkHwfpr7+p
-cMteU3TFN/cAI5gQjQIhANlbUK6ZblyoqFpkwCKNh2K58PykaD0bhnVbAZm0GNTp
-AHUASLDja9qmRzQP5WoC+p0w6xxSActW3SyB2bu/qznYhHMAAAGK+6wcugAABAMA
-RjBEAiAeKRWzn6XRdBByYajuV0IXKIXgbBnDd2ENiQ6kG1IwjgIgOz5x3UUwkSDP
-UZtmUJQtxhJ/i3ILE0F7IxQO6b+ENx0AdwDatr9rP7W2Ip+bwrtca+hwkXFsu1GE
-hTS9pD0wSNf7qwAAAYr7rBymAAAEAwBIMEYCIQCwbOuNCRajD/F6G3282N7bUUZL
-S4xKCxuZ13jubGtnOQIhAMMAO2kzNNtvSo7ST2dxiQ9BUR1ynMSfujEwRCgcWpia
-MA0GCSqGSIb3DQEBCwUAA4IBAQAait3EVZ7lQG8hkwLWJ8Jb0o1k+A51l0os8f/n
-l3e5c3OlQztLhsjTwrJjuWVBPPH2ckyAqlu/nb1ZAoaK9r/6AhYVVMSkgE+VKzQH
-n0H7FECB7agejypxXSxu9oqD/3bg+m7spM+vfBuOu9nAmJY7b+CGrbCrgiYomG8n
-ELgz8t4U2oVhpHX1B6vO3e/wUjFjH9otSRz3hFr6D6YyV4nLyNofSQs9K8Mcbf/w
-/KgvcnN2csFHkRmYBMb96Jtdj58nydsu/Cwyhru39SN1gkXpWL8L6p28TOqZlssb
-kV289dZ2GuIsRAoaTWE5qtlMVmr/KknKqgaO/o+rLlagFiWh
------END CERTIFICATE-----
diff --git a/lib-src/git/includes b/lib-src/git/includes
index 6f8114af..8fb50d3d 100644
--- a/lib-src/git/includes
+++ b/lib-src/git/includes
@@ -4,8 +4,8 @@
path = ~/src/dotfiles/lib-src/git/doc
[includeIf "gitdir:~/lib/annex/"]
path = ~/src/dotfiles/lib-src/git/lib/annex
-[includeIf "gitdir:~/lib/athena-apt/"]
- path = ~/src/dotfiles/lib-src/git/lib/athena-apt
+[includeIf "gitdir:~/lib/athenet-apt/"]
+ path = ~/src/dotfiles/lib-src/git/lib/athenet-apt
[includeIf "gitdir:~/lib/podcasts/"]
path = ~/src/dotfiles/lib-src/git/lib/podcasts
[includeIf "gitdir:~/lib/priv/"]
diff --git a/lib-src/git/lib/athena-apt b/lib-src/git/lib/athenet-apt
index ff09fb6f..696e97ab 100644
--- a/lib-src/git/lib/athena-apt
+++ b/lib-src/git/lib/athenet-apt
@@ -14,7 +14,7 @@
[push]
default = matching
-[remote "demeter"]
+[remote "htdocs"]
annex-tracking-branch = master
[remote "origin"]
diff --git a/lib-src/hostinfo.m4 b/lib-src/hostinfo.m4
new file mode 100644
index 00000000..bb23e9a6
--- /dev/null
+++ b/lib-src/hostinfo.m4
@@ -0,0 +1,14 @@
+dnl
+dnl POSIX m4 definitions capturing information about localhost
+dnl
+dnl Copyright © 2024 Sean Whitton
+dnl SPDX-License-Identifier: GPL-3.0-or-later
+dnl
+define(SHCMD, `define($1, `pushdef(`TEMP', mkstemp(tmp.XXXXXX))dnl
+syscmd(out="$($2)"; exit=$?; printf "%s" "$out" >TEMP; exit $exit)dnl
+define(`$1', ifelse(sysval, 0, include(TEMP)))dnl
+syscmd(rm TEMP)dnl
+popdef(`TEMP')$1')')dnl
+SHCMD(SH_USER, id -nu)dnl POSIX.
+SHCMD(SH_HOME, echo "$HOME")dnl POSIX.
+SHCMD(SH_FQDN, hostname -f 2>/dev/null)dnl -f for the FQDN is not POSIX.
diff --git a/lib-src/mr/config b/lib-src/mr/config
index 6e43ee0e..72600ec6 100644
--- a/lib-src/mr/config
+++ b/lib-src/mr/config
@@ -187,7 +187,7 @@ autoci =
pre_update = mr autoci
[src/athpriv]
-checkout = git clone demeterp:athpriv
+checkout = git clone spwp:athpriv
pre_update = on athena || git annex sync origin athenah
pre_push = on athena || git annex sync --content origin athenah
post_update = hstow restow ~/src/athpriv
@@ -214,7 +214,7 @@ fixups =
####################################################################
[doc]
-checkout = git clone demeterp:doc doc
+checkout = git clone spwp:doc doc
update = git pull --rebase=false --no-edit "$@"
autoci = doccheckin
pre_update = win32 || doccheckin
@@ -225,17 +225,17 @@ post_checkout = git utime
skip = ! mine
[src/wiki]
-checkout = git clone demeter:wiki
+checkout = git clone spw:wiki
skip = ! mine
[lib/realloc]
-checkout = git clone demeterp:realloc
+checkout = git clone spwp:realloc
skip = ! mine
####################################################################
[lib/radicale]
-checkout = git clone demeterp:radicale radicale
+checkout = git clone spwp:radicale radicale
skip = ! on spwhitton@athena
[public_html]
@@ -266,26 +266,28 @@ push = git annex sync --content cloud origin
skip = lazy
[lib/wikiannex]
-checkout = git clone demeter:wikiannex
+# legacy url for the origin remote
+checkout = git clone git@git.spwhitton.name:wikiannex
post_checkout = cd wikiannex; git annex init
update = git annex sync --no-content
push = git annex sync --content
-fixups = ! on demeter || git annex adjust --hide-missing --unlock
+fixups = ! on leto || git annex adjust --hide-missing --unlock
skip = lazy
[lib/podcasts]
-checkout = git clone demeterp:podcasts
+checkout = git clone spwp:podcasts
post_checkout = cd podcasts; git annex init
update = ./update-and-sync
push = git annex --no-content sync
skip = lazy
-[lib/athena-apt]
-checkout = git clone demeter:athena-apt
+[lib/athenet-apt]
+# legacy url for the origin remote
+checkout = git clone git@git.spwhitton.name:athena-apt athenet-apt
post_checkout =
- cd athena-apt
+ cd athenet-apt
git annex init --version=7
- git annex enableremote demeter rsyncurl=demeter:/srv/www/debian
+ git annex enableremote htdocs rsyncurl=silentflame.com:/srv/www/debian
git annex get .
update = git annex sync --no-content
skip = lazy
@@ -293,10 +295,10 @@ skip = lazy
push =
git annex add
git annex unlock db
- git annex sync --content demeter
+ git annex sync --content htdocs
git annex sync origin
- ssh demeter find /srv/www/debian -type f -exec chmod 644 '{}' +
- ssh demeter find /srv/www/debian -type d -exec chmod 755 '{}' +
+ ssh silentflame.com find /srv/www/debian -type f -exec chmod 644 '{}' +
+ ssh silentflame.com find /srv/www/debian -type d -exec chmod 755 '{}' +
# The git-diff-files(1) call in ~/src/dotfiles/bin/git-is-clean fails in v7
# git-annex repos with unlocked empty files, which this repo often has: empty
@@ -332,9 +334,9 @@ isclean =
# This branch doesn't usually need to be pushed anywhere, but if we do
# need to push it somewhere for backup purposes, we execute
#
-# % git config branch."$(hostname -s)".pushRemote demeter
+# % git config branch."$(hostname -s)".pushRemote spwhitton
#
-# and then 'mr push' will force push it to demeter.
+# and then 'mr push' will force push it to git.spwhitton.name.
#
# "athena/unstable" branch:
#
@@ -356,7 +358,7 @@ isclean =
#
# % cd ~/src/deb/emacs-snapshot
# % debian/merge-snapshot
-# % dgit sbuild --no-run-lintian
+# % dgit sbuild
# % cp ../emacs-snapshot_29~git202*amd64.deb<TAB> ~/local/develacc/tmp
# % sudo virsh start develacc.melete.silentflame.com
# % cd /ssh:root@develacc:/home/spwhitton/tmp
@@ -374,10 +376,10 @@ isclean =
#
# If need to back out before reprepro-rebuilder:
# % cd ~//src/deb/emacs-snapshot
-# % git reset --hard demeter/athena/unstable
+# % git reset --hard spwhitton/athena/unstable
#
# It is important to test local installability of the new .deb, probably
-# in develacc or a sid chroot, before adding to demeter-apt, because
+# in develacc or a sid chroot, before adding to athenet-apt, because
# running the rebased "melete" branch doesn't detect any byte compilation
# issues against my current selection of elpa-* packages.
#
@@ -394,7 +396,7 @@ checkout = git clone https://git.savannah.gnu.org/git/emacs.git trunk
post_clean = ./autogen.sh autoconf
post_checkout =
cd trunk
- git remote add -f demeter demeter:emacs ||:
+ git remote add -f spwhitton spw:emacs ||:
git -c fetch.fsckObjects=false \
remote add -f debian https://salsa.debian.org/rlb/deb-emacs.git/ ||:
./autogen.sh all
@@ -405,8 +407,8 @@ skip = lazy
checkout = git_worktree_checkout "$HOME/src/emacs/trunk" \
-b "$hostname" --no-track \
"$(if [ -n "$(git -C $HOME/src/emacs/trunk \
- for-each-ref '[r]efs/remotes/demeter/'"$hostname")" ]
- then echo demeter/"$hostname"; else echo master; fi)"
+ for-each-ref '[r]efs/remotes/spwhitton/'"$hostname")" ]
+ then echo spwhitton/"$hostname"; else echo master; fi)"
post_clean = ./autogen.sh autoconf
post_checkout = cd primary; ./autogen.sh autoconf
# We don't have the "$(hostname -s)" branch's upstream set to origin/master to
@@ -438,7 +440,7 @@ skip = lazy || git_worktree_skip
[src/deb/emacs-snapshot]
checkout = git_worktree_checkout "$HOME/src/emacs/trunk" \
- -b athena/unstable demeter/athena/unstable
+ -b athena/unstable spwhitton/athena/unstable
skip = ! workstation || git_worktree_skip
[src/deb/emacs]
@@ -478,12 +480,12 @@ skip = lazy
checkout = git clone salsa:dgit-team/dgit
post_checkout =
cd dgit
- git remote add -f demeter demeter:dgit ||:
+ git remote add -f spwhitton spw:dgit ||:
dgit setup-new-tree
skip = lazy
[src/p5-Git-Annex]
-checkout = git clone demeter:p5-Git-Annex
+checkout = git clone spw:p5-Git-Annex
post_checkout =
cd p5-Git-Annex
git remote \
@@ -492,7 +494,7 @@ post_checkout =
skip = lazy
[src/p5-API-GitForge]
-checkout = git clone demeter:p5-API-GitForge
+checkout = git clone spw:p5-API-GitForge
post_checkout =
cd p5-API-GitForge
git remote \
diff --git a/scripts/git/sort-into-yyyy b/scripts/git/sort-into-yyyy
index 46939e91..c3e4be98 100755
--- a/scripts/git/sort-into-yyyy
+++ b/scripts/git/sort-into-yyyy
@@ -6,7 +6,7 @@ use Git::Wrapper;
$git = Git::Wrapper->new(getcwd);
-open $fh, "<", "$ENV{HOME}/doc/emacs-org-agenda-files";
+open $fh, "<", "$ENV{HOME}/doc/org-agenda-files";
for (<$fh>) {
chomp;
s{^~/doc/}{};