bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: João Távora
Subject: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists
Date: Thu, 21 Nov 2019 19:06:39 +0000

On Thu, Nov 21, 2019 at 6:27 PM Damien Cassou <damien@cassou.me> wrote:
>
> Hi João,
>
> João Távora <joaotavora@gmail.com> 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"?

ok.  I do call your attention that it was already the
single letter n there, so I was following what I though
was shorthand convention, just adjusting it to the
first letter of the concept actually used.

> > +                  (seq-mapcat
> > +                   (lambda (p)
>
>
> same for "p".

ok.

> > +                     (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?

No. This is too much work for such a trivial change that
can be reasoned about locally. I don't usually write tests
for those.  If you permit me to exagerate, it's like testing
that (+ 2 2) really equals 4.

But some people do write tests at this level, and I of
course don't mind if you do.

-- 
João Távora





reply via email to

[Prev in Thread] Current Thread [Next in Thread]