aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2018-02-09 16:05:28 -0600
committerGitHub <noreply@github.com>2018-02-09 16:05:28 -0600
commite8d4c93e2f4be12a061de11952f10f266e81b3ae (patch)
treebf64248b48cb46feb031b7f8e9f6d9a4a11b0817
parent0bc0adf1b5c93795ca814f3f123405d2782088f8 (diff)
parent7ee75d65f34063f21c354748cbd6806e99922139 (diff)
Merge pull request #343 from Boruch-Baum/fix-notifications
Fix sx-inbox--print-info to handle all forms of notification
-rw-r--r--sx-inbox.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/sx-inbox.el b/sx-inbox.el
index 3e870c3..1f0f227 100644
--- a/sx-inbox.el
+++ b/sx-inbox.el
@@ -159,7 +159,8 @@ is an alist containing the elements:
(replace-regexp-in-string
"_" " " (or .item_type .notification_type)))
(cond (.answer_id " on Answer at:")
- (.question_id " on:")))
+ (.question_id " on:")
+ (t ":")))
'face 'font-lock-keyword-face)
(list
(concat (sx-time-since .creation_date)
@@ -168,14 +169,15 @@ is an alist containing the elements:
(list
(propertize
" " 'display
- (concat "\n " (propertize .title 'face 'sx-question-list-date) "\n"
+ (concat "\n " (propertize (or .title "") 'face 'sx-question-list-date) "\n"
+ (when .body
(let ((col fill-column))
(with-temp-buffer
(setq fill-column col)
(insert " " .body)
(fill-region (point-min) (point-max))
(buffer-string))))
- 'face 'default))))))
+ 'face 'default)))))))
;;; Entry commands