bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#35331: [PATCH] Neater html table of old versions in ELPA


From: Basil L. Contovounesios
Subject: bug#35331: [PATCH] Neater html table of old versions in ELPA
Date: Mon, 13 May 2019 15:25:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Mattias Engdegård <mattiase@acm.org> writes:

> diff --git a/admin/archive-contents.el b/admin/archive-contents.el
> index de444e381..c4c2e5af1 100644
> --- a/admin/archive-contents.el
> +++ b/admin/archive-contents.el
> @@ -387,16 +387,14 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
>  
>  (defun archive--html-bytes-format (bytes) ;Aka memory-usage-format.
>    (setq bytes (/ bytes 1024.0))
> -  (let ((units '(;; "B"
> -                 "kB" "MB" "GB" "TB")))
> +  (let ((units '("KiB" "MiB" "GiB" "TiB")))
>      (while (>= bytes 1024)
>        (setq bytes (/ bytes 1024.0))
>        (setq units (cdr units)))
>      (cond
> -     ;; ((integerp bytes) (format "%4d%s" bytes (car units)))
> -     ((>= bytes 100) (format "%4.0f%s" bytes (car units)))
> -     ((>= bytes 10) (format "%4.1f%s" bytes (car units)))
> -     (t (format "%4.2f%s" bytes (car units))))))
> +     ((>= bytes 100) (format "%4.0f&nbsp;%s" bytes (car units)))
> +     ((>= bytes 10) (format "%4.1f&nbsp;%s" bytes (car units)))
> +     (t (format "%4.2f&nbsp;%s" bytes (car units))))))

Is it possible to reuse file-size-human-readable here?

Does the no-break space have to be a HTML entity,
or can it be Unicode ?\u00A0?

Thanks,

-- 
Basil





reply via email to

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