From: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: npostavs@gmail.com, emacs-devel@gnu.org
Subject: Re: package.el strings
Date: Sun, 17 Jun 2018 23:45:46 +0900 [thread overview]
Message-ID: <FC076E26-CF38-4566-BC4B-6ABC92084D71@gmail.com> (raw)
In-Reply-To: <83fu1ltrdc.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 3830 bytes --]
Eli,
Thank you for the quick check.
> On Jun 17, 2018, at 23:33, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
>> Date: Sun, 17 Jun 2018 23:02:08 +0900
>> Cc: Emacs developers <emacs-devel@gnu.org>
>>
>> There is indeed another change I want to make but that can wait. It involves removing some of the text decorations to be able to straighten some strings.
>>
>> If there is an agreement to proceed I can do that later. In the meanwhile it would be nice if you could first commit the biggest part of the modifications.
>
> Thanks, but there are a couple of hunks I don't understand:
>
>> (defcustom package-archives `(("gnu" .
>> - ,(format "http%s://elpa.gnu.org/packages/"
>> - (if (gnutls-available-p) "s" ""))))
>> + ,(let ((https "https://elpa.gnu.org/packages/")
>> + (http "http://elpa.gnu.org/packages/"))
>> + (if (gnutls-available-p) https http))))
>> +
>
> Why did you need this change?
That's something we discussed last year:
> On Jul 1, 2017, at 10:56, Jean-Christophe Helary <jean.christophe.helary@gmail.com> wrote:
>
>
>> On Jun 22, 2017, at 10:57, Richard Stallman <rms@gnu.org> wrote:
>>
>>>> (format "http%s://elpa.gnu.org/packages/"
>>>> (if (gnutls-available-p) "s" ""))
>>
>>> Yes, it is. But obviously I think that, since I wrote it.
>>
>> 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."
> (length upgrades)
> (if (= (length upgrades) 1) "" "s")))))
>
> 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
>> - (dir (expand-file-name (format "archives/%s" name) package-user-dir))
>> + (dir (expand-file-name (concat "archives/" name) package-user-dir))
>
> Same question here.
I don't remember. I wrote this part last year. I guess I was trying to separate format and concat use: format for user visible strings and concat for internal strings. But you can also read that as a reaction to the format abuse in package.el... concat makes the string shorter without compromise.
>> - (message "No packages to upgrade.")
>> + (message "No packages to upgrade")
>
> I think our style is not to include a period in messages.
I think I removed a period here. What are you referring to?
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
[-- Attachment #2: Type: text/html, Size: 9465 bytes --]
next prev parent reply other threads:[~2018-06-17 14:45 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 5:08 package.el strings Jean-Christophe Helary
2017-05-24 11:00 ` Jean-Christophe Helary
2017-05-24 12:04 ` Dmitry Gutov
2017-05-24 12:07 ` Jean-Christophe Helary
2017-05-24 12:36 ` Yuri Khan
2017-05-24 14:16 ` Richard Stallman
2017-07-14 2:53 ` Jean-Christophe Helary
2017-07-15 12:52 ` Eli Zaretskii
2017-07-15 14:48 ` Jean-Christophe Helary
2017-07-16 13:55 ` Jean-Christophe Helary
2017-07-16 14:16 ` Eli Zaretskii
2017-07-16 14:35 ` Eli Zaretskii
2017-07-16 14:37 ` Jean-Christophe Helary
2017-07-17 15:28 ` Jean-Christophe Helary
2017-07-22 9:23 ` Eli Zaretskii
2018-04-18 6:38 ` Jean-Christophe Helary
2018-04-26 1:10 ` Noam Postavsky
2018-04-26 6:31 ` Jean-Christophe Helary
2018-04-26 11:28 ` Noam Postavsky
2018-04-26 13:32 ` Jean-Christophe Helary
2018-04-28 22:11 ` Noam Postavsky
2018-04-28 23:46 ` Jean-Christophe Helary
2018-05-29 22:38 ` Noam Postavsky
2018-05-29 22:46 ` Jean-Christophe Helary
2018-06-17 14:02 ` Jean-Christophe Helary
2018-06-17 14:33 ` Eli Zaretskii
2018-06-17 14:45 ` Jean-Christophe Helary [this message]
2018-06-17 14:50 ` Eli Zaretskii
2018-06-17 14:58 ` Jean-Christophe Helary
2018-06-20 13:53 ` Jean-Christophe Helary
2018-06-20 15:54 ` Eli Zaretskii
2018-06-20 16:19 ` Jean-Christophe Helary
2018-06-24 15:37 ` Noam Postavsky
2018-06-24 21:57 ` Jean-Christophe Helary
2018-06-24 23:09 ` Noam Postavsky
2018-06-25 1:39 ` Jean-Christophe Helary
2018-06-25 23:22 ` Noam Postavsky
2018-06-27 4:21 ` Jean-Christophe Helary
2018-06-27 18:32 ` Noam Postavsky
2018-04-29 19:43 ` Stefan Monnier
2018-04-26 13:40 ` Jean-Christophe Helary
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FC076E26-CF38-4566-BC4B-6ABC92084D71@gmail.com \
--to=jean.christophe.helary@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=npostavs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.