From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Lars Ingebrigtsen <larsi@gnus.org>
Newsgroups: gmane.emacs.devel
Subject: Re: RFC: String interpolation
Date: Mon, 12 Dec 2016 22:11:23 +0100
Message-ID: <m34m28am4k.fsf@gnus.org>
References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com>
	<8737hwnc52.fsf@lifelogs.com> <m34m2bj2m2.fsf@gnus.org>
	<8c117f5c-209a-97d8-79ce-a78f707f0545@gmail.com>
	<m3wpf7hjzf.fsf@gnus.org>
	<76c9c475-0180-aa49-3d4a-006d4e3f943c@gmail.com>
	<m3oa0ifgvd.fsf@gnus.org> <m2k2b6rxaj.fsf@gmail.com>
	<m38trmdun6.fsf@gnus.org>
	<jwvr35dub31.fsf-monnier+gmane.emacs.devel@gnu.org>
	<m3r35dcwht.fsf@gnus.org> <E1cGWVU-0007Mv-Ge@fencepost.gnu.org>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: blaine.gmane.org 1481577141 27813 195.159.176.226 (12 Dec 2016 21:12:21 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 12 Dec 2016 21:12:21 +0000 (UTC)
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
To: Richard Stallman <rms@gnu.org>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 12 22:12:13 2016
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
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 <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1cGXtM-0005ra-4D
	for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 22:12:12 +0100
Original-Received: from localhost ([::1]:33625 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1cGXtQ-0006ya-B6
	for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 16:12:16 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53412)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <larsi@gnus.org>) id 1cGXss-0006yT-H2
	for emacs-devel@gnu.org; Mon, 12 Dec 2016 16:11:43 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <larsi@gnus.org>) id 1cGXsp-0001fE-Eo
	for emacs-devel@gnu.org; Mon, 12 Dec 2016 16:11:42 -0500
Original-Received: from hermes.netfonds.no ([80.91.224.195]:54318)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <larsi@gnus.org>)
	id 1cGXsp-0001cx-8Q; Mon, 12 Dec 2016 16:11:39 -0500
Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=stories)
	by hermes.netfonds.no with esmtpsa
	(TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2)
	(envelope-from <larsi@gnus.org>)
	id 1cGXsa-0006VQ-6e; Mon, 12 Dec 2016 22:11:28 +0100
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAADFBMVEUzJSG/mJZmUUoUCwlI
	2qOxAAACRklEQVQokU2ST0iTcRzGn+2lmG/iezIwOixrMJfEMrrE2k/wUiOYpr+5TclqFNsr9Apd
	BedqoB56I3xD7DI3Fr6vkeYxxM0/iX+gnbsF5cHVYU4CHe/89h59bp/LA8/DB/xM0C1VJpOUBHwO
	G0aowy44ALDzN/HSBHY3vT4RbhsUM4O2IdO7C68OhRkwY7YpiGkNwYoBxhoi8YZUHqNe9wSj6a7P
	LkNHZ0U0JDpUWtMhHcEmUZYKc4NI8wTuNerR1UTKqX+0INCeCL3RVnrzsgUjlzW+rGd7v2nTCXRt
	H/A79tximyZabRdOQls1gzn35zXE/04O/xQMVbiY0SBf9+Qg7YTBsxzh10VWohPePdXCwb8yskDr
	8yU4Ql/U0i865I8praPfr8JJp7yHnctjgAVP3+6ZPERr1iEE/8wsaTH7OIdC6ylj0NSU2y6OICXn
	RaVqZ5uihq7ToYpd/eejY3se8XrQUVb3Gatas4d3XshZ9sOvfJ/QET94EjUKnnoiAxfk6nj4UsF1
	N7LwqQGBQwq3FZpXIwu5Hch1KrrY+0IWuX0EVqmms7JkqO0c98eo2lkoC/MSOJ4vUl3u+y0YSwM2
	xIh29f5jh9HRfQXPNsgTSZBnhvIaeMZ0Z0O0HjNnexB1mld9Cr1T/Y90DBbIabbUIitqeQ4POrzT
	ZnPjQ+FoQ8dYxXtN2L6RFehoDqO3mFulp41ZVqxjpGhfWm6SM63JkgWWGyk9+sqdlOroLEnsQ3No
	uZZR1xDYEP5s8Vk/Mr46zir2H7UIEGMyyHN5AAAAAElFTkSuQmCC
In-Reply-To: <E1cGWVU-0007Mv-Ge@fencepost.gnu.org> (Richard Stallman's message
	of "Mon, 12 Dec 2016 14:43:28 -0500")
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 80.91.224.195
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-devel/>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Original-Sender: "Emacs-devel" <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.devel:210375
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/210375>

Richard Stallman <rms@gnu.org> writes:

>     > (fmt "This is %{:thing}.2f"
>     >      :thing (replace-regexp-in-string " +" " " thing))
>
> Another syntactical issue is that '%{thing}.2f' has a problem:
> Does it mean %{thing} formatted according to '.2f', or
> %{thing} followed by the text '.2f'?
>
> Using the syntax '%[.2f]{thing}' is superior because it avoids
> any syntactic ambiguity.

Hm...  I don't think there's any ambiguity, really.  The syntax for
format specs is still %<stuff><letter>.  So %{thing}.2f is unambiguously
the value of `thing' formatted as a floating point with two decimal
places.

I mean, %{thing}.2f isn't a valid formatting directive today, so I'm
afraid I don't quite see the ambiguity.  Unless I'm missing something
here...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no