From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tony Zorman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword Date: Wed, 01 Nov 2023 11:13:25 +0100 Message-ID: <87ttq5bx2y.fsf@hyperspace> References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> Reply-To: Tony Zorman 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="17183"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66567@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 01 11:14:40 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 1qy8FE-0004He-BL for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Nov 2023 11:14:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qy8F5-0005rF-62; Wed, 01 Nov 2023 06:14: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 1qy8F3-0005ql-1f for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 06:14:29 -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 1qy8F2-0002dj-Fv for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 06:14:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qy8Fa-0000PG-Ef for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 06:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Nov 2023 10:15:02 +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.16988336631487 (code B ref 66567); Wed, 01 Nov 2023 10:15:02 +0000 Original-Received: (at 66567) by debbugs.gnu.org; 1 Nov 2023 10:14:23 +0000 Original-Received: from localhost ([127.0.0.1]:49989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy8Et-0000Nr-M6 for submit@debbugs.gnu.org; Wed, 01 Nov 2023 06:14:23 -0400 Original-Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]:51636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy8En-0000NV-SP for 66567@debbugs.gnu.org; Wed, 01 Nov 2023 06:14:18 -0400 Original-Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4SL2s572hbz9svd; Wed, 1 Nov 2023 11:13:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1698833610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DqWdTaiulzLSBWiTQKxCRF8vrjpWlVT8jBroCf6pdzE=; b=jPvovF2nINuH4i4evZVIrh1lxQ1UuYT5m+5bHyyykHkg2hSk+Y0mb/cm6+mvCMHgmBHdEQ 337m9y3dP8Tz9rj9f/C3r8pu0zYY4nHGCaFn451CyEkm+glLo8FCg2z918UYSCAriM5wad /aRrhWMxYGe/juRK6Y01fRJb4TXtiElmCCh7BkZtIkFEW4Y7UCN//OUmZhBlXA4JOzaOvY pdsl5Wp33HpEbVfKA/VWLbKjhCUMinjQkLAZLwiLdTevy8z0nmLEwuI0I5xGxhKR+IQcM/ Oe0qbWziz9f6lGszdyAmvX5D59x/LSFHoA+7AEKDyCupNZyLJD2V9uZHqtwJdw== In-Reply-To: <87ttq5u9fj.fsf@posteo.net> X-MBO-RS-META: ywfryf8rhiwmoupfddwmgzb45o94upo8 X-MBO-RS-ID: 15612d1c7d9094e0242 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:273591 Archived-At: On Wed, Nov 01 2023 09:09, Philip Kaludercic wrote: >> diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use= -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-back= end :rev)) >> + (pcase-let ((valid-kws '( :url :branch :lisp-dir :main-file :vc-bac= kend :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. >> * 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). >> 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=94so= rry for the noise :) --=20 Tony Zorman | https://tony-zorman.com/