From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.devel Subject: Re: format use inquiry Date: Sat, 1 Jul 2017 10:56:49 +0900 Message-ID: <2FDCF579-44BC-49AD-985F-14AE5C654645@gmail.com> References: <7e7f068e4e.fsf@fencepost.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1498874272 18752 195.159.176.226 (1 Jul 2017 01:57:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Jul 2017 01:57:52 +0000 (UTC) To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 01 03:57:48 2017 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 1dR7fO-0004fF-Ox for ged-emacs-devel@m.gmane.org; Sat, 01 Jul 2017 03:57:46 +0200 Original-Received: from localhost ([::1]:46561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dR7fU-0005GB-0G for ged-emacs-devel@m.gmane.org; Fri, 30 Jun 2017 21:57:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dR7fM-0005G6-VS for emacs-devel@gnu.org; Fri, 30 Jun 2017 21:57:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dR7fJ-0000nn-U0 for emacs-devel@gnu.org; Fri, 30 Jun 2017 21:57:45 -0400 Original-Received: from mail-pg0-x234.google.com ([2607:f8b0:400e:c05::234]:34986) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dR7fJ-0000n2-LD for emacs-devel@gnu.org; Fri, 30 Jun 2017 21:57:41 -0400 Original-Received: by mail-pg0-x234.google.com with SMTP id j186so70921624pge.2 for ; Fri, 30 Jun 2017 18:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=0WG55+LqIeHr6q+fTLiAGrks9UjP9d3t9HWsVhglgKg=; b=PT4jvOGw2nIzbuutgTFvwQwa+CemjgrKEhcCR5ca5F7opzM8ziTKb8blUOOkBVF1Dk WQhqFoUK4b09LYsv7y7KUSz36lH9RwozqYpq6ybl0bR5wBofQg2sFfv6oDhfby45s9c/ 26E6mIqB+dHnl+Dwu2rpYdfUP3ZyHoOPVRt4Y/9f0rAxKb+szqWbJr5BD4s5Y08LXfZM z1PRnfpfTTjw4CO9mJJPcRUDO+yCX7lBTYXXqtvIP+FhnzNENMdyaXY0g7Mq+GUUhBAX JPlup7mxx9zOL4QOk5ZgsT9p19ELWk0GKR3uefqTQi6fdMbqJDK4kn5wjczdpZPGlXrs m1HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=0WG55+LqIeHr6q+fTLiAGrks9UjP9d3t9HWsVhglgKg=; b=F21ZQgw7v/zaVxzSQiQkmmIZoldkBlPEtBXk74OcIspYoeaB5zb/RObkHkdZz6npDS f2FbN5kn5ZeBu0hYGKslrvg+AbjVdxrh3F/uwJGzUqO5bvFqALW1tOMNIXnPnsxJkBo7 7yhRiQxdgQ99RL3cram8WvoahQ7u+66n5xuxc21NS3tGIYsKhHLtnsRWHBkYexmh7wkp NTup4oIxz1tK/b9c3e3gnIQYEH0KYThG9C8PlCiib/M8poanf28roxJwo8fnhtNY4fxX KZb509Zymsonio0YZWbVCCKdIZCndOTg6b2RFIgbZNVbPI2fc1vZJtezuX39qX0MXhgd Al+g== X-Gm-Message-State: AKS2vOzgf7sEzUGhS2R8zP26h9N6QuZY5hi22AVPsqNh9+DxywFam2zK jVCkX9BduTBqQt6UEpI= X-Received: by 10.84.128.1 with SMTP id 1mr27746843pla.244.1498874260364; Fri, 30 Jun 2017 18:57:40 -0700 (PDT) Original-Received: from [10.251.103.141] ([210.160.37.44]) by smtp.gmail.com with ESMTPSA id s62sm22113253pfi.36.2017.06.30.18.57.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jun 2017 18:57:39 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::234 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:216066 Archived-At: > On Jun 22, 2017, at 10:57, Richard Stallman wrote: >=20 >>> (format "http%s://elpa.gnu.org/packages/" >>> (if (gnutls-available-p) "s" = "")) >=20 >> Yes, it is. But obviously I think that, since I wrote it. >=20 > I agree it is acceptable, but this looks like something that might be > needed in a number of places, so perhaps we should make a nicer > interface to do it. There is only one instance of such a query in package.el and no other = package in the emacs distribution seems to use gnutls-available-p to add = an "s" to http. Paul suggested that it would be a maintenance hassle to keep 2 almost = identical urls if we spelled them out as Yuri suggested but I checked = other source packages and for ex auth-source-pass-tests.el explicitly = spells out all the urls without resorting to smart formatting to save a = few characters. Also, considering the way %s is abused in other places package.el, for = ex in: (message "%d package%s marked for upgrading." = =20 (length upgrades) = =20 (if (=3D (length upgrades) 1) "" "s")))))=20 I don't think it is good to keep the above code because it gives bad = incentives to authors especially if work on i18n/l10n proceeds (even = though http/https is not related to l10n). So, I'm going to spell out the urls as I proceed with untangling code = and translatable strings in package.el. I'll send a diff here when I'm = done for evaluation. Jean-Christophe=20=