Subject: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 21 Nov 2019 14:47:54 +0100

João Távora <[email-masked]> writes:

> This modification makes this library understand and unroll the port
> list so that, i.e. "domain:993", "domain:imaps"", "domain:imap",
> etc. are computed as potential suffixes.  Previously a nonsensical
> string "domain:(993 imaps imap ...)" was return.
>
>    (let ((domains (auth-source-pass--domains (split-string hostname "\\."))))
> -    (seq-mapcat (lambda (n)
> -                  (auth-source-pass--name-port-user-suffixes n user port))
> +    (seq-mapcat (lambda (d)
> +                  (seq-mapcat
> +                   (lambda (p)
> +                     (auth-source-pass--name-port-user-suffixes d user p))
> +                   (if (listp port) port (list port))))
>                  domains)))

Looks good to me, but I don't use password-store so I can't really
test.  If it works for you, please go ahead and apply.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no