GNU bug report logs - #38284
27.0.50; [PATCH] Make auth-source-pass-search understand port lists

Previous Next

Package: emacs;

Reported by: João Távora <joaotavora <at> gmail.com>

Date: Wed, 20 Nov 2019 00:22:05 UTC

Severity: normal

Tags: patch

Found in version 27.0.50

Fixed in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 38284 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Damien Cassou <damien <at> cassou.me>
Cc: 38284 <at> debbugs.gnu.org, Nicolas Petton <nicolas <at> petton.fr>
Subject: Re: 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 <at> cassou.me> wrote:
>
> Hi João,
>
> João Távora <joaotavora <at> 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




This bug report was last modified 5 years and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.