emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ement ca3aed2207 2/4: Fix: (ement-room-list, -revert) D


From: ELPA Syncer
Subject: [elpa] externals/ement ca3aed2207 2/4: Fix: (ement-room-list, -revert) Don't display when reverting
Date: Mon, 6 Mar 2023 00:58:03 -0500 (EST)

branch: externals/ement
commit ca3aed2207876785427a671911ae36f0a1c19733
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Fix: (ement-room-list, -revert) Don't display when reverting
    
    Fixes #121.  Thanks to @mekeor for reporting.
---
 README.org         |  1 +
 ement-room-list.el | 13 +++++--------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/README.org b/README.org
index 1de7431ecc..a70a11a213 100644
--- a/README.org
+++ b/README.org
@@ -303,6 +303,7 @@ Note that, while ~matrix-client~ remains usable, and 
probably will for some time
 *Fixes*
 
 + Command ~ement-view-space~ when called from a room buffer.  (Thanks to 
[[https://github.com/MagicRB][Richard Brežák]] for reporting.)
++ Don't call ~display-buffer~ when reverting room list buffer.  (Fixes 
[[https://github.com/alphapapa/ement.el/issues/121][#121]].  Thanks to 
[[https://github.com/mekeor][mekeor]] for reporting.) 
 
 *Internal*
 
diff --git a/ement-room-list.el b/ement-room-list.el
index 5f503e465f..35739f8619 100644
--- a/ement-room-list.el
+++ b/ement-room-list.el
@@ -475,7 +475,8 @@ To be called from `ement-after-initial-sync-hook'."
                                 )
   "Show a buffer listing Ement rooms, grouped with Taxy KEYS.
 The buffer is named BUFFER-NAME and is shown with
-DISPLAY-BUFFER-ACTION."
+DISPLAY-BUFFER-ACTION; or if DISPLAY-BUFFER-ACTION is nil, the
+buffer is not displayed."
   (interactive)
   (let (format-table column-sizes window-start)
     (cl-labels (;; (heading-face
@@ -603,7 +604,8 @@ DISPLAY-BUFFER-ACTION."
           (goto-char pos)
           (when (and section-ident (magit-get-section section-ident))
             (goto-char (oref (magit-get-section section-ident) start)))))
-      (display-buffer buffer-name display-buffer-action)
+      (when display-buffer-action
+        (display-buffer buffer-name display-buffer-action))
       (when (get-buffer-window buffer-name)
         (set-window-start (get-buffer-window buffer-name) window-start))
       ;; NOTE: In order for `bookmark--jump-via' to work properly, the 
restored buffer
@@ -628,7 +630,7 @@ left."
 (defun ement-room-list-revert (_ignore-auto _noconfirm)
   "Revert current Ement-Room-List buffer."
   (interactive)
-  (ement-room-list :display-buffer-action '(display-buffer-no-window 
(allow-no-window . t))))
+  (ement-room-list :display-buffer-action nil))
 
 (defun ement-room-list-mouse-1 (event)
   "Call `ement-room-list-RET' at EVENT."
@@ -686,11 +688,6 @@ left."
       (unless (region-active-p)
         ;; Don't refresh the list if the region is active (e.g. if the user is 
trying to
         ;; operate on multiple rooms).
-
-        ;; FIXME: This seems to redisplay the buffer even when it's buried.  
But it
-        ;; shouldn't, because the revert function uses 
`display-buffer-no-window'.  But it
-        ;; doesn't always happen; it only seems to in certain circumstances, 
e.g. when the
-        ;; minibuffer is open, which should be unrelated to this.
         (revert-buffer)))))
 
 (defun ement-room-list--timestamp-colors ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]