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

From: Damien Cassou <[email-masked]>
Date: Thu, 21 Nov 2019 19:27:34 +0100

Hi João,

João Távora <[email-masked]> writes:
> […] Eventually I came to this patch, which seems to do the right
> thing.

great job, thank you. Some feedback below.

>    (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)

can you please rename "d" to "domain"?

> +                  (seq-mapcat
> +                   (lambda (p)

same for "p".

> +                     (auth-source-pass--name-port-user-suffixes d user p))
> +                   (if (listp port) port (list port))))
>                  domains)))

Can you please add a unit test covering this new use-case?

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill