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: Sat, 10 Dec 2016 09:25:57 -0500 Message-ID: <8c117f5c-209a-97d8-79ce-a78f707f0545@gmail.com> References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com> <8737hwnc52.fsf@lifelogs.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8J7xLp2rUiEAC9udJJPD5wre57hrLkF6c" X-Trace: blaine.gmane.org 1481379980 25730 195.159.176.226 (10 Dec 2016 14:26:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Dec 2016 14:26:20 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 10 15:26:16 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 1cFibQ-0006Cw-85 for ged-emacs-devel@m.gmane.org; Sat, 10 Dec 2016 15:26:16 +0100 Original-Received: from localhost ([::1]:51936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFibU-0005vg-77 for ged-emacs-devel@m.gmane.org; Sat, 10 Dec 2016 09:26:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFibI-0005vQ-Nm for emacs-devel@gnu.org; Sat, 10 Dec 2016 09:26:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFibF-00028I-KQ for emacs-devel@gnu.org; Sat, 10 Dec 2016 09:26:08 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.187]:57995) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cFibF-00027m-9Y for emacs-devel@gnu.org; Sat, 10 Dec 2016 09:26:05 -0500 Original-Received: from [18.111.108.29] ([18.111.108.29]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.168]) with ESMTPSA (Nemesis) id 0Lj72Q-1cmJrJ1T0Y-00dCly for ; Sat, 10 Dec 2016 15:26:03 +0100 In-Reply-To: X-Provags-ID: V03:K0:r4P/sVydMXakj14riyy0ExOd5oGbYIytuMH+FWYRLjT9XHi499p UNBLgTQnuJyVA4X9/PSHjNRHVySUJHTVr4dMIfW8PGZx77v3xlUMYYvXJhsABVfW0lIdlpB QTpjS0UDSpnU607wrWQ8vmnYG6vRbQ7Uh+SUNBPRjfqEi8fvCuX6WhMF8MZ2Qss2GoqaLN4 YuX09YwmshjbLccPtiaxA== X-UI-Out-Filterresults: notjunk:1;V01:K0:rQY8wsmhqUE=:KHl4JDOBma9hvyM2Hre5XH gXbHqoOVkwNuhdUgU+FhKs14FmsyTYAMOrDhwhhjI2Iqs2AV9PlcvCWNZUIvsbTasBHiYNXb9 5RHFZTJ7klHOQYsUcONSnRehj5cC4D0ml4x4gkn0F/zurkmKGT+nQsxW4sEQaCvh7/g4pSw74 drBimIawX4eWS9eCGELLDeko59EDQGOEi+NR33T8C1QGOdheUgYlSA2erjnrxlvsiCoqoR29w iM/COGSzAkHrGXkuhD+l2qBAgqYAb7EwmTW2PLFClkbiLteHOPILNSEOmGBaZ67Qnabc4mxtx PNObMg33VEQ/9IkIZi2NBREehfQa9cP2DBPUGtZmfv+Nl8nlp072KhXCIYa4jJJ6LRkTlNf3k 8NvGfcsNKwIxoiOaHkqjpTHX97zQ8Jm1tu0XvOy3xzwiJrIWoetrCkkQG6/aHTZWBx2uFgyab e7BDGExLRBk+GcS26oVOVs1aK3yo/Y9RdB7TlpQtyLscSEII5t/I0pj3k7biaY5hK/fkhwTJl +inxTG/q4mwi07bR3eBzPmRNO7tFZvHb7Am3kWiAaQ5uothpFFNy7302+/yTmLNhqbKNMWM46 y0/B4s7r7SN6V3HuuBPButhfgFOsgQ0OMio4q94eaWhBwDGv3xF3ni3uc7hUQDmMvrg8PAbL9 PM4vuc2J8FbR638iHn+DGsuSVIr1JDmxPl0wyvMDRZorI29QFArn4ms60+UPgonBfA6k= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.187 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:210230 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8J7xLp2rUiEAC9udJJPD5wre57hrLkF6c Content-Type: multipart/mixed; boundary="5VHKPPOJi19QA4ToF8djkJSTV21qnsj6q"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: emacs-devel@gnu.org Message-ID: <8c117f5c-209a-97d8-79ce-a78f707f0545@gmail.com> Subject: Re: RFC: String interpolation References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com> <8737hwnc52.fsf@lifelogs.com> In-Reply-To: --5VHKPPOJi19QA4ToF8djkJSTV21qnsj6q Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016-12-10 09:11, Lars Ingebrigtsen wrote: > Ok, but variable is a floating point number, and I only wanted two > decimals, so... er... >=20 > (let ((pvar (format "%.2f" variable))) > "This number is ${pvar}s" >=20 > (You see the equivalent type of code in all languages that have "simple= " > string interpolation, like PHP, all the time.) I thought I adressed this case specifically in my proposal :/ (fmt "This number is $[%.2f]{pvar}s") Cheers, Cl=E9ment. --5VHKPPOJi19QA4ToF8djkJSTV21qnsj6q-- --8J7xLp2rUiEAC9udJJPD5wre57hrLkF6c 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 iQIcBAEBCAAGBQJYTBB6AAoJEPqg+cTm90wjPhUP/iFf4WJeJDP5E+9z6NO5bCiB ilpnbdRp6Ey7oP8b5PQIqM7MDuBnQTI3POHTZ07tYTTdFOWH8h51EhhegHf/cCnj gmMLWeUMO4BL+Bun/73tFzAq2sokzqosNnmsSK58tcw2t/wIZ/uRijMZRbNQgtAa rDw7Wi45u/2XHYQDKastQ/9OWrhKAvP8lMtiVLQ63/8h57L4fUs4CpgRbOEM9EKB ojyaNefxhb2s1N0YHtgiuw036WYZ1DSGJw7/GBvsbpo5FqTTykS8sNUQIRsa/+85 +8kOmif9tOkXkS7u6vR6HOHZOS+Ze6JbJk4M431H6FXz22y4O1Gc3fw+ZkKgLb09 3ejjneBHkzZ7JmdNdxAaXQBxpJXtsNBGqRR4UCiubZvbV0SENZtw3mdr35eKcp85 huqsxDCdmrYm9t5Wxv5OOLXCoAzVuRj97sKLWf947IzDJhUEdq6dCk2NmkRe7fdh T29jKCNE1nIDKt13ndIyz6Z/tISZJ3CIARcC4iyv/CyxokcXcPW1eLmtNT1TnWkt +hVZ/huzRup+Sifc1FnjLz7oLsYVZc94xexR0Mf8vn33kWNwgS/INXL/8YENK7tr p2HWEj/NcoPhSwzKA2tVsdQMSMVUPD652fa0RUEKP/F6+199LnBIvwZ+cIcwieGw HOwE5jyAs8gC9h22CB1m =HlIY -----END PGP SIGNATURE----- --8J7xLp2rUiEAC9udJJPD5wre57hrLkF6c--