From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists Date: Fri, 22 Nov 2019 09:35:38 +0000 Message-ID: <87lfs8b6dx.fsf@gmail.com> References: <87ftijz9df.fsf@gmail.com> <874kyxt78p.fsf@cassou.me> <87lfs8thwv.fsf@cassou.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="229849"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 38284@debbugs.gnu.org, Nicolas Petton To: Damien Cassou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 22 10:36:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iY5ML-000xeL-PB for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Nov 2019 10:36:13 +0100 Original-Received: from localhost ([::1]:48840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iY5MK-0007Do-27 for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Nov 2019 04:36:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53452) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iY5MD-0007D1-Ir for bug-gnu-emacs@gnu.org; Fri, 22 Nov 2019 04:36:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iY5MC-0004YT-DB for bug-gnu-emacs@gnu.org; Fri, 22 Nov 2019 04:36:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44930) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iY5MC-0004Y4-7a for bug-gnu-emacs@gnu.org; Fri, 22 Nov 2019 04:36:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iY5MA-0000d1-F8 for bug-gnu-emacs@gnu.org; Fri, 22 Nov 2019 04:36:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Nov 2019 09:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38284 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 38284-submit@debbugs.gnu.org id=B38284.15744153562403 (code B ref 38284); Fri, 22 Nov 2019 09:36:02 +0000 Original-Received: (at 38284) by debbugs.gnu.org; 22 Nov 2019 09:35:56 +0000 Original-Received: from localhost ([127.0.0.1]:53751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iY5M4-0000ch-Bb for submit@debbugs.gnu.org; Fri, 22 Nov 2019 04:35:56 -0500 Original-Received: from mail-wr1-f47.google.com ([209.85.221.47]:39575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iY5M1-0000cS-BB for 38284@debbugs.gnu.org; Fri, 22 Nov 2019 04:35:53 -0500 Original-Received: by mail-wr1-f47.google.com with SMTP id y11so4657352wrt.6 for <38284@debbugs.gnu.org>; Fri, 22 Nov 2019 01:35:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=C7RULRsMH75Zz9g3PaW8FFpZiir+DUOR3lYnYvJ5hxU=; b=gndpad29WZoF7NTyTX5PjZePTfVlyancOnW8p+jM7zzMO3NejHg4nHd7Uo2rHKvusn XdLK498NbAsG+bHxwj3M5QvQr+gYUcjxmMkLhkWWbNb40zoQVojg0pEXKHZ0cPmiYJta cT2jaJR2XOt0DbK0pgn5atmlXyh4LwExeOTIiaUTCEPBwXcLbzX1MiKBF+sSB7skKjr7 dmXWrAt7kn3f7QX3evWKNScZYB63kPK4NS3JgVcLM6gE7E5cq9UnEFJSH6w3POyAHoUc G02M4PwH4FptKDhdUylbxCWQUgrN8Fe6VLME9K1oCSnSjQecGD8soo1VyzptrSkYo0QK vItQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=C7RULRsMH75Zz9g3PaW8FFpZiir+DUOR3lYnYvJ5hxU=; b=g6Lrb7ym6sN+jFsKvz2Ku+VSmvt+glnLQ6wdCPIxBfdjXh9FMt2u4Sd/z6ZBkaKOMy Cu0EBO1nIpIgfJziIFVsbcDKq2nWIWa17HANfxBMeNBGFYaS7Kul4PX9os7epxLEeCRa ubRQ2ebkHHzIEjmSqlHH7n2H3WqnMNRNRu/ZFviSQTZE53MO+4a7fnNk+9xbc5gUWl5e bM2+W2l9bt69Hzp+EkrnY/PcPLqRW+E7JnbZlcsrU+do+nKCIF/5OeoKRZk2itnm5oUf taHjAc1c3O/ks5hq+TrhiUS8n/+WkqmTTjA/yUOayUkRSVqwzyq4o0pyOJNARfPcCBMy 2IYw== X-Gm-Message-State: APjAAAUjlw+piVMVEUgZ+2uE8zLP/W12HuLqk6Ib/h6LOHM+CWlL+07y m3a+se8j4RrItoSnXgZs+O8= X-Google-Smtp-Source: APXvYqwtfrj/4riWtT0Kxq74B16n+3SfUW00oWnc2ODFraNRs/58u0V9uWTexywK/gxpOi+ek4BhnQ== X-Received: by 2002:a5d:460b:: with SMTP id t11mr17091598wrq.185.1574415347385; Fri, 22 Nov 2019 01:35:47 -0800 (PST) Original-Received: from lolita.yourcompany.com ([2001:818:d820:9500:1ebb:afd8:ab26:f0f6]) by smtp.gmail.com with ESMTPSA id s8sm6591623wrt.57.2019.11.22.01.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 01:35:45 -0800 (PST) In-Reply-To: <87lfs8thwv.fsf@cassou.me> (Damien Cassou's message of "Fri, 22 Nov 2019 09:49:20 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:172212 Archived-At: Damien Cassou writes: > Jo=C3=A3o T=C3=A1vora writes: >>> can you please rename "d" to "domain"? >> >> ok. I do call your attention that it was already the >> single letter n there > > yes I saw. This should never have been merged like that. Thank you for > improving the code. I think the single letter idiom is fine there. It was just the wrong letter. By the way, I've left the p for the port, because calling it "port", while it would work, would seriously confuse a reader. >>> Can you please add a unit test covering this new use-case? >> >> No. This is too much work for such a trivial change > > I care a lot about the automated testing of the code I write. Certainly, I care a lot, too. I don't write tests for these changes out of principle, not out of lazyness. Most, if not all, the projects I manage have automated tests. > I won't try to convince you though. Can you please merge the attached > patch with yours? No, but you can do that, because it's your work (I can push it for you though). Anyway, now I read the test you wrote, I agree it's a good test. You are testing auth-source-pass-match-entry-p, much higher up than auth-source-pass--generate-entry-suffixes, the function I changed. Of course, only someone who was involved in the design would be able to confidently place the tests at that correct level, the finding of which is the most difficult part. My advice and personal opinion is to later use this and more such tests to perhaps redesign/cleanup the auth-source-pass.el library, which seems needlessly complicated in the little stuff like the function I touched. (to be fair it wasn't much helped by the style of the auth-source.el parent library.) Jo=C3=A3o