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

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

[elpa] externals/taxy-magit-section 7035fe347e 2/3: Add: (taxy-magit-sec


From: ELPA Syncer
Subject: [elpa] externals/taxy-magit-section 7035fe347e 2/3: Add: (taxy-magit-section-define-column-definer) help-echo
Date: Thu, 29 Sep 2022 10:58:18 -0400 (EDT)

branch: externals/taxy-magit-section
commit 7035fe347e76aa564eb5a383f88fc3167cb5905e
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Add: (taxy-magit-section-define-column-definer) help-echo
---
 README.org              |  3 ++-
 taxy-magit-section.el   | 13 +++++++++++--
 taxy-magit-section.info | 41 +++++++++++++++++++++++++++--------------
 3 files changed, 40 insertions(+), 17 deletions(-)

diff --git a/README.org b/README.org
index 7004925eb3..333bcb79de 100644
--- a/README.org
+++ b/README.org
@@ -34,7 +34,8 @@ This library renders 
[[https://github.com/alphapapa/taxy.el][Taxy]] structs with
 
 ** 0.11-pre
 
-Nothing new yet.
+*Additions*
++  Truncated column values receive help-echo tooltips so the full value can be 
viewed.
 
 ** 0.10
 
diff --git a/taxy-magit-section.el b/taxy-magit-section.el
index ece019e447..6384f5deaa 100644
--- a/taxy-magit-section.el
+++ b/taxy-magit-section.el
@@ -276,8 +276,17 @@ PLIST may be a plist setting the following options:
                     (progn
                       ,(when max-width
                          `(when ,max-width-variable
-                            (setf string (truncate-string-to-width
-                                          string ,max-width-variable nil nil 
"…"))))
+                            ;; I don't like having to save a copy of the old 
string for
+                            ;; comparison, but given the way 
`truncate-string-to-width'
+                            ;; calculates widths, I don't see much 
alternative.  It would
+                            ;; be nice if it returned nil when no change was 
made.
+                            (let ((old-string string)
+                                  (new-string (truncate-string-to-width
+                                               string ,max-width-variable nil 
nil "…")))
+                              (unless (equal old-string new-string)
+                                ;; String was elided: add help-echo.
+                                (put-text-property 0 (length new-string) 
'help-echo old-string new-string)
+                                (setf string new-string)))))
                       ,(when face
                          ;; Faces are not defined until load time, while this 
checks type at expansion
                          ;; time, so we can only test that the argument is a 
symbol, not a face.
diff --git a/taxy-magit-section.info b/taxy-magit-section.info
index 28bce687f2..889a531bc2 100644
--- a/taxy-magit-section.info
+++ b/taxy-magit-section.info
@@ -31,6 +31,7 @@ structs with magit-section 
(https://melpa.org/#/magit-section).
 
 Changelog
 
+* 0.11-pre: 011-pre. 
 * 0.10: 010. 
 * 0.9.1: 091. 
 * 0.9: 09. 
@@ -67,14 +68,25 @@ File: README.info,  Node: Changelog,  Next: Development,  
Prev: COMMENT Usage,
 
 * Menu:
 
+* 0.11-pre: 011-pre. 
 * 0.10: 010. 
 * 0.9.1: 091. 
 * 0.9: 09. 
 
 
-File: README.info,  Node: 010,  Next: 091,  Up: Changelog
+File: README.info,  Node: 011-pre,  Next: 010,  Up: Changelog
 
-4.1 0.10
+4.1 0.11-pre
+============
+
+*Additions*
+   • Truncated column values receive help-echo tooltips so the full
+     value can be viewed.
+
+
+File: README.info,  Node: 010,  Next: 091,  Prev: 011-pre,  Up: Changelog
+
+4.2 0.10
 ========
 
 *Fixes*
@@ -83,7 +95,7 @@ File: README.info,  Node: 010,  Next: 091,  Up: Changelog
 
 File: README.info,  Node: 091,  Next: 09,  Prev: 010,  Up: Changelog
 
-4.2 0.9.1
+4.3 0.9.1
 =========
 
 *Fixes*
@@ -96,7 +108,7 @@ File: README.info,  Node: 091,  Next: 09,  Prev: 010,  Up: 
Changelog
 
 File: README.info,  Node: 09,  Prev: 091,  Up: Changelog
 
-4.3 0.9
+4.4 0.9
 =======
 
    • ‘taxy-magit-section’ moved to separate package.
@@ -132,16 +144,17 @@ GPLv3
 
 Tag Table:
 Node: Top221
-Node: COMMENT Examples788
-Node: Installation916
-Node: COMMENT Usage1287
-Node: Changelog1412
-Node: 0101579
-Node: 0911722
-Node: 092114
-Node: Development2304
-Node: Credits2531
-Node: License2721
+Node: COMMENT Examples810
+Node: Installation938
+Node: COMMENT Usage1309
+Node: Changelog1434
+Node: 011-pre1623
+Node: 0101824
+Node: 0911983
+Node: 092375
+Node: Development2565
+Node: Credits2792
+Node: License2982
 
 End Tag Table
 



reply via email to

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