[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: package.el strings
From: |
Eli Zaretskii |
Subject: |
Re: package.el strings |
Date: |
Sun, 17 Jun 2018 17:50:13 +0300 |
> From: Jean-Christophe Helary <address@hidden>
> Date: Sun, 17 Jun 2018 23:45:46 +0900
> Cc: address@hidden,
> address@hidden
>
> (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 <address@hidden> wrote:
>
> On Jun 22, 2017, at 10:57, Richard Stallman <address@hidden> 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.
I don't understand this discussion. To make things clear, I don't see
why appending "s" to "http" in a format call would be bad in this
case, since "https" is not a plural of "http".
> - (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?
Oops.
- Re: package.el strings, Jean-Christophe Helary, 2018/06/17
- Re: package.el strings, Eli Zaretskii, 2018/06/17
- Re: package.el strings, Jean-Christophe Helary, 2018/06/17
- Re: package.el strings,
Eli Zaretskii <=
- Re: package.el strings, Jean-Christophe Helary, 2018/06/17
- Re: package.el strings, Jean-Christophe Helary, 2018/06/20
- Re: package.el strings, Eli Zaretskii, 2018/06/20
- Re: package.el strings, Jean-Christophe Helary, 2018/06/20
- Re: package.el strings, Noam Postavsky, 2018/06/24
- Re: package.el strings, Jean-Christophe Helary, 2018/06/24
- Re: package.el strings, Noam Postavsky, 2018/06/24
- Re: package.el strings, Jean-Christophe Helary, 2018/06/24
- Re: package.el strings, Noam Postavsky, 2018/06/25
- Re: package.el strings, Jean-Christophe Helary, 2018/06/27