From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: RFC: String interpolation Date: Tue, 13 Dec 2016 16:10:36 -0800 Message-ID: References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com> <8737hwnc52.fsf@lifelogs.com> <8c117f5c-209a-97d8-79ce-a78f707f0545@gmail.com> <76c9c475-0180-aa49-3d4a-006d4e3f943c@gmail.com> <89a6a20d-e135-caad-6b31-760ab7ac90fc@cs.ucla.edu> <87fultkjte.fsf@lifelogs.com> <3ff9e7e4-aee7-191e-5e3b-4d4ac0006a1f@cs.ucla.edu> <9e138d20-782d-2a56-75f8-37e3fa1885df@cs.ucla.edu> <4e9c0a7e-2d44-5fc7-79d8-7b19758fef01@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1481674357 2805 195.159.176.226 (14 Dec 2016 00:12:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2016 00:12:37 +0000 (UTC) User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.90 (darwin) Cc: Lars Ingebrigtsen , rms@gnu.org, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 14 01:12:32 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 1cGxBP-0008Ap-Lw for ged-emacs-devel@m.gmane.org; Wed, 14 Dec 2016 01:12:31 +0100 Original-Received: from localhost ([::1]:44713 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGxBT-0001ov-VC for ged-emacs-devel@m.gmane.org; Tue, 13 Dec 2016 19:12:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGxAd-0001dZ-TK for emacs-devel@gnu.org; Tue, 13 Dec 2016 19:11:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGxAY-0001fF-Um for emacs-devel@gnu.org; Tue, 13 Dec 2016 19:11:43 -0500 Original-Received: from mail-pf0-f194.google.com ([209.85.192.194]:35777) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGxAY-0001f3-PI; Tue, 13 Dec 2016 19:11:38 -0500 Original-Received: by mail-pf0-f194.google.com with SMTP id i88so102708pfk.2; Tue, 13 Dec 2016 16:11:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mail-followup-to:mime-version; bh=zSsem93tbHRbc+rzQM968Xx8NPueiLTMUnkiFCQBE44=; b=tXZC+SFQWIRDbkHd7VYhXbiPNrIULrg4IRKl0WLP2uIGQZK0e/WWe2ePHmdIOry5QT KgS6BFjCAxnNjAruw4jeBMtQMoTmYZvNdRhCn5EEQjVDqmff6OE/AeIWTmd2Zqwj8GL9 EUZlcu+DcRMvKDncU2yHQRFWDq+LnFHRB44jbmGbAuL02kFYGXUIZvOaTwk+nENV4D22 L5sU5wNQqAyH98fYtUuP6FeKh6NHlqO2MSvIvLcXgh0L3fkAfTtkBDVBpf1kBwypp2Ja ALR55n+apG0Pq97Vez2R8538lJ8QnlLnrXCb/yz2tIuvE52ovqFFg3c4PP+N4u713BDL sSfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:mail-followup-to:mime-version; bh=zSsem93tbHRbc+rzQM968Xx8NPueiLTMUnkiFCQBE44=; b=LBBEtap2T3odNNBfzMNO2c3GIQ8wG5NL2ctC9Rwpc0xeaFSA96fMJVZMU33+ip3JSI qDTlbO7IhEbZPTjejgCqGZPKc8Vn3L7dsE+e8CXm1LmX/zcEJSKSFX2BxdaZumlS0TX2 WrV3JIHwKimUx7nF/lml+6daggyVcYXAj4MQqTxzoz6mcuEDQX4zgvpf74krFmRaAq4j 8O0AF0omwImoLBvx9O2FOCeQDk5FBBOAiiituEMU4Gg2Kwhdk1Sfo2+Z9AQ7INGp885R A8M7LaefxMcF25CpdKnbQJs2J8QOuq59Wo++s9Y5fWrR8X2CyUW2RXO4ONqeqfM5LnLF 5P/Q== X-Gm-Message-State: AKaTC03WJDTnuK8sFoUYF6MeRNAOaXksOjgHOonp93Y1jsihvu6T3XVQwyx15JRELKFBZA== X-Received: by 10.99.22.65 with SMTP id 1mr179604059pgw.70.1481674237551; Tue, 13 Dec 2016 16:10:37 -0800 (PST) Original-Received: from Vulcan.local (76-234-69-149.lightspeed.frokca.sbcglobal.net. [76.234.69.149]) by smtp.gmail.com with ESMTPSA id r74sm82282295pfl.79.2016.12.13.16.10.36 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 13 Dec 2016 16:10:36 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id 8CD8C49E2220; Tue, 13 Dec 2016 16:10:38 -0800 (PST) In-Reply-To: (Paul Eggert's message of "Tue, 13 Dec 2016 16:07:10 -0800") Mail-Followup-To: Paul Eggert , Lars Ingebrigtsen , rms@gnu.org, emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.194 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:210424 Archived-At: >>>>> "PE" == Paul Eggert writes: PE> Apparently some people prefer this style -- it's what started the thread, PE> after all. What if we did something a little more implicit: For a format string, the number of occurrences % in that string determines how many arguments it "consumes". Once that many arguments have been consumed, the process restarts. This way you could just say: (format "This %d" 10 " and this %d" 20) Or: (format "This %d and %d" 10 20 " and this %d" 30) Or: (format "This %d and %d and %d" 10 20 30) Then there is no reason to assign a special meaning to "%" at the end of a format string. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2