[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ement e6b9c40ce7 2/2: Change: (ement-room-list-default-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ement e6b9c40ce7 2/2: Change: (ement-room-list-default-keys) Update |
Date: |
Tue, 14 Mar 2023 10:57:51 -0400 (EDT) |
branch: externals/ement
commit e6b9c40ce7188f23aac97c8512692bd097d4726f
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Change: (ement-room-list-default-keys) Update
This is probably more generally useful, especially with the new
ement-room-toggle-space command.
---
README.org | 1 +
ement-room-list.el | 35 +++++++++++++++++++++++++++--------
2 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/README.org b/README.org
index b13bba5e9a..aae760c611 100644
--- a/README.org
+++ b/README.org
@@ -304,6 +304,7 @@ Note that, while ~matrix-client~ remains usable, and
probably will for some time
+ Room-related commands may be called interactively with a universal prefix to
prompt for the room/session (allowing to send events or change settings in
rooms other than the current one).
+ Command ~ement-room-list~ reuses an existing window showing the room list
when possible. ([[https://github.com/alphapapa/ement.el/issues/131][#131]].
Thanks to [[https://github.com/jeffbowman][Jeff Bowman]] for suggesting.)
+ Command ~ement-tag-room~ toggles tags (rather than adding by default and
removing when called with a prefix).
++ Default room grouping now groups "spaced" rooms separately.
*Fixes*
diff --git a/ement-room-list.el b/ement-room-list.el
index 7e6392cca5..480bc21489 100644
--- a/ement-room-list.el
+++ b/ement-room-list.el
@@ -272,18 +272,37 @@ from recent to non-recent for rooms updated in the past
hour.")
"Low-priority")))
(defcustom ement-room-list-default-keys
- '((space-p space)
+ '(;; First, group all invitations (this group will appear first since the
rooms are
+ ;; already sorted first).
((membership :status 'invite))
+ ;; Group all left rooms (this group will appear last, because the rooms
are already
+ ;; sorted last).
+ ((membership :status 'leave))
+ ;; Group all favorite rooms, which are already sorted first.
(favourite)
+ ;; Group all low-priority rooms, which are already sorted last, and within
that group,
+ ;; group them by their space, if any.
+ (low-priority space)
+ ;; Group other rooms which are opened in a buffer.
(buffer)
- ((membership :status 'leave))
- (low-priority)
+ ;; Group other rooms which are unread.
(unread)
- ((latest :name "Last 24h" :newer-than 86400))
- (latest :name "Older than 90d" :older-than (* 86400 90))
- people
- freshness
- (space))
+ ;; Group other rooms which are in a space by freshness, then by space.
+ ((and :name "Spaced"
+ :keys ((not space-p)
+ space))
+ freshness space)
+ ;; Group spaces themselves by their parent space (since space headers
can't also be
+ ;; items, we have to handle them separately; a bit of a hack, but not too
bad).
+ ((and :name "Spaces" :keys (space-p))
+ space)
+ ;; Group rooms which aren't in spaces by their freshness.
+ ((and :name "Unspaced"
+ :keys ((not space)
+ (not people)))
+ freshness)
+ ;; Group direct rooms by freshness.
+ (people freshness))
"Default keys."
:type 'sexp)