From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: RFC: String interpolation Date: Thu, 8 Dec 2016 13:25:56 -0500 Message-ID: <11f2fc68-6e7e-9b5d-504f-6c852cfc37b4@gmail.com> References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BhtexjnDk4AUEMdKfBrTJB3mj9n1AwT3T" X-Trace: blaine.gmane.org 1481221608 27917 195.159.176.226 (8 Dec 2016 18:26:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2016 18:26:48 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 Cc: Emacs developers To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 08 19:26:44 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF3Oz-0006WW-J3 for ged-emacs-devel@m.gmane.org; Thu, 08 Dec 2016 19:26:41 +0100 Original-Received: from localhost ([::1]:48192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cF3P3-0008Ns-Dm for ged-emacs-devel@m.gmane.org; Thu, 08 Dec 2016 13:26:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cF3OP-00088f-5G for emacs-devel@gnu.org; Thu, 08 Dec 2016 13:26:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cF3OL-0001Ec-Kf for emacs-devel@gnu.org; Thu, 08 Dec 2016 13:26:05 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.133]:63976) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cF3OL-0001Df-1m for emacs-devel@gnu.org; Thu, 08 Dec 2016 13:26:01 -0500 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.168]) with ESMTPSA (Nemesis) id 0MYXfl-1cAQh33E1J-00VBcB; Thu, 08 Dec 2016 19:25:56 +0100 In-Reply-To: X-Provags-ID: V03:K0:yDjk+c/TcazA0oI63cLQnyzRPppcgW4nqg1srFEfcgRLvTksxwg +oZW6rfZ2XEpUkxTN0HHk+iA9f1DfHAtIomfvE69ge5Tf+Ujg9+XRpFxr8p7thrTPu48nMM edYDMcPbthD9BRfQFTA0hSqXwpUITIu27pPYI9acrRF+VykKB477GTCv3ZRM8VxtFgrpVzu GFvSzsOzA5ISwYMxyWbTw== X-UI-Out-Filterresults: notjunk:1;V01:K0:3TFqxlk7XmE=:qs/m0iaFmFWNHt0wKBEHsN Q5vVhYzuHEuAJ0wMh1Hi8bKnqQ5ArQhu4dqJThXF3+FqIRRmv4M3ki6ui/sicnjQz8XqLIXVn L4xpgrnur/v6uwTYLcWG/u6XQmJNvzD/VNgb4LhGBnvi2nisTT+1pR/E2W9BW6iCkxD8krn3K udLwFXZk+jeETjU9JDwIaFuumeeM/PAsbBA0fkgT2p5QtoqDpCzGms9SEzlrkm9stF3Eo7o74 DqK2WmcOK2ad0zrfvHoGf42it+x81w2XHg1rNYlSd+0z77sL/b2qhVKnnrgORK4m7CF92+nzM Z1nP5ul1wBr/HOD8pfKpXp6dNtFsNkLySRc6v5cnRatTC/UiTj64tyiTtrMuY3XFqeAMCngho fGHYxkO12A2DL6UiEy6+fFAm+hPEKWcIIoGhAqwFn+lI+8L5BBjZOp6XUnQ3oEP1ItJYVSv1a AmzC0rIPkoXzMt8prKVYKFTMgVPrZXSg3vLfNYsa6N/tZ3B30iQmy+xLt43JYlVgi8XmX5zVG z3vMMKNHt95EsgFMS33FQdnw1+lau6azAy3kC2/+rK5hvxGJjKTa46346sHWPkfseh2/ZR9zr 4mTXQqGNbcs4YMR05qVd9ieLcqIgBmbUb4OlJI+k9qdLjWjuyGaf4FmTbmPV1FbvG7Eqg0vdD VsGSD6JYNMHD5DiGSe/hvlox9wZ6uZYDj3gTJtG5JwlylV/XwB2NkbnBwilKRBUhp8TE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.133 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210143 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BhtexjnDk4AUEMdKfBrTJB3mj9n1AwT3T Content-Type: multipart/mixed; boundary="Fm2J8sKwQ3H3rc21dx2GNEw4VegHDlmpi"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Andreas Schwab Cc: Emacs developers Message-ID: <11f2fc68-6e7e-9b5d-504f-6c852cfc37b4@gmail.com> Subject: Re: RFC: String interpolation References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com> In-Reply-To: --Fm2J8sKwQ3H3rc21dx2GNEw4VegHDlmpi Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-12-08 03:27, Andreas Schwab wrote: >> It would be nice if Emacs offered something similar out of the box. >=20 > (format "The value is %.2f." (1+ value)) Andreas, the implementation I posted uses format under the hood, so I'm n= ot sure what you meant to say :/ The Python RFC that introduced this chan= ge has a discussion of pros and cons of the two approaches (including val= ues to be formatted inside the string or not)=20 In any case, Emacs' format is a function, not a macro: format strings are= parsed at runtime, AFAICT. --Fm2J8sKwQ3H3rc21dx2GNEw4VegHDlmpi-- --BhtexjnDk4AUEMdKfBrTJB3mj9n1AwT3T Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYSaW0AAoJEPqg+cTm90wj0t4P/13PcPfoxqO81YQLeGWam9Jk +QrpnVzKKxGJ32ljA9H3kxRSfowCJ2yLn/TyUkjVnfwWFwHQLSwzvnghUlTihwju kAz8y3Vq3cct1cBXvGcej9/uiA46HsMNU4fbQyx/acSbd8cUVbUVXUWlQUw6itDV uxjPavkCJwwryl24ePJVHRNXGDF4YlIW4OEIhSxBRSOcwyEcreoUkw3OxR5YTGEU YzqYYU9su/oEznVF0TX8v8mnmgjbwOPpT9Yct8j3G6Vmr5k7dvuaNiUZU4uwi32Q jQHXgt0psKKdnb3HwsSNx+ABdmD+NAOSTGuVeW2KKdorvDy8gY/tLgnlOkc4zM1x Rs6+HDecYYzWOZkJWvTzjMF9ZWIHThOK3Fg3tIhkI1EarQBjyBM1recj3MQefctA RQ/15ZU6tE6ZA9h/gd+HrLJG3Xhi4ZqomYYCeQLbBvsQPWAUrOYXgwaOXF7y2ueA soQpiHRXbKhZ1xjzaqoe9/t32mVgCmc1vDF6uOoEovSwXpt8d+useO8fOQlKJw+4 Aojby9fDp3vUlPDQQp/q1IA22UTLiSyGTRZyZcTQvJs/8E90WTlyrrBioPqAPrQi qSANQRN/p5yk/B4Gepq9Y26AA+Cq5lwamxYqICpRgupAN0mA/ZwgVhcrThNrp5ou +3P1atG3RVd20nlMuJc7 =ddNt -----END PGP SIGNATURE----- --BhtexjnDk4AUEMdKfBrTJB3mj9n1AwT3T--