emacs-config/bin/mu-index-emacs-maybe

13 lines
303 B
Plaintext
Raw Permalink Normal View History

2024-01-07 10:03:25 -05:00
#! /bin/sh
## indexes mu depending on whether emacs mu4e is running
## assume the mu server is only started by mu4e
if pgrep -fx '/usr/bin/mu server' > /dev/null; then
echo indexing mu through emacs
emacsclient -e '(mu4e-update-index)' > /dev/null
else
echo indexing mu natively
mu index
fi