offlineimap: Delegate mu index update to emacs if `mu` fails When mu4e is in a context, the `mu index` postsynchook doesn't work. Since it returns an exit code, tell Emacs to update the index with the already running `mu` server instance.
Alan Pearce alan@alanpearce.eu
Sun, 24 Sep 2017 14:56:03 +0200
1 files changed, 3 insertions(+), 3 deletions(-)
jump to
M offlineimap/.offlineimaprc → offlineimap/.offlineimaprc
@@ -10,7 +10,7 @@ # Identifier for the remote repository; i.e. the actual IMAP, usually non-local. remoterepository = alanpearce.eu-remote autorefresh = 5 quick = 2 -postsynchook = mu index --muhome=~/.cache/mu/alanpearce.eu --maildir=%(alanpearcemaildir)s --lazy-check --nocleanup --quiet +postsynchook = mu index --muhome=~/.cache/mu/alanpearce.eu --maildir=%(alanpearcemaildir)s --lazy-check --nocleanup --quiet || emacsclient -e "(mu4e-update-index)" [Repository alanpearce.eu-local] # OfflineIMAP supports Maildir, GmailMaildir, and IMAP for local repositories. @@ -35,7 +35,7 @@ localrepository = riseup.net-local remoterepository = riseup.net-remote autorefresh = 10 quick = 2 -postsynchook = mu index --muhome=~/.cache/mu/riseup.net --maildir=%(riseupmaildir)s --lazy-check --nocleanup --quiet +postsynchook = mu index --muhome=~/.cache/mu/riseup.net --maildir=%(riseupmaildir)s --lazy-check --nocleanup --quiet || emacsclient -e "(mu4e-update-index)" [Repository riseup.net-local] type = Maildir @@ -57,7 +57,7 @@ localrepository = satoshipay.io-local remoterepository = satoshipay.io-remote autorefresh = 5 quick = 2 -postsynchook = mu index --muhome=~/.cache/mu/satoshipay.io --maildir=%(satoshipaymaildir)s --lazy-check --nocleanup --quiet +postsynchook = mu index --muhome=~/.cache/mu/satoshipay.io --maildir=%(satoshipaymaildir)s --lazy-check --nocleanup --quiet || emacsclient -e "(mu4e-update-index)" [Repository satoshipay.io-local] type = GmailMaildir