[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ement 378cf89393 1/2: Merge: v0.15.1
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ement 378cf89393 1/2: Merge: v0.15.1 |
Date: |
Thu, 6 Jun 2024 15:57:59 -0400 (EDT) |
branch: externals/ement
commit 378cf893932d00522a6ca485573607113569a1c6
Merge: 93b56076d6 e120fdb3bd
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Merge: v0.15.1
---
README.org | 6 ++++++
ement-directory.el | 8 ++++++--
ement-room-list.el | 7 ++++---
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/README.org b/README.org
index 03eba44437..d88a63c40e 100644
--- a/README.org
+++ b/README.org
@@ -301,6 +301,12 @@ Ement.el doesn't support encrypted rooms natively, but it
can be used transparen
Nothing new yet.
+** 0.15.1
+
+*Fixes*
++ Handle unnamed rooms in ~ement-directory~ list. (See
[[https://github.com/alphapapa/ement.el/issues/248][#248]]. Thanks to
[[https://github.com/hjozwiak][Hunter Jozwiak]] and
[[https://github.com/bmp][Bharath Palavalli]] for reporting.)
++ Don't use ~cl-type~ ~pcase~ form in Emacs versions before 28.
([[https://github.com/alphapapa/ement.el/issues/279][#279]]. Thanks to
[[https://github.com/AdamBark][Adam Bark]] for reporting.)
+
** 0.15
:PROPERTIES:
:ID: 81b48364-56a7-4903-b354-b79905edb039
diff --git a/ement-directory.el b/ement-directory.el
index 8a3fb1954b..73d307042a 100644
--- a/ement-directory.el
+++ b/ement-directory.el
@@ -129,7 +129,9 @@
" ")))
(ement-directory-define-column "Name" (:max-width 25)
- (pcase-let* (((map name ('room_id id) ('room_type type)) item)
+ (pcase-let* (((map name ('room_id id) ('room_type type)
+ ('canonical_alias canonical-alias))
+ item)
((map session) ement-directory-etc)
(room)
(face (pcase type
@@ -139,7 +141,9 @@
(ement--room-direct-p room session))
'ement-room-list-direct
'ement-room-list-name)))))
- (propertize (or name (ement--room-display-name room))
+ ;; NOTE: We can't use `ement--room-display-name' because these aren't room
structs,
+ ;; and we don't have membership data.
+ (propertize (or name canonical-alias "[unnamed]")
'face face)))
(ement-directory-define-column "Alias" (:max-width 25)
diff --git a/ement-room-list.el b/ement-room-list.el
index 8a9c4f28e3..1e966bdaf9 100644
--- a/ement-room-list.el
+++ b/ement-room-list.el
@@ -73,12 +73,13 @@ Used for caching section visibility."
;; Could probably be worked around by binding a special variable around the
creation of
;; the taxy hierarchy that would allow the path to be saved into each taxy.
(pcase-exhaustive (oref section value)
- ;; FIXME(emacs-28): Use `(cl-type taxy-magit-section)' when requiring
Emacs 28. See
+ ;; FIXME(emacs-28): Use `(cl-type taxy-magit-section)' and `(cl-type
ement-room)', et
+ ;; al. when requiring Emacs 28. See
;; <https://github.com/alphapapa/ement.el/issues/272>.
((and (pred taxy-magit-section-p) it)
(taxy-name it))
- (`[,(and (cl-type ement-room) room)
- ,(and (cl-type ement-session) session)]
+ (`[,(and (pred ement-room-p) room)
+ ,(and (pred ement-session-p) session)]
(vector (ement-user-id (ement-session-user session))
(ement-room-id room)))
((pred null) nil)))