From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#35331: [PATCH] Neater html table of old versions in ELPA Date: Mon, 13 May 2019 17:18:38 +0200 Message-ID: References: <17FAA112-7D1A-49F1-8156-95FED817E370@acm.org> <87lg03pcgs.fsf@tcd.ie> <491EC399-F6F1-4512-8926-69BA056B73A1@acm.org> <299F3CF6-3DA6-4B95-BFEB-B462875FBFBA@acm.org> <87lfzae8jg.fsf@tcd.ie> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_49AE0AF7-42E1-4032-8778-1DBD1E877714" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="67079"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35331@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 13 17:33:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQCwx-000HIE-Cg for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 May 2019 17:33:11 +0200 Original-Received: from localhost ([127.0.0.1]:59188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQCww-0005Jm-AT for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 May 2019 11:33:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQCui-0003oo-4Y for bug-gnu-emacs@gnu.org; Mon, 13 May 2019 11:30:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQCjH-0006zk-75 for bug-gnu-emacs@gnu.org; Mon, 13 May 2019 11:19:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60646) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQCjG-0006yO-0w for bug-gnu-emacs@gnu.org; Mon, 13 May 2019 11:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hQCjF-00072J-MO for bug-gnu-emacs@gnu.org; Mon, 13 May 2019 11:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 May 2019 15:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35331 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35331-submit@debbugs.gnu.org id=B35331.155776072727023 (code B ref 35331); Mon, 13 May 2019 15:19:01 +0000 Original-Received: (at 35331) by debbugs.gnu.org; 13 May 2019 15:18:47 +0000 Original-Received: from localhost ([127.0.0.1]:45957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQCj0-00071m-KE for submit@debbugs.gnu.org; Mon, 13 May 2019 11:18:46 -0400 Original-Received: from mail235c50.megamailservers.eu ([91.136.10.245]:54148 helo=mail56c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQCix-00071a-IP for 35331@debbugs.gnu.org; Mon, 13 May 2019 11:18:46 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1557760720; bh=008WBlnLdoh2U1GEsOdt1K3MGn5xwBp0O1btYTXXFc4=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=pFdOlaxCc0nxileq5g51e2cBuMM53ue+PW+rDhg+NQ0x5dJTY3bPvxdOOjW08A4Br gRnW0/90iBjZEwuPizCAsSM5/zOQrnrdajnGoyaXIgGF5BDwFlYfmsQOsz6cziuN7z lf0JWbmMIssALAChYmSCj1XlowCgBFxIRrleEyc0= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail56c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x4DFIcoe012790; Mon, 13 May 2019 15:18:39 +0000 In-Reply-To: <87lfzae8jg.fsf@tcd.ie> X-Mailer: Apple Mail (2.3445.104.8) X-CTCH-RefID: str=0001.0A0B020E.5CD98AD0.0025, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=J7GEEjvS c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=L1rlWnzqkHRX4g95PGMA:9 a=CjuIK1q_8ugA:10 a=PRoeUXaspWimDL_0RbcA:9 a=B2y7HmGcmWMA:10 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:159188 Archived-At: --Apple-Mail=_49AE0AF7-42E1-4032-8778-1DBD1E877714 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 13 maj 2019 kl. 16.25 skrev Basil L. Contovounesios : >=20 > Is it possible to reuse file-size-human-readable here? That either requires modifying that function to (optionally) put a hard = space between the number and unit, or post-processing its return value = to achieve the same effect. The former is obviously the heroic way to = go. Patch attached! > Does the no-break space have to be a HTML entity, > or can it be Unicode ?\u00A0? Probably either would do, but since we don't control the web browser = interpreting it, I went with what I thought was the safer option. --Apple-Mail=_49AE0AF7-42E1-4032-8778-1DBD1E877714 Content-Disposition: attachment; filename=0001-Optional-space-in-file-size-human-readable.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Optional-space-in-file-size-human-readable.patch" Content-Transfer-Encoding: quoted-printable =46rom=2035a8001e6293748876ce0e1a5929222fedb696d8=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Mon,=2013=20May=202019=2017:05:24=20+0200=0A= Subject:=20[PATCH]=20Optional=20space=20in=20`file-size-human-readable'=0A= =0AReadability=20and=20correct=20usage=20requires=20a=20space=20between=20= a=20number=20and=0Aits=20unit=20of=20measurement;=20add=20an=20optional=20= argument=20to=0A`file-size-human-readable'=20to=20provide=20the=20= desired=20string=20to=20put=20in=0Athat=20place.=20=20For=20= compatibility,=20the=20default=20is=20an=20empty=20string.=0A=0A*=20= lisp/files.el=20(file-size-human-readable):=20Add=20optional=20SPACE=20= argument.=0A(files--ask-user-about-large-file,=20= warn-maybe-out-of-memory):=0AUse=20the=20new=20argument.=0A*=20= lisp/url/url-http.el=20(url-http-simple-after-change-function)=0A= (url-http-content-length-after-change-function):=0AUse=20the=20new=20= argument.=0A*=20etc/NEWS=20(Lisp=20Changes):=20Mention=20the=20change.=0A= ---=0A=20etc/NEWS=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=207=20= +++++++=0A=20lisp/files.el=20=20=20=20=20=20=20=20|=2021=20= ++++++++++++++-------=0A=20lisp/url/url-http.el=20|=2011=20++++++-----=0A= =203=20files=20changed,=2027=20insertions(+),=2012=20deletions(-)=0A=0A= diff=20--git=20a/etc/NEWS=20b/etc/NEWS=0Aindex=2043ad8be1cc..e2bffe7a2b=20= 100644=0A---=20a/etc/NEWS=0A+++=20b/etc/NEWS=0A@@=20-1983,6=20+1983,13=20= @@=20returns=20a=20regexp=20that=20never=20matches=20anything,=20which=20= is=20an=20identity=20for=0A=20this=20operation.=20=20Previously,=20the=20= empty=20string=20was=20returned=20in=20this=0A=20case.=0A=20=0A++++=0A= +**=20The=20function=20'file-size-human-readable'=20accepts=20another=20= optional=20argument.=0A+The=20new=20third=20argument=20is=20a=20string=20= put=20between=20the=20number=20and=20unit;=0A+if=20nil=20or=20omitted,=20= the=20empty=20string=20is=20used.=20=20It=20is=20recommended=20to=20use=0A= +a=20single=20space=20or=20non-breaking=20space=20for=20readability=20= and=20correct=0A+usage.=0A+=0A=20=0C=0A=20*=20Changes=20in=20Emacs=20= 27.1=20on=20Non-Free=20Operating=20Systems=0A=20=0Adiff=20--git=20= a/lisp/files.el=20b/lisp/files.el=0Aindex=208477c227bc..a2f160fdae=20= 100644=0A---=20a/lisp/files.el=0A+++=20b/lisp/files.el=0A@@=20-1358,7=20= +1358,7=20@@=20it=20means=20chase=20no=20more=20than=20that=20many=20= links=20and=20then=20stop."=0A=20=0A=20;;=20A=20handy=20function=20to=20= display=20file=20sizes=20in=20human-readable=20form.=0A=20;;=20See=20= http://en.wikipedia.org/wiki/Kibibyte=20for=20the=20reference.=0A-(defun=20= file-size-human-readable=20(file-size=20&optional=20flavor)=0A+(defun=20= file-size-human-readable=20(file-size=20&optional=20flavor=20space)=0A=20= =20=20"Produce=20a=20string=20showing=20FILE-SIZE=20in=20human-readable=20= form.=0A=20=0A=20Optional=20second=20argument=20FLAVOR=20controls=20the=20= units=20and=20the=20display=20format:=0A@@=20-1368,7=20+1368,12=20@@=20= Optional=20second=20argument=20FLAVOR=20controls=20the=20units=20and=20= the=20display=20format:=0A=20=20If=20FLAVOR=20is=20`si',=20each=20= kilobyte=20is=201000=20bytes=20and=20the=20produced=20suffixes=0A=20=20=20= =20=20are=20\"k\",=20\"M\",=20\"G\",=20\"T\",=20etc.=0A=20=20If=20FLAVOR=20= is=20`iec',=20each=20kilobyte=20is=201024=20bytes=20and=20the=20produced=20= suffixes=0A-=20=20=20=20are=20\"KiB\",=20\"MiB\",=20\"GiB\",=20\"TiB\",=20= etc."=0A+=20=20=20=20are=20\"KiB\",=20\"MiB\",=20\"GiB\",=20\"TiB\",=20= etc.=0A+=0A+Optional=20third=20argument=20SPACE=20is=20a=20string=20put=20= between=20the=20number=20and=20unit.=0A+If=20nil=20or=20omitted,=20the=20= empty=20string=20is=20used.=0A+Recommended=20value=20is=20a=20single=20= space=20or=20non-breaking=20space,=20unless=20other=0A+constraints=20= prohibit=20a=20space=20in=20that=20position."=0A=20=20=20(let=20((power=20= (if=20(or=20(null=20flavor)=20(eq=20flavor=20'iec))=0A=20=09=09=20=20=20= 1024.0=0A=20=09=09=201000.0))=0A@@=20-1379,9=20+1384,10=20@@=20Optional=20= second=20argument=20FLAVOR=20controls=20the=20units=20and=20the=20= display=20format:=0A=20=20=20=20=20=20=20(setq=20file-size=20(/=20= file-size=20power)=0A=20=09=20=20=20=20post-fixes=20(cdr=20post-fixes)))=0A= =20=20=20=20=20(format=20(if=20(>=20(mod=20file-size=201.0)=200.05)=0A-=09= =09"%.1f%s%s"=0A-=09=20=20=20=20=20=20"%.0f%s%s")=0A+=09=09"%.1f%s%s%s"=0A= +=09=20=20=20=20=20=20"%.0f%s%s%s")=0A=20=09=20=20=20=20file-size=0A+=20=20= =20=20=20=20=20=20=20=20=20=20(or=20space=20"")=0A=20=09=20=20=20=20(if=20= (and=20(eq=20flavor=20'iec)=20(string=3D=20(car=20post-fixes)=20"k"))=0A=20= =09=09"K"=0A=20=09=20=20=20=20=20=20(car=20post-fixes))=0A@@=20-2054,7=20= +2060,7=20@@=20think=20it=20does,=20because=20\"free\"=20is=20pretty=20= hard=20to=20define=20in=20practice."=0A=20(defun=20= files--ask-user-about-large-file=20(size=20op-type=20filename=20= offer-raw)=0A=20=20=20(let=20((prompt=20(format=20"File=20%s=20is=20= large=20(%s),=20really=20%s?"=0A=20=09=09=20=20=20=20=20=20=20=20= (file-name-nondirectory=20filename)=0A-=09=09=20=20=20=20=20=20=20=20= (file-size-human-readable=20size)=20op-type)))=0A+=09=09=20=20=20=20=20=20= =20=20(file-size-human-readable=20size=20'iec=20"=20")=20op-type)))=0A=20= =20=20=20=20(if=20(not=20offer-raw)=0A=20=20=20=20=20=20=20=20=20(if=20= (y-or-n-p=20prompt)=20nil=20'abort)=0A=20=20=20=20=20=20=20(let*=20= ((use-dialog=20(and=20(display-popup-menus-p)=0A@@=20-2106,9=20+2112,10=20= @@=20returns=20nil=20or=20exits=20non-locally."=0A=20exceeds=20the=20= %S%%=20of=20currently=20available=20free=20memory=20(%s).=0A=20If=20that=20= fails,=20try=20to=20open=20it=20with=20`find-file-literally'=0A=20\(but=20= note=20that=20some=20characters=20might=20be=20displayed=20= incorrectly)."=0A-=09=20=20=20=20=20(file-size-human-readable=20size)=0A= +=09=20=20=20=20=20(file-size-human-readable=20size=20'iec=20"=20")=0A=20= =09=20=20=20=20=20out-of-memory-warning-percentage=0A-=09=20=20=20=20=20= (file-size-human-readable=20(*=20total-free-memory=201024)))))))))=0A+=09= =20=20=20=20=20(file-size-human-readable=20(*=20total-free-memory=20= 1024)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'iec=20"=20"))))))))=0A= =20=0A=20(defun=20files--message=20(format=20&rest=20args)=0A=20=20=20= "Like=20`message',=20except=20sometimes=20don't=20print=20to=20= minibuffer.=0Adiff=20--git=20a/lisp/url/url-http.el=20= b/lisp/url/url-http.el=0Aindex=20662b6664b1..3baf5c6b19=20100644=0A---=20= a/lisp/url/url-http.el=0A+++=20b/lisp/url/url-http.el=0A@@=20-999,7=20= +999,8=20@@=20should=20be=20shown=20to=20the=20user."=0A=20(defun=20= url-http-simple-after-change-function=20(_st=20_nd=20_length)=0A=20=20=20= ;;=20Function=20used=20when=20we=20do=20NOT=20know=20how=20long=20the=20= document=20is=20going=20to=20be=0A=20=20=20;;=20Just=20_very_=20simple=20= 'downloaded=20%d'=20type=20of=20info.=0A-=20=20(url-lazy-message=20= "Reading=20%s..."=20(file-size-human-readable=20(buffer-size))))=0A+=20=20= (url-lazy-message=20"Reading=20%s..."=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(file-size-human-readable=20(buffer-size)=20= 'iec=20"=20")))=0A=20=0A=20(defun=20= url-http-content-length-after-change-function=20(_st=20nd=20_length)=0A=20= =20=20"Function=20used=20when=20we=20DO=20know=20how=20long=20the=20= document=20is=20going=20to=20be.=0A@@=20-1012,16=20+1013,16=20@@=20the=20= callback=20to=20be=20triggered."=0A=20=20=20=20=20=20=20=20= (url-percentage=20(-=20nd=20url-http-end-of-headers)=0A=20=09=09=20=20=20= =20=20=20=20url-http-content-length)=0A=20=20=20=20=20=20=20=20= url-http-content-type=0A-=20=20=20=20=20=20=20(file-size-human-readable=20= (-=20nd=20url-http-end-of-headers))=0A-=20=20=20=20=20=20=20= (file-size-human-readable=20url-http-content-length)=0A+=20=20=20=20=20=20= =20(file-size-human-readable=20(-=20nd=20url-http-end-of-headers)=20'iec=20= "=20")=0A+=20=20=20=20=20=20=20(file-size-human-readable=20= url-http-content-length=20'iec=20"=20")=0A=20=20=20=20=20=20=20=20= (url-percentage=20(-=20nd=20url-http-end-of-headers)=0A=20=09=09=20=20=20= =20=20=20=20url-http-content-length))=0A=20=20=20=20=20= (url-display-percentage=0A=20=20=20=20=20=20"Reading...=20%s=20of=20%s=20= (%d%%)"=0A=20=20=20=20=20=20(url-percentage=20(-=20nd=20= url-http-end-of-headers)=0A=20=09=09=20=20=20=20=20= url-http-content-length)=0A-=20=20=20=20=20(file-size-human-readable=20= (-=20nd=20url-http-end-of-headers))=0A-=20=20=20=20=20= (file-size-human-readable=20url-http-content-length)=0A+=20=20=20=20=20= (file-size-human-readable=20(-=20nd=20url-http-end-of-headers)=20'iec=20= "=20")=0A+=20=20=20=20=20(file-size-human-readable=20= url-http-content-length=20'iec=20"=20")=0A=20=20=20=20=20=20= (url-percentage=20(-=20nd=20url-http-end-of-headers)=0A=20=09=09=20=20=20= =20=20url-http-content-length)))=0A=20=0A--=20=0A2.20.1=20(Apple=20= Git-117)=0A=0A= --Apple-Mail=_49AE0AF7-42E1-4032-8778-1DBD1E877714--