emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: String interpolation


From: Lars Ingebrigtsen
Subject: Re: RFC: String interpolation
Date: Mon, 12 Dec 2016 22:11:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Richard Stallman <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]