From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword Date: Wed, 01 Nov 2023 12:48:47 +0000 Message-ID: <87r0l91vww.fsf@posteo.net> References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11941"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66567@debbugs.gnu.org To: Tony Zorman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 01 13:49:38 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qyAfB-0002rz-4Q for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Nov 2023 13:49:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyAf5-0002rI-NR; Wed, 01 Nov 2023 08:49:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qyAf2-0002nL-01 for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 08:49:28 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyAf1-0005qZ-M2 for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 08:49:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qyAfa-0007DV-0i for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 08:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Nov 2023 12:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66567 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66567-submit@debbugs.gnu.org id=B66567.169884298127703 (code B ref 66567); Wed, 01 Nov 2023 12:50:01 +0000 Original-Received: (at 66567) by debbugs.gnu.org; 1 Nov 2023 12:49:41 +0000 Original-Received: from localhost ([127.0.0.1]:50137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyAfA-0007Ce-Qx for submit@debbugs.gnu.org; Wed, 01 Nov 2023 08:49:40 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:59427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyAf4-0007C5-Ug for 66567@debbugs.gnu.org; Wed, 01 Nov 2023 08:49:35 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 360CB240027 for <66567@debbugs.gnu.org>; Wed, 1 Nov 2023 13:48:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1698842930; bh=BsL+fEVKVmI/V3P4F4qOxkCWnurCprPmWOcdl5wvogA=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=A7DvvWJT5uO2id+vHg2HD7JUL6F7hxdTKJLb4IdwFHMO1C76iBCV2aaSVfFm7gI7L Uw4vnb6XmgXTxOrJcftnFm6znDzCZvdBeaHQF6UO0dJ+CjwEjtaSlvx0ki8NIckf5H ZrRfseX7RbGviJV3vwccevC41dhWMnfFL3Ez1o8JDJW4q19ZUsMXZjwX0tbDe2o19n umgSHt0a6dOgd4azKlqt/4g1sQq9dLLBFsdSdHH2DwGycoiDkCM8QuifUFIw6p8XWy leMP0NU7QFGcAfDCPGq9LNfezQTn7WQAzURMQRBtXlaF/ByG7telXeplHe1yEDg8F4 dxFU4HbQDu/zA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SL6JJ75X8z9rxG; Wed, 1 Nov 2023 13:48:48 +0100 (CET) In-Reply-To: <87ttq5bx2y.fsf@hyperspace> (Tony Zorman's message of "Wed, 01 Nov 2023 11:13:25 +0100") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273600 Archived-At: Tony Zorman writes: > On Wed, Nov 01 2023 09:09, Philip Kaludercic wrote: >>> diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/us= e-package-core.el >>> index 34c45b7aec..5d0d554baf 100644 >>> --- a/lisp/use-package/use-package-core.el >>> +++ b/lisp/use-package/use-package-core.el >>> @@ -1654,7 +1654,8 @@ use-package-normalize--vc-arg >>> (t (ensure-string v)))) >>> (:vc-backend (ensure-symbol v)) >>> (_ (ensure-string v))))) >>> - (pcase-let ((valid-kws '(:url :branch :lisp-dir :main-file :vc-bac= kend :rev)) >>> + (pcase-let ((valid-kws '( :url :branch :lisp-dir :main-file :vc-ba= ckend :rev >>> + :shell-command :make)) >> >> Why is use-package checking for valid keywords in the first place? > > Better error messages, mostly. Especially people switching from > quelpa/straight/vc-use-package might be surprised that :vc is not a > drop-in replacement for those packages. I feel like alerting them to > this fact sooner rather than later makes for a better experience. IIUC this would raise an error when an unknown keyword is encountered, right? >>> * lisp/use-package/use-package-core.el (use-package-split-when): >>> New utility function to split a list whenever a specified predicate >>> returns t. >>> (use-package-vc-valid-keywords): A new defconst to gather all allowed >>> keywords. >>> (use-package-normalize--vc-arg): Properly normalize the :ignored-files >>> keyword, in that the following are all valid ways of entering files: >>> :ignored-files "a" >>> :ignored-files ("a") >>> :ignored-files "a" "b" "c" >>> :ignored-files ("a" "b" "c") >>> (use-package-normalize/:vc): Adjust normalization, now that we do not >>> necessarily receive a valid plist as an input. >> >> I would much prefer that package specifications have a canonical form >> and that use-package doesn't try to introduce variations that wouldn't >> be compatible with package-vc-install proper and elpa-admin. Or is this >> necessary for use-package? > > It's not *necessary*, but it's quite common for use-package keywords to > do their best in order to be as unobtrusive as possible. This includes > omitting parentheses that might not be strictly needed, or to cleverly > transform the input in some other way (e.g., :hook makes great use of > this). My experience is that this is more likely to cause confusion, e.g. when people write :config (progn ...). But as I said, since I don't use use-package, I don't want to give the final verdict, I am just expressing my preferences. >>> I will cheekily bump this, and also Cc. Philip as the most likely >>> reviewer. >> >> I don't use use-package nor am I familiar with the code base, so I >> wouldn't value my input that much. > > Oh, fair enough. In either case, I couldn't think of anyone else=E2=80=94= sorry > for the noise :) I think that Stefan Kangas would probably be the best to ask, since he was the one responsible for merging use-package into the core.