e "On $new_host: umounting /m and /o, checking emacs"
$new_shell bash -s <<'EOF'
set -eE
-if pgrep -f 'emacs --daemon' &>/dev/null; then
+if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then
+ export XDG_RUNTIME_DIR=/run/user/1000
bufs="$(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
EOF
$old_shell bash -s <<'EOF'
-if pgrep -f 'emacs --daemon' &>/dev/null; then
+if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then
+ export XDG_RUNTIME_DIR=/run/user/1000
bufs="$(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