From 47bed3c0a43d54b60ba0861d1282f2f031620adf Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Fri, 4 Jan 2019 15:37:41 +0800 Subject: [PATCH] Ignore errors in fetching github notifications with network issue. --- doom-modeline.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doom-modeline.el b/doom-modeline.el index f219e83..babc019 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -4,7 +4,7 @@ ;; Author: Vincent Zhang ;; Homepage: https://github.com/seagle0128/doom-modeline -;; Version: 1.4.2 +;; Version: 1.4.3 ;; Package-Requires: ((emacs "25.1") (all-the-icons "1.0.0") (shrink-path "0.2.0") (eldoc-eval "0.1") (dash "2.11.0")) ;; Keywords: faces mode-line @@ -1850,10 +1850,11 @@ mouse-3: Describe current input method") (require 'ghub nil t) (when (fboundp 'ghub-get) (with-timeout (10) - (ghub-get "/notifications" - nil - :query '((notifications . "true")) - :noerror t)))) + (ignore-errors + (ghub-get "/notifications" + nil + :query '((notifications . "true")) + :noerror t))))) (lambda (result) (setq doom-modeline--github-notifications-number (length result))))))