From a6fa3120d65cd14faffd73f5530ec631ffdd2c8c Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Sun, 18 Aug 2024 09:54:18 -0700 Subject: [PATCH] Fix eww-mu4e-messages --- eww/eww-mu4e-messages | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/eww/eww-mu4e-messages b/eww/eww-mu4e-messages index 86f65cb..9d2957f 100755 --- a/eww/eww-mu4e-messages +++ b/eww/eww-mu4e-messages @@ -2,13 +2,16 @@ ;;; -*- mode: emacs-lisp; lexical-binding: t -*- (require 'server) (princ - (if-let ((modeline-string (server-eval-at "server" '(mu4e--modeline-string))) - ((string-match "\\([0-9]+\\)\\((\\+1)\\)?/[0-9]+ $" modeline-string)) - (matched-string (match-string 1 modeline-string))) - (progn - (set-text-properties 0 (length matched-string) - nil - matched-string) - matched-string) - "0")) + (condition-case _ + (if-let ((modeline-string (server-eval-at "server" '(mu4e--modeline-string))) + ((string-match "\\([0-9]+\\)\\((\\+1)\\)?/[0-9]+ $" modeline-string)) + (matched-string (match-string 1 modeline-string))) + (progn + (set-text-properties 0 (length matched-string) + nil + matched-string) + matched-string) + "0") + (error + "0"))) (terpri)