[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive 80d68a0378 16/30: Change: Replace -timestamp-wi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive 80d68a0378 16/30: Change: Replace -timestamp-width with -timestamp-format-string |
Date: |
Wed, 6 Sep 2023 18:59:43 -0400 (EDT) |
branch: elpa/hyperdrive
commit 80d68a03785a9d3b57f93a4f9237ef1cb5f914a2
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Change: Replace -timestamp-width with -timestamp-format-string
Also, use display space property to fill gaps.
---
hyperdrive-dir.el | 6 ++++--
hyperdrive-history.el | 6 ++++--
hyperdrive-vars.el | 15 +++++++--------
3 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index d4e889327c..013ac73245 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -143,7 +143,7 @@ Columns are suffixed with up/down arrows according to
'mouse-face 'highlight)
headers)))
(concat prefix "\n"
- (apply #'format (concat "%6s " hyperdrive-timestamp-format-string
" %s")
+ (apply #'format (format "%%6s %%%ds %%s"
hyperdrive-timestamp-width)
(nreverse headers)))))
(defun hyperdrive-dir-complete-sort ()
@@ -184,7 +184,9 @@ To be used as the pretty-printer for `ewoc-create'."
'default))
(timestamp (if mtime
(format-time-string hyperdrive-timestamp-format
mtime)
- (format hyperdrive-timestamp-format-string " "))))
+ (propertize " "
+ 'display
+ '(space :width
hyperdrive-timestamp-width)))))
(format "%6s %s %s"
(propertize (or size "")
'face 'hyperdrive-size)
diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 27a04e2d38..74a08a5e2a 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -60,7 +60,9 @@ and whose cdr is a hyperdrive entry."
(file-size-human-readable size)))
(timestamp (if mtime
(format-time-string hyperdrive-timestamp-format
mtime)
- (format hyperdrive-timestamp-format-string " "))))
+ (propertize " "
+ 'display
+ '(space :width
hyperdrive-timestamp-width)))))
;; FIXME: Use dynamic width of range column equal to 2N+1, where N
;; is the width of the hyperdrive's latest version
(format "%7s %13s %6s %s"
@@ -179,7 +181,7 @@ Universal prefix argument \\[universal-argument] forces
(propertize "Exists?" 'face
'hyperdrive-column-header)
(propertize "Version Range" 'face
'hyperdrive-column-header)
(propertize "Size" 'face
'hyperdrive-column-header)
- (format
hyperdrive-timestamp-format-string
+ (format (format "%%%ds"
hyperdrive-timestamp-width)
(propertize "Last Modified"
'face 'hyperdrive-column-header)))))
(queue) (ewoc))
(with-current-buffer (get-buffer-create
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index 3dd5e29173..f60aac7732 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -70,20 +70,19 @@
Defaults to `eww-download-directory'."
:type '(file :must-match t))
-(defvar hyperdrive-timestamp-format-string)
+(defvar hyperdrive-timestamp-width)
(defcustom hyperdrive-timestamp-format "%x %X"
"Format string used for timestamps.
Passed to `format-time-string', which see."
:type 'string
:set (lambda (option value)
(set-default option value)
- (setf hyperdrive-timestamp-format-string
- (format "%%%ds"
- ;; FIXME: This value varies based on current
- ;; time. (format-time-string "%-I") will
- ;; be one or two characters long
- ;; depending on the time of day
- (string-width (format-time-string value))))))
+ (setf hyperdrive-timestamp-width
+ ;; FIXME: This value varies based on current
+ ;; time. (format-time-string "%-I") will
+ ;; be one or two characters long
+ ;; depending on the time of day
+ (string-width (format-time-string value)))))
(defcustom hyperdrive-directory-display-buffer-action
'(display-buffer-same-window)
- [nongnu] elpa/hyperdrive 736f2e9d03 01/30: Change: (hyperdrive--fill) Check writability based on Allow header, (continued)
- [nongnu] elpa/hyperdrive 736f2e9d03 01/30: Change: (hyperdrive--fill) Check writability based on Allow header, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive dbbe0ecd43 05/30: Add: (hyperdrive-time-greater-p) Inverse of time-less-p, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive 6d41b67aab 04/30: Comment: Add TODO, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive 838b34927c 03/30: Change: (hyperdrive-sort-entries) Rename BY argument to DIRECTION, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive 5f1d617ae1 11/30: Change: (hyperdrive-dir-sort-fields) Add description, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive 09e4dba5b2 14/30: Tidy: (hyperdrive-dir-column-headers) let-bind selected/arrow-after, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive 57d02e33f4 15/30: Change: (hyperdrive-dir-column-headers) Add mouse-face, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive 303109d76e 19/30: Fix: Typo, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive 8d47207e21 21/30: Docs: Document clickable directory column headers, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive dc54ccbfbf 12/30: Tidy: (hyperdrive-dir-column-headers) Reduce duplication, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive 80d68a0378 16/30: Change: Replace -timestamp-width with -timestamp-format-string,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive dc2488436d 17/30: Change: (hyperdrive-dir-column-headers) Fix column headers highlight, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive a39567f697 24/30: Change: (hyperdrive--fill) Use string-match-p, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive 447994e8b2 13/30: Change: (hyperdrive-dir-column-headers) Clickable column headers, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive db30be6a57 28/30: Comment: Update TODO, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive bbd78c6361 23/30: Docs: Update customization option docs, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive 53927eb0a9 25/30: Merge branch 'check-writablep', ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive fcda78fd06 30/30: Merge branch 'dir-sort-clickable', ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive 68ee5c5213 22/30: Meta: Update changelog, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive decf302b97 27/30: Fix: Require url, ELPA Syncer, 2023/09/06
- [nongnu] elpa/hyperdrive eaf2e5104f 29/30: Comment: Remove TODOs, ELPA Syncer, 2023/09/06