]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-lib.el
Merge tag 'debian/0.17-4'
[notmuch] / emacs / notmuch-lib.el
index 140d7603ce2d191613911ac4e7e96bbdd0685a0c..fa35fa9fd89384cd16651bd07c767b32f0080ac1 100644 (file)
@@ -179,6 +179,13 @@ Otherwise the output will be returned"
       (setq notmuch--cli-sane-p (= status 0))))
   notmuch--cli-sane-p)
 
+(defun notmuch-assert-cli-sane ()
+  (unless (notmuch-cli-sane-p)
+    (notmuch-logged-error
+     "notmuch cli seems misconfigured or unconfigured."
+"Perhaps you haven't run \"notmuch setup\" yet? Try running this
+on the command line, and then retry your notmuch command")))
+
 (defun notmuch-version ()
   "Return a string with the notmuch version number."
   (let ((long-string
@@ -524,7 +531,8 @@ the given type."
 (if (>= emacs-major-version 24)
     (defadvice mm-shr (before load-gnus-arts activate)
       (require 'gnus-art nil t)
-      (ad-disable-advice 'mm-shr 'before 'load-gnus-arts)))
+      (ad-disable-advice 'mm-shr 'before 'load-gnus-arts)
+      (ad-activate 'mm-shr)))
 
 (defun notmuch-mm-display-part-inline (msg part nth content-type process-crypto)
   "Use the mm-decode/mm-view functions to display a part in the