summary refs log tree commit diff stats
path: root/offlineimap
diff options
context:
space:
mode:
authorAlan Pearce2017-09-24 14:56:03 +0200
committerAlan Pearce2017-09-24 15:01:32 +0200
commite30c3354948024bd75a57409441507b1384226b4 (patch)
treee0f1837156b78fff294c8c273edda71c54c97d65 /offlineimap
parent78673c644973ad84aec8ce9935971db11f7f2f02 (diff)
downloadnixfiles-e30c3354948024bd75a57409441507b1384226b4.tar.lz
nixfiles-e30c3354948024bd75a57409441507b1384226b4.tar.zst
nixfiles-e30c3354948024bd75a57409441507b1384226b4.zip
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.
Diffstat (limited to 'offlineimap')
-rw-r--r--offlineimap/.offlineimaprc6
1 files changed, 3 insertions, 3 deletions
diff --git a/offlineimap/.offlineimaprc b/offlineimap/.offlineimaprc
index c1c4e37b..db9bffb2 100644
--- a/offlineimap/.offlineimaprc
+++ b/offlineimap/.offlineimaprc
@@ -10,7 +10,7 @@ localrepository = alanpearce.eu-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