[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ement 36db1869dd 04/13: Change/Fix
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ement 36db1869dd 04/13: Change/Fix |
Date: |
Fri, 8 Sep 2023 06:58:07 -0400 (EDT) |
branch: externals/ement
commit 36db1869ddbdda6b7e83ce57344f2933bdd5f3b2
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Change/Fix
---
ement-notifications.el | 23 +++++++++++++----------
ement-notify.el | 2 +-
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/ement-notifications.el b/ement-notifications.el
index b14138021f..8d4a4e4169 100644
--- a/ement-notifications.el
+++ b/ement-notifications.el
@@ -89,15 +89,18 @@ to `ement-api', which see."
(interactive (list (ement-complete-session)
:only (when current-prefix-arg
"highlight")))
- (let ((endpoint "notifications")
- (params (remq nil
- (list (when from
- (list "from" from))
- (when limit
- (list "limit" (number-to-string limit)))
- (when only
- (list "only" only))))))
- (ement-api session endpoint :params params :then then :else else)))
+ (if-let ((buffer (get-buffer "*Ement Notifications*")))
+ (pop-to-buffer buffer)
+ (let ((endpoint "notifications")
+ (params (remq nil
+ (list (when from
+ (list "from" from))
+ (when limit
+ (list "limit" (number-to-string limit)))
+ (when only
+ (list "only" only))))))
+ (ement-api session endpoint :params params :then then :else else)
+ (ement-message "Fetching notifications for <%s>..." (ement-user-id
(ement-session-user session))))))
(cl-defun ement-notifications-callback (session data &key (buffer
(ement-notifications--log-buffer)))
"Callback for `ement-notifications' on SESSION which receives DATA."
@@ -151,7 +154,7 @@ to `ement-api', which see."
:else (lambda (plz-error)
(setf (buffer-local-value 'ement-notifications-retro-loading
buffer) nil)
(ement-api-error plz-error)))
- (message "Loading %s earlier messages..." number)
+ (ement-message "Loading %s earlier messages..." number)
(setf ement-notifications-retro-loading t))))
;;;; Functions
diff --git a/ement-notify.el b/ement-notify.el
index 918955d962..58e27d0e12 100644
--- a/ement-notify.el
+++ b/ement-notify.el
@@ -171,7 +171,7 @@ margins in Emacs. But it's useful, anyway."
"Switch to \"*Ement Notifications*\" buffer."
(declare (function ement-notifications--log-buffer "ement-notifications"))
(interactive)
- (switch-to-buffer (ement-notifications--log-buffer :name "*Ement
Notifications*")))
+ (call-interactively #'ement-notifications))
(defun ement-notify-switch-to-mentions-buffer ()
"Switch to \"*Ement Mentions*\" buffer."
- [elpa] externals/ement c6331a2f72 01/13: Add: (ement-notifications), (continued)
- [elpa] externals/ement c6331a2f72 01/13: Add: (ement-notifications), ELPA Syncer, 2023/09/08
- [elpa] externals/ement a83ab5c49f 05/13: Fix, ELPA Syncer, 2023/09/08
- [elpa] externals/ement 075920edac 09/13: Comment: Add TODO, ELPA Syncer, 2023/09/08
- [elpa] externals/ement 02f61e57e8 11/13: Comment: Improve commentary, ELPA Syncer, 2023/09/08
- [elpa] externals/ement 46afa1f5a1 02/13: Change: Integrate ement-notify and ement-notifications, and retro-load, ELPA Syncer, 2023/09/08
- [elpa] externals/ement cca407f549 06/13: Tidy: Compiler warnings, ELPA Syncer, 2023/09/08
- [elpa] externals/ement 386103cc74 07/13: Fix, ELPA Syncer, 2023/09/08
- [elpa] externals/ement 1d8afe6fdf 12/13: Docs: Update changelog, ELPA Syncer, 2023/09/08
- [elpa] externals/ement fd1a65794d 13/13: Merge: (ement-notifications), ELPA Syncer, 2023/09/08
- [elpa] externals/ement 83b4c64c5c 08/13: Change: Use switch-to-buffer, ELPA Syncer, 2023/09/08
- [elpa] externals/ement 36db1869dd 04/13: Change/Fix,
ELPA Syncer <=
- [elpa] externals/ement 71e628b820 10/13: Comment: Remove FIXME, ELPA Syncer, 2023/09/08