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

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

[elpa] externals/ement f000c3ccd2 1/4: Fix: (ement--room-at-point) Retur


From: ELPA Syncer
Subject: [elpa] externals/ement f000c3ccd2 1/4: Fix: (ement--room-at-point) Return room instead of string
Date: Mon, 6 Mar 2023 00:58:03 -0500 (EST)

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

    Fix: (ement--room-at-point) Return room instead of string
    
    (ement-complete-room): Update.
    
    Fixes #127.  Thanks to Richard Brežák (@MagicRB) for reporting.
---
 README.org   | 4 ++++
 ement-lib.el | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index e8c977f29f..1de7431ecc 100644
--- a/README.org
+++ b/README.org
@@ -300,6 +300,10 @@ Note that, while ~matrix-client~ remains usable, and 
probably will for some time
 + Improve display of room tombstones (displayed at top and bottom of buffer, 
and new room ID is linked to join).
 + Use descriptive prompts in ~ement-leave-room~ and ~ement-forget-room~ 
commands.
 
+*Fixes*
+
++ Command ~ement-view-space~ when called from a room buffer.  (Thanks to 
[[https://github.com/MagicRB][Richard Brežák]] for reporting.)
+
 *Internal*
 
 + Function ~ement-put-account-data~ accepts ~:room~ argument to put on a 
room's account data.
diff --git a/ement-lib.el b/ement-lib.el
index c01f09ec28..e0949fc4ec 100644
--- a/ement-lib.el
+++ b/ement-lib.el
@@ -990,7 +990,7 @@ suggested room."
                                  (when-let ((suggestion 
(ement--room-at-point)))
                                    (when (or (not predicate)
                                              (funcall predicate suggestion))
-                                     suggestion))))))
+                                     (ement--format-room suggestion 
'topic)))))))
     (alist-get selected-name name-to-room-session nil nil #'string=)))
 
 (cl-defun ement-send-message (room session
@@ -1270,13 +1270,13 @@ IMAGE should be one as created by, e.g. `create-image'."
 Works in major-modes `ement-room-mode',
 `ement-tabulated-room-list-mode', and `ement-room-list-mode'."
   (pcase major-mode
-    ('ement-room-mode (ement--format-room ement-room 'topic))
-    ('ement-tabulated-room-list-mode (ement--format-room 
(tabulated-list-get-id) 'topic))
+    ('ement-room-mode ement-room)
+    ('ement-tabulated-room-list-mode (tabulated-list-get-id))
     ('ement-room-list-mode
      (cl-typecase (oref (magit-current-section) value)
        (taxy-magit-section nil)
        (t (pcase (oref (magit-current-section) value)
-            (`[,room ,_session] (ement--format-room room 'topic))))))))
+            (`[,room ,_session] room)))))))
 
 (defun ement--room-direct-p (room session)
   "Return non-nil if ROOM on SESSION is a direct chat."



reply via email to

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