-$old_shell bash -s <<'EOF'
-if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then
- bufs="$(sudo -u iank env XDG_RUNTIME_DIR=/run/user/1000 emacsclient --eval "$(cat /a/bin/ds/unsaved-buffers.el)"| sed '/^"nil"$/d;s/^"(/E: /;s/)"$//')"
- if [[ $bufs ]]; then
- echo "error: on $HOSTNAME, unsaved emacs files: $bufs" >&2
- exit 1
- fi
+if ! $mail_only; then
+ cat /usr/local/bin/unsaved-buffers - <<'EOF' | $old_shell bash -s
+
+# Try to prevent emacs from saving stale data it has in memory to disk. eg: files, recentf list, etc.
+# But if emacs ignores the signal, let it live.
+pkill -xf 'emacs( --daemon| -f znc-all)' ||:
+
+if [[ -e /p/profanity-here ]]; then
+ systemctl disable --now profanity