Subject: Re: bug#20541: ERC password fetching using Secret Service API is broken

From: Ted Zlatanov <[email-masked]>
Date: Mon, 29 Jun 2015 22:28:45 -0400

On Mon, 01 Jun 2015 11:20:58 +0200 Michael Albinus <[email-masked]> wrote: 

MA> Krzysztof Jurewicz <[email-masked]> writes:
>> One possible patch is attached below. This is the simplest solution; I
>> have not thought much about whether it may be more desirable to convert
>> numbers to strings inside the secrets.el package.

MA> Well, secrets.el expects only strings as attributes. No conversion
MA> foreseen. I don't know what auth-source.el does. If auth-source-search
MA> also allows only strings (and symbol names) as attributes, then your
MA> patch is right. Otherwise, if a :port attribute could also be an
MA> integer, it shall be transformed to a string.

Sorry for the late reply.

The docs of `auth-source-search' say:

    A string value is always matched literally.  A symbol is matched
    as its string value, literally.  All the SPEC values can be
    single values (symbol or string) or lists thereof (in which case
    any of the search terms matches).

...so numbers are not allowed. By design, that means that "80" and
"http" can be used for :port, for instance. IIRC there was no gain from
making any of the search criteria take numbers in the case of
auth-source.el specifically.

So I think the patch is OK :)

Ted