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

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

[elpa] externals/ement ee0eb6f9a3 3/3: Fix: (-widget ement-room-membersh


From: ELPA Syncer
Subject: [elpa] externals/ement ee0eb6f9a3 3/3: Fix: (-widget ement-room-membership)
Date: Wed, 24 May 2023 14:58:35 -0400 (EDT)

branch: externals/ement
commit ee0eb6f9a3f04eeb4220c2af94189a75abc86d5d
Merge: ec31709c3a 817ed15adb
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Fix: (-widget ement-room-membership)
    
    Thanks to Steven Allen (@Stebalien).
---
 README.org    |  1 +
 ement-room.el | 11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/README.org b/README.org
index f415cfae79..969150754a 100644
--- a/README.org
+++ b/README.org
@@ -308,6 +308,7 @@ Note that, while ~matrix-client~ remains usable, and 
probably will for some time
 
 *Fixes*
 + Minor adjustment to timestamp headers.
++ Extra indentation of some membership events.  (Thanks to 
[[https://github.com/Stebalien][Steven Allen]].)
 + Customization group for faces.
 
 ** 0.9.3
diff --git a/ement-room.el b/ement-room.el
index aba3b95619..723e9fa31b 100644
--- a/ement-room.el
+++ b/ement-room.el
@@ -3698,12 +3698,11 @@ a copy of the local keymap, and sets 
`header-line-format'."
 (define-widget 'ement-room-membership 'item
   "Widget for membership events."
   ;; FIXME: This makes it hard to add a timestamp according to the buffer's 
message format spec.
-
-  ;; FIXME: The widget value inserts an extra space before the wrap prefix.  
There seems
-  ;; to be no way to fix this while still using a widget for this, so maybe we 
shouldn't
-  ;; use a widget after all.  But it might be good to keep digging for a 
solution so that
-  ;; widgets could be used for other things later...
-  :format "%{ %v %}"
+  ;; NOTE: The widget needs something before and after "%v" to correctly apply 
the
+  ;; `ement-room-membership' face. We could use a zero-width space, but that 
won't work on
+  ;; a TTY. So we use a regular space but replace it with nothing with a 
display spec.
+  :format (let ((zws (propertize " " 'display "")))
+            (concat "%{" zws "%v" zws "%}"))
   :sample-face 'ement-room-membership
   :value-create (lambda (widget)
                   (pcase-let* ((event (widget-value widget)))



reply via email to

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