[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ement 8128243b5e 1/3: Change: (ement--format-room) Omit
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ement 8128243b5e 1/3: Change: (ement--format-room) Omit empty aliases |
Date: |
Mon, 14 Nov 2022 17:57:40 -0500 (EST) |
branch: externals/ement
commit 8128243b5ea7047615a20c89da33d32fbdbbb17e
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Change: (ement--format-room) Omit empty aliases
---
README.org | 1 +
ement-lib.el | 12 ++++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
index c73fe2c86c..882be2e678 100644
--- a/README.org
+++ b/README.org
@@ -294,6 +294,7 @@ Note that, while ~matrix-client~ remains usable, and
probably will for some time
*Changes*
+ When selecting a room to view with completion, don't offer spaces.
++ When selecting a room with completion, empty aliases are omitted instead of
being displayed as ~<nil>~.
*Fixes*
+ Use of send-message filter when replying.
diff --git a/ement-lib.el b/ement-lib.el
index 47c293b007..814de6ed63 100644
--- a/ement-lib.el
+++ b/ement-lib.el
@@ -1138,18 +1138,22 @@ m.replace metadata)."
"Return ROOM formatted with name, alias, ID, and optionally TOPIC.
Suitable for use in completion, etc."
(if topic
- (format "\"%s\" <%s> (<%s>): \"%s\""
+ (format "\"%s\"%s(<%s>): \"%s\""
(or (ement-room-display-name room)
(setf (ement-room-display-name room)
(ement--room-display-name room)))
- (ement-room-canonical-alias room)
+ (if (ement-room-canonical-alias room)
+ (format " <%s> " (ement-room-canonical-alias room))
+ " ")
(ement-room-id room)
(ement-room-topic room))
- (format "\"%s\" <%s> (<%s>)"
+ (format "\"%s\"%s(<%s>)"
(or (ement-room-display-name room)
(setf (ement-room-display-name room)
(ement--room-display-name room)))
- (ement-room-canonical-alias room)
+ (if (ement-room-canonical-alias room)
+ (format " <%s> " (ement-room-canonical-alias room))
+ " ")
(ement-room-id room))))
(defun ement--members-alist (room)