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

From: "Basil L. Contovounesios" <[email-masked]>
Date: Mon, 13 May 2019 15:25:07 +0100

Mattias Engdegård <[email-masked]> 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