From unknown Mon Sep 08 16:26:16 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#66567 <66567@debbugs.gnu.org> To: bug#66567 <66567@debbugs.gnu.org> Subject: Status: [PATCH] use-package: Add ignored-files support to :vc keyword Reply-To: bug#66567 <66567@debbugs.gnu.org> Date: Mon, 08 Sep 2025 23:26:16 +0000 retitle 66567 [PATCH] use-package: Add ignored-files support to :vc keyword= =20 reassign 66567 emacs submitter 66567 Tony Zorman severity 66567 wishlist tag 66567 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 15 13:59:43 2023 Received: (at submit) by debbugs.gnu.org; 15 Oct 2023 17:59:43 +0000 Received: from localhost ([127.0.0.1]:54082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qs5Ot-0007SH-T6 for submit@debbugs.gnu.org; Sun, 15 Oct 2023 13:59:43 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qs4Cd-0004k8-R0 for submit@debbugs.gnu.org; Sun, 15 Oct 2023 12:42:57 -0400 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 1qs4CA-00052X-4P for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2023 12:42:26 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1qs4C7-0007pZ-Et for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2023 12:42:25 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (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-101.mailbox.org (Postfix) with ESMTPS id 4S7mHY3TSGz9sTn for ; Sun, 15 Oct 2023 18:42:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1697388137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=kAvjylnCrAZd62H0c3Gjfv1vCjGeafru8kgAVKvanVU=; b=pGnlQciuplyT75PgU9sZL5MuJycXKYSlO37Qj/tgUtuslyjHl6GLw0izopkbuVWead0kPG 3Elgt8hl7a0kbxuOJdL4GSRK+QHDvc2WXkR+tJbbvJYlNfzAT9yOofUQeLq70kvGVjNiiB ivborSpvkWg1tSiiRCO3G52Pjn8mNTfj4KEtUFD7HXS5lm0kFaLvq7fEQB6KBXmFsJekA/ n2BmNChfFelPZyFt06wDbM+sRfuzirtoSgapuHIvG9NB0obHknsvcZVZuOPojSF5ttGAp9 vL86QgTHlmEtztmnke72k1w6be6eS/gLjyF5HQ182n3V68V7bu3k4PK37N4rCg== From: Tony Zorman To: bug-gnu-emacs@gnu.org Subject: [PATCH] use-package: Add ignored-files support to :vc keyword Date: Sun, 15 Oct 2023 18:42:16 +0200 Message-ID: <877cnn4z2v.fsf@hyperspace> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-MBO-RS-META: zbftdxrf1yhdduwmjz9gz1x47yn1qjyu X-MBO-RS-ID: 7633468e5deedfe1914 Received-SPF: pass client-ip=80.241.56.151; envelope-from=tonyzorman@mailbox.org; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 15 Oct 2023 13:59:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Hi, this patch augments use-package's :vc keyword with the ability to ignore files. This is according to the functionality added to package-vc.el in 68318dfd16. There is also another small commit lurking in there that enables support for :make and :shell-command, both of which were added in 5ac08768aa. Tony --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-use-package-Update-list-of-valid-vc-keywords.patch >From 2b3c81c1854dc4767105021a6a777c6cb1b04bca Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Sun, 15 Oct 2023 16:50:00 +0200 Subject: [PATCH] ; use-package: Update list of valid :vc keywords lisp/use-package/use-package-core.el: Add :shell-command, :make to valid keywords. --- lisp/use-package/use-package-core.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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-backend :rev)) + (pcase-let ((valid-kws '( :url :branch :lisp-dir :main-file :vc-backend :rev + :shell-command :make)) (`(,name . ,opts) arg)) (if (stringp opts) ; (NAME . VERSION-STRING) ? (list name opts) -- 2.42.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-use-package-Add-ignored-files-support-to-vc-keyword.patch >From baf9490a3f3b18a336fe8c860f820beda01ba131 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Sun, 15 Oct 2023 16:51:00 +0200 Subject: [PATCH] use-package: Add :ignored-files support to :vc keyword * 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. * test/lisp/use-package/use-package-tests.el (use-package-test-normalize/:vc): Add tests for :ignored-files keyword. --- lisp/use-package/use-package-core.el | 61 ++++++++++++++++------ test/lisp/use-package/use-package-tests.el | 10 +++- 2 files changed, 53 insertions(+), 18 deletions(-) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 5d0d554baf..1c2e4676d7 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -521,6 +521,24 @@ use-package-split-list-at-keys (let ((xs (use-package-split-list (apply-partially #'eq key) lst))) (cons (car xs) (use-package-split-list-at-keys key (cddr xs)))))) +(defun use-package-split-when (pred xs) + "Repeatedly split a list according to PRED. +Split XS every time PRED returns t. Keep the delimiters, and +arrange the result in an alist. For example: + + (use-package-split-when #\\='keywordp \\='(:a 1 :b 2 3 4 :c 5)) + ;; => \\='((:a 1) (:b 2 3 4) (:c 5)) + + (use-package-split-when (lambda (x) (> x 2)) \\='(10 1 3 2 4 -1 8 9)) + ;; => \\='((10 1) (3 2) (4 -1) (8) (9))" + (unless (seq-empty-p xs) + (pcase-let* ((`(,first . ,rest) (if (funcall pred (car xs)) + (cons (car xs) (cdr xs)) + (use-package-split-list pred xs))) + (`(,val . ,recur) (use-package-split-list pred rest))) + (cons (cons first val) + (use-package-split-when pred recur))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Keywords @@ -1634,6 +1652,12 @@ use-package-handler/:vc (push `(use-package-vc-install ',arg ,local-path) body)) ; runtime body)) +(defconst use-package-vc-valid-keywords + '( :url :branch :lisp-dir :main-file :vc-backend :rev + :shell-command :make :ignored-files) + "Valid keywords for the `:vc' keyword, see the Info +node `(emacs)Fetching Package Sources'.") + (defun use-package-normalize--vc-arg (arg) "Normalize possible arguments to the `:vc' keyword. ARG is a cons-cell of approximately the form that @@ -1653,24 +1677,27 @@ use-package-normalize--vc-arg ((eq v :newest) nil) (t (ensure-string v)))) (:vc-backend (ensure-symbol v)) + (:ignored-files (if (listp v) v (list v))) (_ (ensure-string v))))) - (pcase-let ((valid-kws '( :url :branch :lisp-dir :main-file :vc-backend :rev - :shell-command :make)) - (`(,name . ,opts) arg)) + (pcase-let* ((`(,name . ,opts) arg)) (if (stringp opts) ; (NAME . VERSION-STRING) ? (list name opts) - ;; Error handling - (cl-loop for (k _) on opts by #'cddr - if (not (member k valid-kws)) - do (use-package-error - (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" - k valid-kws))) - ;; Actual normalization - (list name - (cl-loop for (k v) on opts by #'cddr - if (not (eq k :rev)) - nconc (list k (normalize k v))) - (normalize :rev (plist-get opts :rev))))))) + (let ((opts (use-package-split-when + (lambda (el) + (seq-contains-p use-package-vc-valid-keywords el)) + opts))) + ;; Error handling + (cl-loop for (k . _) in opts + if (not (member k use-package-vc-valid-keywords)) + do (use-package-error + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" + k use-package-vc-valid-keywords))) + ;; Actual normalization + (list name + (cl-loop for (k . v) in opts + if (not (eq k :rev)) + nconc (list k (normalize k (if (length= v 1) (car v) v)))) + (normalize :rev (car (alist-get :rev opts))))))))) (defun use-package-normalize/:vc (name _keyword args) "Normalize possible arguments to the `:vc' keyword. @@ -1686,9 +1713,9 @@ use-package-normalize/:vc ((or 'nil 't) (list name)) ; guess name ((pred symbolp) (list arg)) ; use this name ((pred stringp) (list name arg)) ; version string + guess name - ((pred plistp) ; plist + guess name + (`(,(pred keywordp) . ,(pred listp)) ; list + guess name (use-package-normalize--vc-arg (cons name arg))) - (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name + (`(,(pred symbolp) . ,(or (pred listp) ; list/version string + name (pred stringp))) (use-package-normalize--vc-arg arg)) (_ (use-package-error "Unrecognised argument to :vc.\ diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index 9181a8171a..5636ba8a4f 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el @@ -2014,7 +2014,15 @@ use-package-test-normalize/:vc (should (equal '(foo) (use-package-normalize/:vc 'foo :vc nil))) (should (equal '(bar) - (use-package-normalize/:vc 'foo :vc '(bar))))) + (use-package-normalize/:vc 'foo :vc '(bar)))) + (should (equal + '(foo (:ignored-files ("a" "b" "c")) :last-release) + (use-package-normalize/:vc 'foo :vc '((:ignored-files "a" "b" "c"))))) + (should (equal + (use-package-normalize/:vc 'foo :vc '((:ignored-files "a"))) + (use-package-normalize/:vc 'foo :vc '((:ignored-files ("a")))))) + (should (equal (use-package-normalize/:vc 'foo :vc '((:ignored-files "a" "b" "c"))) + (use-package-normalize/:vc 'foo :vc '((:ignored-files ("a" "b" "c"))))))) ;; Local Variables: ;; no-byte-compile: t -- 2.42.0 --=-=-= Content-Type: text/plain -- Tony Zorman | https://tony-zorman.com/ --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 22 15:47:54 2023 Received: (at control) by debbugs.gnu.org; 22 Oct 2023 19:47:54 +0000 Received: from localhost ([127.0.0.1]:48186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1queQU-0006Qg-Ek for submit@debbugs.gnu.org; Sun, 22 Oct 2023 15:47:54 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:57606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1queQT-0006QR-I1 for control@debbugs.gnu.org; Sun, 22 Oct 2023 15:47:53 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-507ac66a969so3373237e87.3 for ; Sun, 22 Oct 2023 12:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698004039; x=1698608839; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=t0lUkAmvGSXkWsaVhZg6ELe6dORJElRceJi5ivaIp80=; b=JO1MVt0aTTUojkJ8GluMidzmJWrmn3m6PrVqLKdbHTUVPttAliP0wNU5marfJEjXTa 8XUbJOUzdbfp1b4JanDa7RzJetphC+6Q20CqbvxobwcAKe4DrUBB1YR2jhS26+uT1I7a Gpm9FLVOZOWG1HzldhCfaN7YXkGj4BmbDzFfgQMJTQL1a11Te+Ee7l9oAjq7RcR+oBrJ DkVOzaVNz7ZnSbG8PMDv0M4T49/8/ITnjxsoFrAL2woZ+NP+797iqV8sP74aj8qToqUc 0yA6qJGRp/TjD+XhyFqjuyo1KITGVYONWiZRTT6z04YiQiG5B+w86BlfC5I9MLw8404i y7Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698004039; x=1698608839; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=t0lUkAmvGSXkWsaVhZg6ELe6dORJElRceJi5ivaIp80=; b=QfXqcfGHi8B/nyKnHPFrWh/nxz7TyZIuQOiFn+UK1wOwhDq80pcMfix+6iDw5CzwKp nKYfH/uB9hIXCIEuQ5ytXg+kOjNcb45YoWXtkG3X8j1tAnQ32Ayl+vwnEwRjCNVjlTRO wmpSWH4DV8alyqe7RsywG7ISDPEVCV4LV376cz39mcHvKT2Spp4Fe/pUMfMIgMDX6EP7 Xc8VyXDhm2ZihHFI0JuhsuMpVxVkNQzNtPl+DPW8itfEKGG+Keuoj0tlLS2VEzIZA+q/ nfz/VFaslGRqESYXlmzfIVjw2YcMWONkf8Ig3CqrrQwaYQpaO/OGsv6Qi9+sGf4k7fHb +OJA== X-Gm-Message-State: AOJu0Yx/rsusvzVG/gP2+3sPvSAcG5XDurkBQfAoSkgc2kXqu5Abied1 CaonTQ2CT2rVWHFHMEXod1ukwxIUv7gcjBfjOmw5xx31n3g= X-Google-Smtp-Source: AGHT+IFRi2C9QkfEJHafsy3XM6cosQyHgR8+HsJLIAWZoCFa3993EaPnWlUBZbpCT973XU4yhSYNuaemNEZvomII4S4= X-Received: by 2002:a2e:bc26:0:b0:2c0:20e3:990f with SMTP id b38-20020a2ebc26000000b002c020e3990fmr6660908ljf.10.1698004039045; Sun, 22 Oct 2023 12:47:19 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 22 Oct 2023 12:47:18 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Sun, 22 Oct 2023 12:47:18 -0700 Message-ID: Subject: control message for bug #66567 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 66567 wishlist quit From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 01 03:44:19 2023 Received: (at 66567) by debbugs.gnu.org; 1 Nov 2023 07:44:19 +0000 Received: from localhost ([127.0.0.1]:49775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy5tf-0007fT-Pk for submit@debbugs.gnu.org; Wed, 01 Nov 2023 03:44:19 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:34078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy5ta-0007fC-PD for 66567@debbugs.gnu.org; Wed, 01 Nov 2023 03:44:15 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (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-102.mailbox.org (Postfix) with ESMTPS id 4SKzX041qlz9sZh; Wed, 1 Nov 2023 08:43:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1698824608; 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: in-reply-to:in-reply-to:references:references; bh=TtfDPoiFlEThrYR1JGUSWCQ6RaGXNMhuQKeQRZrc1fI=; b=H6uZOlLEyUZpkwB5jsZccpCOgU/1VLddLla4dLQpzL7zcHxhzMk67ik4u9T0LgTjXxnF5t Enf2LTuvoPDtmSjRDHB2wX5l89GqPmu6YydKCsbonjld3Q/Sx4c2foZVt0M0J3tkB5B3R5 iKgWRkQVuq87++Vej3oSJopN7NKAnPR3hcnVG1/zcouH2fAqkwJEDqOQb+fKzm/BtDm2rJ JW7N7ALkbt5miptRknGUA1dfQrgp2tVn/8kIudk26xRIHXsnhOmP6+exP6yb3UJBCsThJG d/VO15U/QZ+WRNe+LLt+qilSFRUfNghY06tFlhJJEKlrosHHM5wV0vYpv1U3lA== From: Tony Zorman To: 66567@debbugs.gnu.org Subject: Re: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: References: <877cnn4z2v.fsf@hyperspace> Date: Wed, 01 Nov 2023 08:43:23 +0100 Message-ID: <87wmv1c410.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-META: 6pr3mcrois5j9i14xuy19oqgcm3fyimm X-MBO-RS-ID: 74743fcb90e2189ea55 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66567 Cc: Philip Kaludercic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) I will cheekily bump this, and also Cc. Philip as the most likely reviewer. Tony -- Tony Zorman | https://tony-zorman.com/ From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 01 05:10:04 2023 Received: (at 66567) by debbugs.gnu.org; 1 Nov 2023 09:10:04 +0000 Received: from localhost ([127.0.0.1]:49832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy7Ei-0004HK-32 for submit@debbugs.gnu.org; Wed, 01 Nov 2023 05:10:04 -0400 Received: from mout01.posteo.de ([185.67.36.65]:33241) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy7Ef-0004G8-Nu for 66567@debbugs.gnu.org; Wed, 01 Nov 2023 05:10:03 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 952E5240027 for <66567@debbugs.gnu.org>; Wed, 1 Nov 2023 10:09:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1698829761; bh=oXInDes1km8KDORwdF/pHZMpKJ9jTyxJIgx4IYEkdVA=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=QibWcdidlWWx1EqBTIuBTJj3pC4dkrFW4QieEdXr14QbFzy79fC3fTanZbbvHY4EG fSp6G47V7UDpYDI4Nt1qD449bRkgHDhsoLzLjVYdxtokvog0a9GfEmbALsX/h756L6 6Q0UPM/t+Q1uHIz4phpRHqtcPYbb7wD6qNOp6ZB47vewv+qlFX1xaqawzMgBZTEuZf CLgrxE9Wp6Lp36bh258IcrAyUowAl8P3ITbhglf1lsv/fsbeDS3p5OnP/7dbip+lnM v+I3TYvQq35Dn9OBynKyZ4TFASuChij3YvrPhy0tJmdhH0GC5C2sZ2hK+1v0cnvH6Z ADHegBJcVcQ+w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SL1R50V0mz6txS; Wed, 1 Nov 2023 10:09:20 +0100 (CET) From: Philip Kaludercic To: Tony Zorman Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: <877cnn4z2v.fsf@hyperspace> (Tony Zorman's message of "Sun, 15 Oct 2023 18:42:16 +0200") References: <877cnn4z2v.fsf@hyperspace> X-Hashcash: 1:20:231101:tonyzorman@mailbox.org::d86bwRazfmHbodBU:2cEY X-Hashcash: 1:20:231101:66567@debbugs.gnu.org::rQFjGcI6SBnkjxdn:8lnd 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 Date: Wed, 01 Nov 2023 09:09:20 +0000 Message-ID: <87ttq5u9fj.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66567 Cc: 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Tony Zorman writes: > Hi, > > this patch augments use-package's :vc keyword with the ability to ignore > files. This is according to the functionality added to package-vc.el in > 68318dfd16. There is also another small commit lurking in there that > enables support for :make and :shell-command, both of which were added > in 5ac08768aa. > > Tony > >>>From 2b3c81c1854dc4767105021a6a777c6cb1b04bca Mon Sep 17 00:00:00 2001 > From: Tony Zorman > Date: Sun, 15 Oct 2023 16:50:00 +0200 > Subject: [PATCH] ; use-package: Update list of valid :vc keywords > > lisp/use-package/use-package-core.el: Add :shell-command, :make to > valid keywords. > --- > lisp/use-package/use-package-core.el | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > 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-backend :rev)) > + (pcase-let ((valid-kws '( :url :branch :lisp-dir :main-file :vc-backend :rev > + :shell-command :make)) Why is use-package checking for valid keywords in the first place? > (`(,name . ,opts) arg)) > (if (stringp opts) ; (NAME . VERSION-STRING) ? > (list name opts) > -- > 2.42.0 > >>>From baf9490a3f3b18a336fe8c860f820beda01ba131 Mon Sep 17 00:00:00 2001 > From: Tony Zorman > Date: Sun, 15 Oct 2023 16:51:00 +0200 > Subject: [PATCH] use-package: Add :ignored-files support to :vc keyword > > * 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? > > * test/lisp/use-package/use-package-tests.el (use-package-test-normalize/:vc): > Add tests for :ignored-files keyword. > --- > lisp/use-package/use-package-core.el | 61 ++++++++++++++++------ > test/lisp/use-package/use-package-tests.el | 10 +++- > 2 files changed, 53 insertions(+), 18 deletions(-) > > diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el > index 5d0d554baf..1c2e4676d7 100644 > --- a/lisp/use-package/use-package-core.el > +++ b/lisp/use-package/use-package-core.el > @@ -521,6 +521,24 @@ use-package-split-list-at-keys > (let ((xs (use-package-split-list (apply-partially #'eq key) lst))) > (cons (car xs) (use-package-split-list-at-keys key (cddr xs)))))) > > +(defun use-package-split-when (pred xs) > + "Repeatedly split a list according to PRED. > +Split XS every time PRED returns t. Keep the delimiters, and > +arrange the result in an alist. For example: > + > + (use-package-split-when #\\='keywordp \\='(:a 1 :b 2 3 4 :c 5)) > + ;; => \\='((:a 1) (:b 2 3 4) (:c 5)) > + > + (use-package-split-when (lambda (x) (> x 2)) \\='(10 1 3 2 4 -1 8 9)) > + ;; => \\='((10 1) (3 2) (4 -1) (8) (9))" > + (unless (seq-empty-p xs) > + (pcase-let* ((`(,first . ,rest) (if (funcall pred (car xs)) > + (cons (car xs) (cdr xs)) > + (use-package-split-list pred xs))) > + (`(,val . ,recur) (use-package-split-list pred rest))) > + (cons (cons first val) > + (use-package-split-when pred recur))))) > + > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > ;; > ;;; Keywords > @@ -1634,6 +1652,12 @@ use-package-handler/:vc > (push `(use-package-vc-install ',arg ,local-path) body)) ; runtime > body)) > > +(defconst use-package-vc-valid-keywords > + '( :url :branch :lisp-dir :main-file :vc-backend :rev > + :shell-command :make :ignored-files) > + "Valid keywords for the `:vc' keyword, see the Info > +node `(emacs)Fetching Package Sources'.") > + > (defun use-package-normalize--vc-arg (arg) > "Normalize possible arguments to the `:vc' keyword. > ARG is a cons-cell of approximately the form that > @@ -1653,24 +1677,27 @@ use-package-normalize--vc-arg > ((eq v :newest) nil) > (t (ensure-string v)))) > (:vc-backend (ensure-symbol v)) > + (:ignored-files (if (listp v) v (list v))) > (_ (ensure-string v))))) > - (pcase-let ((valid-kws '( :url :branch :lisp-dir :main-file :vc-backend :rev > - :shell-command :make)) > - (`(,name . ,opts) arg)) > + (pcase-let* ((`(,name . ,opts) arg)) > (if (stringp opts) ; (NAME . VERSION-STRING) ? > (list name opts) > - ;; Error handling > - (cl-loop for (k _) on opts by #'cddr > - if (not (member k valid-kws)) > - do (use-package-error > - (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" > - k valid-kws))) > - ;; Actual normalization > - (list name > - (cl-loop for (k v) on opts by #'cddr > - if (not (eq k :rev)) > - nconc (list k (normalize k v))) > - (normalize :rev (plist-get opts :rev))))))) > + (let ((opts (use-package-split-when > + (lambda (el) > + (seq-contains-p use-package-vc-valid-keywords el)) > + opts))) > + ;; Error handling > + (cl-loop for (k . _) in opts > + if (not (member k use-package-vc-valid-keywords)) > + do (use-package-error > + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" > + k use-package-vc-valid-keywords))) > + ;; Actual normalization > + (list name > + (cl-loop for (k . v) in opts > + if (not (eq k :rev)) > + nconc (list k (normalize k (if (length= v 1) (car v) v)))) > + (normalize :rev (car (alist-get :rev opts))))))))) > > (defun use-package-normalize/:vc (name _keyword args) > "Normalize possible arguments to the `:vc' keyword. > @@ -1686,9 +1713,9 @@ use-package-normalize/:vc > ((or 'nil 't) (list name)) ; guess name > ((pred symbolp) (list arg)) ; use this name > ((pred stringp) (list name arg)) ; version string + guess name > - ((pred plistp) ; plist + guess name > + (`(,(pred keywordp) . ,(pred listp)) ; list + guess name > (use-package-normalize--vc-arg (cons name arg))) > - (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name > + (`(,(pred symbolp) . ,(or (pred listp) ; list/version string + name > (pred stringp))) > (use-package-normalize--vc-arg arg)) > (_ (use-package-error "Unrecognised argument to :vc.\ > diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el > index 9181a8171a..5636ba8a4f 100644 > --- a/test/lisp/use-package/use-package-tests.el > +++ b/test/lisp/use-package/use-package-tests.el > @@ -2014,7 +2014,15 @@ use-package-test-normalize/:vc > (should (equal '(foo) > (use-package-normalize/:vc 'foo :vc nil))) > (should (equal '(bar) > - (use-package-normalize/:vc 'foo :vc '(bar))))) > + (use-package-normalize/:vc 'foo :vc '(bar)))) > + (should (equal > + '(foo (:ignored-files ("a" "b" "c")) :last-release) > + (use-package-normalize/:vc 'foo :vc '((:ignored-files "a" "b" "c"))))) > + (should (equal > + (use-package-normalize/:vc 'foo :vc '((:ignored-files "a"))) > + (use-package-normalize/:vc 'foo :vc '((:ignored-files ("a")))))) > + (should (equal (use-package-normalize/:vc 'foo :vc '((:ignored-files "a" "b" "c"))) > + (use-package-normalize/:vc 'foo :vc '((:ignored-files ("a" "b" "c"))))))) > > ;; Local Variables: > ;; no-byte-compile: t > -- > 2.42.0 Tony Zorman writes: > 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. > Tony -- Philip Kaludercic From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 01 06:14:23 2023 Received: (at 66567) by debbugs.gnu.org; 1 Nov 2023 10:14:23 +0000 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 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 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== From: Tony Zorman To: Philip Kaludercic Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: <87ttq5u9fj.fsf@posteo.net> References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> Date: Wed, 01 Nov 2023 11:13:25 +0100 Message-ID: <87ttq5bx2y.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-RS-META: ywfryf8rhiwmoupfddwmgzb45o94upo8 X-MBO-RS-ID: 15612d1c7d9094e0242 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66567 Cc: 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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/ From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 01 08:49:41 2023 Received: (at 66567) by debbugs.gnu.org; 1 Nov 2023 12:49:41 +0000 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 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 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== 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) From: Philip Kaludercic To: Tony Zorman Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: <87ttq5bx2y.fsf@hyperspace> (Tony Zorman's message of "Wed, 01 Nov 2023 11:13:25 +0100") References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> 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 Date: Wed, 01 Nov 2023 12:48:47 +0000 Message-ID: <87r0l91vww.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66567 Cc: 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 01 10:37:49 2023 Received: (at 66567) by debbugs.gnu.org; 1 Nov 2023 14:37:49 +0000 Received: from localhost ([127.0.0.1]:52161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyCLs-0002Mt-HK for submit@debbugs.gnu.org; Wed, 01 Nov 2023 10:37:49 -0400 Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]:49840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyCLp-0002Mb-4d for 66567@debbugs.gnu.org; Wed, 01 Nov 2023 10:37:46 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (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-102.mailbox.org (Postfix) with ESMTPS id 4SL8j82H3hz9t3g; Wed, 1 Nov 2023 15:37:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1698849420; 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: in-reply-to:in-reply-to:references:references; bh=ttURzOEF2/TloRKsUrlTespENJDl7tmwCxNRy24hZR4=; b=v7MQwZwETXK2FR78Ud0RT1SN/MsU5ZT7utIrCpMtQzRgQ48oiWqyqJRQLGF1b4qdmlyhhX V0bNjxYyFuzHjUBlAMdC+OsfJx8tlIHOtNEmuOckWJ6SfMKDLIT7SJv1ROJk4H26SWcVU5 uOfXV2RC/42LPV5C7kJkdVvO7XVzbkp29u0ZWUiCD9kUrqQYf5omT9dy720xyHR68GaX52 kHNPefwlzCPbCkS4AAh+/zNmueITqHOmCh3xYx/0EspWvqWqFpfFJDO22gw6EO7vKOsC76 uNqEk+TMT+vl/XR1Y8Xm14heW8x9EhqlMO505dgU5MewOct8ESiWu83Q2s8Udg== From: Tony Zorman To: Philip Kaludercic Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: <87r0l91vww.fsf@posteo.net> References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> Date: Wed, 01 Nov 2023 15:36:58 +0100 Message-ID: <87r0l9fsl1.fsf@hyperspace> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-MBO-RS-META: 758ntbztpbg5hsbu9yc8zx4az65gcbbs X-MBO-RS-ID: 0aed99f9099214ddc11 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66567 Cc: stefankangas@gmail.com, 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Nov 01 2023 12:48, Philip Kaludercic wrote: > 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/u= se-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-ba= ckend :rev)) >>>> + (pcase-let ((valid-kws '( :url :branch :lisp-dir :main-file :vc-b= ackend :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? Yes, a declaration like (use-package foo :vc (:url "url" :blargh "123")) would result in the following message =E2=9B=94 Error (use-package): Failed to parse package foo: use-package= : Keyword :vc received unknown argument: :blargh. Supported keywords are: (= :url :branch :lisp-dir :main-file :vc-backend :rev :shell-command :make :ig= nored-files) Things get a bit muddier if ':blargh' would be passed down to package-vc-install. Now that you mention it, I noticed a tiny mistake (resulting in a worse error message!) in the second of the original patches. I've attached a corrected version. >>>> 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= =94sorry >> 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. Thanks! I have Cc'd Stefan, hoping to not come across as too pushy :) Tony --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-use-package-Add-ignored-files-support-to-vc-keyword.patch >From f8590d37b29a96a7984d8acae2d6c2b557e0dc59 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Sun, 15 Oct 2023 16:51:00 +0200 Subject: [PATCH] use-package: Add :ignored-files support to :vc keyword * 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. * test/lisp/use-package/use-package-tests.el (use-package-test-normalize/:vc): Add tests for :ignored-files keyword. --- lisp/use-package/use-package-core.el | 60 ++++++++++++++++------ test/lisp/use-package/use-package-tests.el | 10 +++- 2 files changed, 52 insertions(+), 18 deletions(-) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 5d0d554baf..974059a850 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -521,6 +521,24 @@ use-package-split-list-at-keys (let ((xs (use-package-split-list (apply-partially #'eq key) lst))) (cons (car xs) (use-package-split-list-at-keys key (cddr xs)))))) +(defun use-package-split-when (pred xs) + "Repeatedly split a list according to PRED. +Split XS every time PRED returns t. Keep the delimiters, and +arrange the result in an alist. For example: + + (use-package-split-when #\\='keywordp \\='(:a 1 :b 2 3 4 :c 5)) + ;; => \\='((:a 1) (:b 2 3 4) (:c 5)) + + (use-package-split-when (lambda (x) (> x 2)) \\='(10 1 3 2 4 -1 8 9)) + ;; => \\='((10 1) (3 2) (4 -1) (8) (9))" + (unless (seq-empty-p xs) + (pcase-let* ((`(,first . ,rest) (if (funcall pred (car xs)) + (cons (car xs) (cdr xs)) + (use-package-split-list pred xs))) + (`(,val . ,recur) (use-package-split-list pred rest))) + (cons (cons first val) + (use-package-split-when pred recur))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Keywords @@ -1634,6 +1652,12 @@ use-package-handler/:vc (push `(use-package-vc-install ',arg ,local-path) body)) ; runtime body)) +(defconst use-package-vc-valid-keywords + '( :url :branch :lisp-dir :main-file :vc-backend :rev + :shell-command :make :ignored-files) + "Valid keywords for the `:vc' keyword, see the Info +node `(emacs)Fetching Package Sources'.") + (defun use-package-normalize--vc-arg (arg) "Normalize possible arguments to the `:vc' keyword. ARG is a cons-cell of approximately the form that @@ -1653,24 +1677,26 @@ use-package-normalize--vc-arg ((eq v :newest) nil) (t (ensure-string v)))) (:vc-backend (ensure-symbol v)) + (:ignored-files (if (listp v) v (list v))) (_ (ensure-string v))))) - (pcase-let ((valid-kws '( :url :branch :lisp-dir :main-file :vc-backend :rev - :shell-command :make)) - (`(,name . ,opts) arg)) + (pcase-let* ((`(,name . ,opts) arg)) (if (stringp opts) ; (NAME . VERSION-STRING) ? (list name opts) - ;; Error handling - (cl-loop for (k _) on opts by #'cddr - if (not (member k valid-kws)) - do (use-package-error - (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" - k valid-kws))) - ;; Actual normalization - (list name - (cl-loop for (k v) on opts by #'cddr - if (not (eq k :rev)) - nconc (list k (normalize k v))) - (normalize :rev (plist-get opts :rev))))))) + (let ((opts (use-package-split-when + (lambda (el) (and (keywordp el) (not (equal :newest el)))) + opts))) + ;; Error handling + (cl-loop for (k . _) in opts + if (not (member k use-package-vc-valid-keywords)) + do (use-package-error + (format "Keyword :vc received unknown argument: %s. Supported keywords are: %s" + k use-package-vc-valid-keywords))) + ;; Actual normalization + (list name + (cl-loop for (k . v) in opts + if (not (eq k :rev)) + nconc (list k (normalize k (if (length= v 1) (car v) v)))) + (normalize :rev (car (alist-get :rev opts))))))))) (defun use-package-normalize/:vc (name _keyword args) "Normalize possible arguments to the `:vc' keyword. @@ -1686,9 +1712,9 @@ use-package-normalize/:vc ((or 'nil 't) (list name)) ; guess name ((pred symbolp) (list arg)) ; use this name ((pred stringp) (list name arg)) ; version string + guess name - ((pred plistp) ; plist + guess name + (`(,(pred keywordp) . ,(pred listp)) ; list + guess name (use-package-normalize--vc-arg (cons name arg))) - (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string + name + (`(,(pred symbolp) . ,(or (pred listp) ; list/version string + name (pred stringp))) (use-package-normalize--vc-arg arg)) (_ (use-package-error "Unrecognised argument to :vc.\ diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index 9181a8171a..5636ba8a4f 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el @@ -2014,7 +2014,15 @@ use-package-test-normalize/:vc (should (equal '(foo) (use-package-normalize/:vc 'foo :vc nil))) (should (equal '(bar) - (use-package-normalize/:vc 'foo :vc '(bar))))) + (use-package-normalize/:vc 'foo :vc '(bar)))) + (should (equal + '(foo (:ignored-files ("a" "b" "c")) :last-release) + (use-package-normalize/:vc 'foo :vc '((:ignored-files "a" "b" "c"))))) + (should (equal + (use-package-normalize/:vc 'foo :vc '((:ignored-files "a"))) + (use-package-normalize/:vc 'foo :vc '((:ignored-files ("a")))))) + (should (equal (use-package-normalize/:vc 'foo :vc '((:ignored-files "a" "b" "c"))) + (use-package-normalize/:vc 'foo :vc '((:ignored-files ("a" "b" "c"))))))) ;; Local Variables: ;; no-byte-compile: t -- 2.42.0 --=-=-= Content-Type: text/plain -- Tony Zorman | https://tony-zorman.com/ --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 01 12:39:44 2023 Received: (at 66567) by debbugs.gnu.org; 1 Nov 2023 16:39:44 +0000 Received: from localhost ([127.0.0.1]:52267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyEFo-0000O9-JX for submit@debbugs.gnu.org; Wed, 01 Nov 2023 12:39:44 -0400 Received: from mout01.posteo.de ([185.67.36.65]:39661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyEFj-0000No-90 for 66567@debbugs.gnu.org; Wed, 01 Nov 2023 12:39:39 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id A4155240029 for <66567@debbugs.gnu.org>; Wed, 1 Nov 2023 17:38:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1698856734; bh=xhrBen5umZk2USpew4RsVl90HwDa8lGiINq9Tt8GmYk=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=nGUcG4vgRu8VU2VZbw7bCX0B5uMvft4CIs7s0MS++cBKJZoSHtT1as9W/EKZkLWw4 M2Tbu5pTd0xXsMjxB8SnlU0nNPBZjLJ7IQ0lByjE9EtJPofKIJeYFMzG24NVzyJQIL nV/zl/IUuC1gT0Ofs5p/c6UBadEyL3spf19B8bE1YEEqPaUG/JFoNBIb/xDXlsbzYZ PqMrkMxChp/IY0L3NqRFnUdGvXuug8Zwk/KqJZDV4m8c18u07trSCep6nLifY80jWF rFn0mJ5BLStaI6yMzsnUBcAlpGQkG5PpbqacOrm9x/gmGDOomwX7LRwPmuplimRTX/ /SsWQ6melOR/g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SLCPn6YBNz9rxL; Wed, 1 Nov 2023 17:38:53 +0100 (CET) From: Philip Kaludercic To: Tony Zorman Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: <87r0l9fsl1.fsf@hyperspace> (Tony Zorman's message of "Wed, 01 Nov 2023 15:36:58 +0100") References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> <87r0l9fsl1.fsf@hyperspace> 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 Date: Wed, 01 Nov 2023 16:38:53 +0000 Message-ID: <871qd91l9e.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66567 Cc: stefankangas@gmail.com, 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Tony Zorman writes: > On Wed, Nov 01 2023 12:48, Philip Kaludercic wrote: >> 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/= 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-b= ackend :rev)) >>>>> + (pcase-let ((valid-kws '( :url :branch :lisp-dir :main-file :vc-= backend :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? > > Yes, a declaration like > > (use-package foo > :vc (:url "url" :blargh "123")) > > would result in the following message > > =E2=9B=94 Error (use-package): Failed to parse package foo: use-packa= ge: Keyword :vc received unknown argument: :blargh. Supported keywords are:= (:url :branch :lisp-dir :main-file :vc-backend :rev :shell-command :make := ignored-files) > > Things get a bit muddier if ':blargh' would be passed down to > package-vc-install. What I was wondering, was if it would make sense to raise an warning instead. > now that you mention it, I noticed a tiny mistake (resulting in a worse > error message!) in the second of the original patches. I've attached a > corrected version. 1+ >>>>> 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= =94sorry >>> 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. > > Thanks! I have Cc'd Stefan, hoping to not come across as too pushy :) That should be fine (I hope). > Tony > > From f8590d37b29a96a7984d8acae2d6c2b557e0dc59 Mon Sep 17 00:00:00 2001 > From: Tony Zorman > Date: Sun, 15 Oct 2023 16:51:00 +0200 > Subject: [PATCH] use-package: Add :ignored-files support to :vc keyword > > * 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. > > * test/lisp/use-package/use-package-tests.el (use-package-test-normalize/= :vc): > Add tests for :ignored-files keyword. > --- > lisp/use-package/use-package-core.el | 60 ++++++++++++++++------ > test/lisp/use-package/use-package-tests.el | 10 +++- > 2 files changed, 52 insertions(+), 18 deletions(-) > > diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-= package-core.el > index 5d0d554baf..974059a850 100644 > --- a/lisp/use-package/use-package-core.el > +++ b/lisp/use-package/use-package-core.el > @@ -521,6 +521,24 @@ use-package-split-list-at-keys > (let ((xs (use-package-split-list (apply-partially #'eq key) lst)= )) > (cons (car xs) (use-package-split-list-at-keys key (cddr xs))))= )) >=20=20 > +(defun use-package-split-when (pred xs) > + "Repeatedly split a list according to PRED. > +Split XS every time PRED returns t. Keep the delimiters, and > +arrange the result in an alist. For example: > + > + (use-package-split-when #\\=3D'keywordp \\=3D'(:a 1 :b 2 3 4 :c 5)) > + ;; =3D> \\=3D'((:a 1) (:b 2 3 4) (:c 5)) > + > + (use-package-split-when (lambda (x) (> x 2)) \\=3D'(10 1 3 2 4 -1 8 9)) > + ;; =3D> \\=3D'((10 1) (3 2) (4 -1) (8) (9))" > + (unless (seq-empty-p xs) > + (pcase-let* ((`(,first . ,rest) (if (funcall pred (car xs)) > + (cons (car xs) (cdr xs)) > + (use-package-split-list pred xs))) > + (`(,val . ,recur) (use-package-split-list pred rest))) > + (cons (cons first val) > + (use-package-split-when pred recur))))) > + > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;;; > ;; > ;;; Keywords > @@ -1634,6 +1652,12 @@ use-package-handler/:vc > (push `(use-package-vc-install ',arg ,local-path) body)) ; runti= me > body)) >=20=20 > +(defconst use-package-vc-valid-keywords > + '( :url :branch :lisp-dir :main-file :vc-backend :rev > + :shell-command :make :ignored-files) > + "Valid keywords for the `:vc' keyword, see the Info > +node `(emacs)Fetching Package Sources'.") > + > (defun use-package-normalize--vc-arg (arg) > "Normalize possible arguments to the `:vc' keyword. > ARG is a cons-cell of approximately the form that > @@ -1653,24 +1677,26 @@ use-package-normalize--vc-arg > ((eq v :newest) nil) > (t (ensure-string v)))) > (:vc-backend (ensure-symbol v)) > + (:ignored-files (if (listp v) v (list v))) > (_ (ensure-string v))))) > - (pcase-let ((valid-kws '( :url :branch :lisp-dir :main-file :vc-back= end :rev > - :shell-command :make)) > - (`(,name . ,opts) arg)) > + (pcase-let* ((`(,name . ,opts) arg)) > (if (stringp opts) ; (NAME . VERSION-STRING) ? > (list name opts) > - ;; Error handling > - (cl-loop for (k _) on opts by #'cddr > - if (not (member k valid-kws)) > - do (use-package-error > - (format "Keyword :vc received unknown argument: %s.= Supported keywords are: %s" > - k valid-kws))) > - ;; Actual normalization > - (list name > - (cl-loop for (k v) on opts by #'cddr > - if (not (eq k :rev)) > - nconc (list k (normalize k v))) > - (normalize :rev (plist-get opts :rev))))))) > + (let ((opts (use-package-split-when > + (lambda (el) (and (keywordp el) (not (equal :newest= el)))) > + opts))) > + ;; Error handling > + (cl-loop for (k . _) in opts > + if (not (member k use-package-vc-valid-keywords)) > + do (use-package-error > + (format "Keyword :vc received unknown argument: %= s. Supported keywords are: %s" > + k use-package-vc-valid-keywords))) > + ;; Actual normalization > + (list name > + (cl-loop for (k . v) in opts > + if (not (eq k :rev)) > + nconc (list k (normalize k (if (length=3D v 1) = (car v) v)))) > + (normalize :rev (car (alist-get :rev opts))))))))) >=20=20 > (defun use-package-normalize/:vc (name _keyword args) > "Normalize possible arguments to the `:vc' keyword. > @@ -1686,9 +1712,9 @@ use-package-normalize/:vc > ((or 'nil 't) (list name)) ; guess name > ((pred symbolp) (list arg)) ; use this name > ((pred stringp) (list name arg)) ; version string + gues= s name > - ((pred plistp) ; plist + guess name > + (`(,(pred keywordp) . ,(pred listp)) ; list + guess name > (use-package-normalize--vc-arg (cons name arg))) > - (`(,(pred symbolp) . ,(or (pred plistp) ; plist/version string = + name > + (`(,(pred symbolp) . ,(or (pred listp) ; list/version string += name > (pred stringp))) > (use-package-normalize--vc-arg arg)) > (_ (use-package-error "Unrecognised argument to :vc.\ > diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-p= ackage/use-package-tests.el > index 9181a8171a..5636ba8a4f 100644 > --- a/test/lisp/use-package/use-package-tests.el > +++ b/test/lisp/use-package/use-package-tests.el > @@ -2014,7 +2014,15 @@ use-package-test-normalize/:vc > (should (equal '(foo) > (use-package-normalize/:vc 'foo :vc nil))) > (should (equal '(bar) > - (use-package-normalize/:vc 'foo :vc '(bar))))) > + (use-package-normalize/:vc 'foo :vc '(bar)))) > + (should (equal > + '(foo (:ignored-files ("a" "b" "c")) :last-release) > + (use-package-normalize/:vc 'foo :vc '((:ignored-files "a" "b"= "c"))))) > + (should (equal > + (use-package-normalize/:vc 'foo :vc '((:ignored-files "a"))) > + (use-package-normalize/:vc 'foo :vc '((:ignored-files ("a")))= ))) > + (should (equal (use-package-normalize/:vc 'foo :vc '((:ignored-files "= a" "b" "c"))) > + (use-package-normalize/:vc 'foo :vc '((:ignored-files (= "a" "b" "c"))))))) >=20=20 > ;; Local Variables: > ;; no-byte-compile: t > --=20 > 2.42.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 07 14:39:59 2023 Received: (at 66567) by debbugs.gnu.org; 7 Nov 2023 19:39:59 +0000 Received: from localhost ([127.0.0.1]:43293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0Rvb-0002qt-1B for submit@debbugs.gnu.org; Tue, 07 Nov 2023 14:39:59 -0500 Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]:59892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0RvZ-0002qe-2I for 66567@debbugs.gnu.org; Tue, 07 Nov 2023 14:39:58 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (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 4SPz711dgnz9sh8; Tue, 7 Nov 2023 20:39:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699385949; 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=e6AXj6Ad1nMbP+li7cRNLh1dbobpbuEvxDC/NVnBBtM=; b=W0pTSzwT1Dlv9ltKUnjmh7vgYVDcJpw7H/ih8wBttTFCGh8yUP0t7hoER2Uq9YZARH8P2p 199zB3vvQXLwsq/JKPJj4+Hagj5EusY7T4yYADK2CEOfMbdNVHMQIgw1WVfWF95zxyJhSf L2w4u7SxuJvdfdXOQpd+3nsbRhl0PDecyaNeri7uBm9T53Xq4oe3Ofup7KvEMf+ZCipBNh hvKHs4AAnhGxj7VRSpmyTNU2HAzAnuG1q6t41mht7QQhXDJ7sa7C8g9GU3Saz9i04jz7Ys MjgbNowPi4ST/m5vBXqDQzOLgXEIyKp20XOANP7aOAZuF/+rvmsKx64EyGROBw== From: Tony Zorman To: Philip Kaludercic Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: <871qd91l9e.fsf@posteo.net> References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> <87r0l9fsl1.fsf@hyperspace> <871qd91l9e.fsf@posteo.net> Date: Tue, 07 Nov 2023 20:39:07 +0100 Message-ID: <87bkc59wv8.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-RS-META: qh8s7rzs4ew18ma47hm3r6iahtmpwbt1 X-MBO-RS-ID: 48a1b7e52a5cc55c1b2 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66567 Cc: stefankangas@gmail.com, 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Wed, Nov 01 2023 16:38, Philip Kaludercic wrote: > Tony Zorman writes: >> On Wed, Nov 01 2023 12:48, Philip Kaludercic wrote: >>> Tony Zorman writes: >>>> On Wed, Nov 01 2023 09:09, Philip Kaludercic wrote: >>>> >>>>> 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? >> >> Yes, a declaration like >> >> (use-package foo >> :vc (:url "url" :blargh "123")) >> >> would result in the following message >> >> =E2=9B=94 Error (use-package): Failed to parse package foo: use-pack= age: Keyword :vc received unknown argument: :blargh. Supported keywords are= : (:url :branch :lisp-dir :main-file :vc-backend :rev :shell-command :make = :ignored-files) >> >> Things get a bit muddier if ':blargh' would be passed down to >> package-vc-install. > > What I was wondering, was if it would make sense to raise an warning > instead. Now I'm a bit confused: where exactly? Inside of use-package or package-vc? Either way, I think raising an error when the user inputs nonsense is totally justified=E2=80=94I'd just like that error to be understandable as quickly as possible. Tony --=20 Tony Zorman | https://tony-zorman.com/ From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 07 16:25:48 2023 Received: (at 66567) by debbugs.gnu.org; 7 Nov 2023 21:25:48 +0000 Received: from localhost ([127.0.0.1]:43430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0Ta0-0008O7-19 for submit@debbugs.gnu.org; Tue, 07 Nov 2023 16:25:48 -0500 Received: from mout01.posteo.de ([185.67.36.65]:46961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0TZv-0008Np-Ue for 66567@debbugs.gnu.org; Tue, 07 Nov 2023 16:25:46 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 891BB240029 for <66567@debbugs.gnu.org>; Tue, 7 Nov 2023 22:24:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1699392299; bh=dCYpXfhlvUWJaU5rpBh9AaewmbujfjstsLd6TnQfHKg=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=qVAE6G0ZFgMEKIapbHaybnvZcxot1hrkGoVCXH9NxPIN6vi9mc5sQZZ4a1l6CUVBv +aQVk9rgLi+xmh9UJHbMxqmYZpYlmdtaoWfxvYDUxiqb/qOmhhneCBS4Bj959pHjqe 64nTZ2Tb0QjMB/tll3WfPobCJ4hw7kiLdNM/ihj/i4jfH2a2Lij1fYSCOKtw7ARq/7 m82hdiWhC485T+0G70sHXgfeOSuC+BvdkwrDmQDPTBJZr98F0Li26cPi7OiLrltXAM Ie2yor7NF9DDEjWvRDeluMo6eCVpVoNXMMMv6z9dnfTt3BYd67iRqdoZ7kvuZTJCSQ U4ADknK7MrmXA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SQ1T63DKBz9rxB; Tue, 7 Nov 2023 22:24:58 +0100 (CET) From: Philip Kaludercic To: Tony Zorman Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: <87bkc59wv8.fsf@hyperspace> (Tony Zorman's message of "Tue, 07 Nov 2023 20:39:07 +0100") References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> <87r0l9fsl1.fsf@hyperspace> <871qd91l9e.fsf@posteo.net> <87bkc59wv8.fsf@hyperspace> 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 Date: Tue, 07 Nov 2023 21:24:58 +0000 Message-ID: <87wmutfe8l.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66567 Cc: stefankangas@gmail.com, 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Tony Zorman writes: > On Wed, Nov 01 2023 16:38, Philip Kaludercic wrote: >> Tony Zorman writes: >>> On Wed, Nov 01 2023 12:48, Philip Kaludercic wrote: >>>> Tony Zorman writes: >>>>> On Wed, Nov 01 2023 09:09, Philip Kaludercic wrote: >>>>> >>>>>> 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? >>> >>> Yes, a declaration like >>> >>> (use-package foo >>> :vc (:url "url" :blargh "123")) >>> >>> would result in the following message >>> >>> =E2=9B=94 Error (use-package): Failed to parse package foo: use-pac= kage: Keyword :vc received unknown argument: :blargh. Supported keywords ar= e: (:url :branch :lisp-dir :main-file :vc-backend :rev :shell-command :make= :ignored-files) >>> >>> Things get a bit muddier if ':blargh' would be passed down to >>> package-vc-install. >> >> What I was wondering, was if it would make sense to raise an warning >> instead. > > Now I'm a bit confused: where exactly? Inside of use-package or > package-vc? Either way, I think raising an error when the user inputs > nonsense is totally justified=E2=80=94I'd just like that error to be > understandable as quickly as possible. I was thinking that package-vc should emit an error, but that use-package could emit a warning, in case a new keyword is added to package-vc specifications but hasn't yet been added to the use-package layer -- mainly because I don't use the latter and am not that familiar with the code. > Tony From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 10 07:01:08 2023 Received: (at 66567) by debbugs.gnu.org; 10 Nov 2023 12:01:08 +0000 Received: from localhost ([127.0.0.1]:49642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1QCC-0007O8-0Q for submit@debbugs.gnu.org; Fri, 10 Nov 2023 07:01:08 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]:47354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1QC6-0007NR-CW for 66567@debbugs.gnu.org; Fri, 10 Nov 2023 07:01:06 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (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-101.mailbox.org (Postfix) with ESMTPS id 4SRcp56MF0z9sq4; Fri, 10 Nov 2023 13:00:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1699617613; 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=P/tWR+GCueVhZCmsGMYwKBIuQ28a0KAWQva4i8wrFxo=; b=rDLP9rKxFQXZSZHforMxttkyDct/jascUFv/aR70VxIPBDxcR5liS3TZsrOy9BYQD1Q7Ee XN8CJzYLXyBlT5N+4pNHfLt4d2SvqDvKks+mYxiLIoMN34g2X6a8qvcJT9kX/5AfZjJZiv bZdMGJ0EToFfI//bWsFO/++Db0QhGNbUiXBn+joByUY7Hq/u5kXul5/z4f0VXsW9Trhpkq JPQNi57JE9dNdUJUq6u+mo4WOzvdTSXSaKV0oTidfyymNjhgbsiUAjp0hEUTUhuYxhBPPb 2NaFYnJTYDKc8H0p+fyhqz8xK6ezPymMjraH6Hum5XSDS684p4iOTplev9Ra7g== From: Tony Zorman To: Philip Kaludercic Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: <87wmutfe8l.fsf@posteo.net> References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> <87r0l9fsl1.fsf@hyperspace> <871qd91l9e.fsf@posteo.net> <87bkc59wv8.fsf@hyperspace> <87wmutfe8l.fsf@posteo.net> Date: Fri, 10 Nov 2023 13:00:12 +0100 Message-ID: <87pm0hvmwj.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-RS-ID: eaccbfcce40e9a64d64 X-MBO-RS-META: ch5qkugejaccpwf6r4c9t3ctunms4uy3 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66567 Cc: stefankangas@gmail.com, 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Tue, Nov 07 2023 21:24, Philip Kaludercic wrote: > Tony Zorman writes: >> Now I'm a bit confused: where exactly? Inside of use-package or >> package-vc? Either way, I think raising an error when the user inputs >> nonsense is totally justified=E2=80=94I'd just like that error to be >> understandable as quickly as possible. > > I was thinking that package-vc should emit an error, but that > use-package could emit a warning, in case a new keyword is added to > package-vc specifications but hasn't yet been added to the use-package > layer -- mainly because I don't use the latter and am not that familiar > with the code. On first thought this sounds good, but I think one would end up having to sync the actual state of things in two places. What if package-vc.el had a place where it stored all available commands? Then the use-package integration could just use that. I think it would also be easier to have this codified somewhere, rather than having to check the manual every time. --=20 Tony Zorman | https://tony-zorman.com/ From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 16 02:32:33 2023 Received: (at 66567) by debbugs.gnu.org; 16 Nov 2023 07:32:33 +0000 Received: from localhost ([127.0.0.1]:54418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3WrX-0001gD-4A for submit@debbugs.gnu.org; Thu, 16 Nov 2023 02:32:33 -0500 Received: from mout02.posteo.de ([185.67.36.66]:38867) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3WrS-0001fv-UW for 66567@debbugs.gnu.org; Thu, 16 Nov 2023 02:32:29 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2706D240108 for <66567@debbugs.gnu.org>; Thu, 16 Nov 2023 08:32:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1700119941; bh=CA1QC/TAd4lgvZ5UUr6HPNTUkJcbGw/BbhSv2FiY8i8=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=d6Jt3+mwziRl8xW1yhJ8gLk8E3U8WFCldpWRtCvIPjdNSuVGhc87U+PyCaUf+vAYR YCsdQUnPBvsnlxI7mdh93DUwxhrK1qSaXgS0U3U++RUBqy1Vj4DSF3ydeFdX7KuoEN cqZ8CYJLGHu4QsE4TF6eFOBbaKLCZS7mOifYHCHZsO0SaGFBMQ19a0AlFUMZeUGg3f CYLv8g+1Le2ENSxCK3LmFT4QsiEakstFurg6DwMCiE4QmFW3vl3AzFVx/NtBSvUtyr 5CCJkfypsWevbOgWo1vMk1J6aOAUaNrqxie8qCVf4WXmf3TKOjorYjttS9f4t4UXrw jKEfurHcqqXPw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SWBZ96RzBz9rxP; Thu, 16 Nov 2023 08:32:17 +0100 (CET) From: Philip Kaludercic To: Tony Zorman Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: <87pm0hvmwj.fsf@hyperspace> (Tony Zorman's message of "Fri, 10 Nov 2023 13:00:12 +0100") References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> <87r0l9fsl1.fsf@hyperspace> <871qd91l9e.fsf@posteo.net> <87bkc59wv8.fsf@hyperspace> <87wmutfe8l.fsf@posteo.net> <87pm0hvmwj.fsf@hyperspace> 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 Date: Thu, 16 Nov 2023 07:32:17 +0000 Message-ID: <87msve9mri.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66567 Cc: stefankangas@gmail.com, 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Tony Zorman writes: > On Tue, Nov 07 2023 21:24, Philip Kaludercic wrote: >> Tony Zorman writes: >>> Now I'm a bit confused: where exactly? Inside of use-package or >>> package-vc? Either way, I think raising an error when the user inputs >>> nonsense is totally justified=E2=80=94I'd just like that error to be >>> understandable as quickly as possible. >> >> I was thinking that package-vc should emit an error, but that >> use-package could emit a warning, in case a new keyword is added to >> package-vc specifications but hasn't yet been added to the use-package >> layer -- mainly because I don't use the latter and am not that familiar >> with the code. > > On first thought this sounds good, but I think one would end up having > to sync the actual state of things in two places. What if package-vc.el > had a place where it stored all available commands? Then the use-package > integration could just use that. I think it would also be easier to have > this codified somewhere, rather than having to check the manual every > time. This sounds like a better solution, I can add a constant with all the symbols that you can then use. I am still a bit busy, so I cannot promise when I'll manage to do so, but I'll ping you when the changes have been pushed. From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 14:58:17 2024 Received: (at 66567) by debbugs.gnu.org; 2 May 2024 18:58:17 +0000 Received: from localhost ([127.0.0.1]:45352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2bdJ-0006M0-AR for submit@debbugs.gnu.org; Thu, 02 May 2024 14:58:17 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:42480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2bdF-0006Lm-Ap for 66567@debbugs.gnu.org; Thu, 02 May 2024 14:58:15 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (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-101.mailbox.org (Postfix) with ESMTPS id 4VVjqV6p11z9tCT; Thu, 2 May 2024 20:57:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1714676262; 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=eicdFPSW5iQnslRiqqOZ9u1ObvggfOHxwTDbTXRk1/c=; b=O7YVmrS+U806+PVSKyl84U+PY3gqDJN7qmV13D56CzOUiZIZEe3IuSUfLVV40Y81w7oPGM jbWvrXgDVVXz3bEgrrlPLBMnGE3nQiDMrSASjKUS88ooEp7X5+IZKXbdgZbkqTv6PiW/qE k7uVX0EfAT6+iKU+bTZYZLpYGV/C8FlhFOCY8ndJ2AvLqPIq1xbgnX+p4+42ongC4PPQsH LnIU5zzMVe3cGetc1quFUoAGBSiN5EfAZpNMk9gEjMyyxgtGWY3FTmwZlXvbaRl07wYpTA Iy2ik7q5dD3eoONVUXK7a3hI70wvR/uKVfEVRb8ikK2Op9DIo2o+hvl1Mrg2bw== From: Tony Zorman To: Philip Kaludercic Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: <87msve9mri.fsf@posteo.net> References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> <87r0l9fsl1.fsf@hyperspace> <871qd91l9e.fsf@posteo.net> <87bkc59wv8.fsf@hyperspace> <87wmutfe8l.fsf@posteo.net> <87pm0hvmwj.fsf@hyperspace> <87msve9mri.fsf@posteo.net> Date: Thu, 02 May 2024 20:57:41 +0200 Message-ID: <874jbg11p6.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-RS-META: x3gmabzef18kwd9zj8osw8tzz3oqigyb X-MBO-RS-ID: 572cfcb6275d73b7453 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66567 Cc: 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Thu, Nov 16 2023 07:32, Philip Kaludercic wrote: > Tony Zorman writes: > >> On Tue, Nov 07 2023 21:24, Philip Kaludercic wrote: >>> Tony Zorman writes: >>>> Now I'm a bit confused: where exactly? Inside of use-package or >>>> package-vc? Either way, I think raising an error when the user inputs >>>> nonsense is totally justified=E2=80=94I'd just like that error to be >>>> understandable as quickly as possible. >>> >>> I was thinking that package-vc should emit an error, but that >>> use-package could emit a warning, in case a new keyword is added to >>> package-vc specifications but hasn't yet been added to the use-package >>> layer -- mainly because I don't use the latter and am not that familiar >>> with the code. >> >> On first thought this sounds good, but I think one would end up having >> to sync the actual state of things in two places. What if package-vc.el >> had a place where it stored all available commands? Then the use-package >> integration could just use that. I think it would also be easier to have >> this codified somewhere, rather than having to check the manual every >> time. > > This sounds like a better solution, I can add a constant with all the > symbols that you can then use. I am still a bit busy, so I cannot > promise when I'll manage to do so, but I'll ping you when the changes > have been pushed. Can I perhaps bump this myself instead? :) I'd really like to see this merged; if it helps move things along a bit quicker, I can also make the necessary changes to package-vc.el. Tony --=20 Tony Zorman | https://tony-zorman.com/ From debbugs-submit-bounces@debbugs.gnu.org Fri May 03 02:36:37 2024 Received: (at 66567) by debbugs.gnu.org; 3 May 2024 06:36:37 +0000 Received: from localhost ([127.0.0.1]:46177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2mX6-0002aR-Up for submit@debbugs.gnu.org; Fri, 03 May 2024 02:36:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2mX3-0002aL-Nu for 66567@debbugs.gnu.org; Fri, 03 May 2024 02:36:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2mWa-0001nK-2x; Fri, 03 May 2024 02:36:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=5qWGO4y4TD3C7jdQpfOTOki4TAqkc3g9R29Tms+wto8=; b=PyAFPkodj/7tyb+ck5Ei L6M4yO6DjNVLu+sP7gY2hCWOGONi1HBYqdmWARTv/Swjrr8lgOMi97yg6v/ZO2ygCf7kPy91Jv4vR EvuiZOyhBRiazgMlvGTwBPKHehi+9aMGIhfz/tjPDbxrG1xeXZ9EmnRMGZst6W8IQFQRs8wBmcbqC tjaaH9SiBgPGs/g6R/iBFl/TK0ZbFgxNJgufH2obE+ELYPt4WMh+gqn+6PQDFmY4jEj70Jmrm093Y upwZLWTS9H1OmTP37M/g09JwcKBGoqE2jjHQsgwLrub9DHlu4vv3Iv9mHYYWhJtFqD/x2jcnPJ/nr hoft/2nUDkuhiA==; Date: Fri, 03 May 2024 09:35:19 +0300 Message-Id: <868r0rjtco.fsf@gnu.org> From: Eli Zaretskii To: Tony Zorman , John Wiegley In-Reply-To: <874jbg11p6.fsf@hyperspace> (bug-gnu-emacs@gnu.org) Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> <87r0l9fsl1.fsf@hyperspace> <871qd91l9e.fsf@posteo.net> <87bkc59wv8.fsf@hyperspace> <87wmutfe8l.fsf@posteo.net> <87pm0hvmwj.fsf@hyperspace> <87msve9mri.fsf@posteo.net> <874jbg11p6.fsf@hyperspace> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66567 Cc: philipk@posteo.net, 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 66567@debbugs.gnu.org > Date: Thu, 02 May 2024 20:57:41 +0200 > From: Tony Zorman via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > On Thu, Nov 16 2023 07:32, Philip Kaludercic wrote: > > Tony Zorman writes: > > > >> On Tue, Nov 07 2023 21:24, Philip Kaludercic wrote: > >>> Tony Zorman writes: > >>>> Now I'm a bit confused: where exactly? Inside of use-package or > >>>> package-vc? Either way, I think raising an error when the user inputs > >>>> nonsense is totally justified—I'd just like that error to be > >>>> understandable as quickly as possible. > >>> > >>> I was thinking that package-vc should emit an error, but that > >>> use-package could emit a warning, in case a new keyword is added to > >>> package-vc specifications but hasn't yet been added to the use-package > >>> layer -- mainly because I don't use the latter and am not that familiar > >>> with the code. > >> > >> On first thought this sounds good, but I think one would end up having > >> to sync the actual state of things in two places. What if package-vc.el > >> had a place where it stored all available commands? Then the use-package > >> integration could just use that. I think it would also be easier to have > >> this codified somewhere, rather than having to check the manual every > >> time. > > > > This sounds like a better solution, I can add a constant with all the > > symbols that you can then use. I am still a bit busy, so I cannot > > promise when I'll manage to do so, but I'll ping you when the changes > > have been pushed. > > Can I perhaps bump this myself instead? :) > > I'd really like to see this merged; if it helps move things along a > bit quicker, I can also make the necessary changes to package-vc.el. John, could you please review the patches and comment? From debbugs-submit-bounces@debbugs.gnu.org Sat May 04 02:17:13 2024 Received: (at 66567) by debbugs.gnu.org; 4 May 2024 06:17:13 +0000 Received: from localhost ([127.0.0.1]:51466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s38hs-0006EH-U6 for submit@debbugs.gnu.org; Sat, 04 May 2024 02:17:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s38hq-0006E9-9c for 66567@debbugs.gnu.org; Sat, 04 May 2024 02:17:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s38hN-0001Us-TS; Sat, 04 May 2024 02:16:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:Date:In-Reply-To:Subject:To: From; bh=tNARlxsg1Aob+tFz43gIrfO4YGfSlLlAYFOg/FW71RM=; b=hvpXcAOwyuLIx/PYklwj 8MkiDVoELfRcMkJFV6QKtwpRi62EQLjW1uuQYpnNNrlRIm3yrin9xA4fDJ5yXiY9TYGAhu2s0QX3A a20y/KJ0o/GqjwavnscwG/BqpVcUAJAaVXx/Q/RUDMcEMlh1aAcEx+kRmfS2hgNR+ypiW0WrVuOqV M/qCpZb3HxRu/G9gaugM2CQ+xtdR76OHLsoLh5YHgv3Ve8bwZPEw4rRJFs0ZBo1nrocUpZoce7d+2 d8rB/A+7DnB8qmvGspNnO3+AdZLWsAoiUHmSsSKbA3t8zxCGwYObD2IJZuT7ycaCQ48OwsNFQZSW+ nl3fS+HSOkXcgQ==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvuddgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujgffkfhffgggtgfgsehtqhertddtreejnecuhfhrohhmpeflohhh nhcuhghivghglhgvhicuoehjohhhnhifsehgnhhurdhorhhgqeenucggtffrrghtthgvrh hnpeetleelueejleevgffhgfeggeffvdeiiefgkeetveejleehudetgfejieffgffftden ucffohhmrghinhepnhgvfigrrhhtihhsrghnshdrtghomhenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhhnhifodhmvghsmhhtphgruhht hhhpvghrshhonhgrlhhithihqdeikeejkedtleeggedqudejjeehfeekudeiqdhjohhhnh ifpeepghhnuhdrohhrghesnhgvfigrrhhtihhsrghnshdrtghomh X-ME-Proxy: Feedback-ID: ib64945b7:Fastmail From: John Wiegley To: Eli Zaretskii Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: <868r0rjtco.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 03 May 2024 09:35:19 +0300") Date: Fri, 03 May 2024 23:16:34 -0700 Message-ID: References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> <87r0l9fsl1.fsf@hyperspace> <871qd91l9e.fsf@posteo.net> <87bkc59wv8.fsf@hyperspace> <87wmutfe8l.fsf@posteo.net> <87pm0hvmwj.fsf@hyperspace> <87msve9mri.fsf@posteo.net> <874jbg11p6.fsf@hyperspace> <868r0rjtco.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66567 Cc: Tony Zorman , philipk@posteo.net, 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>>>> Eli Zaretskii writes: >> I'd really like to see this merged; if it helps move things along a >> bit quicker, I can also make the necessary changes to package-vc.el. > John, could you please review the patches and comment? Hi Eli, I=E2=80=99ve read through the proposed patches. What=E2=80=99s bein= g proposed looks good to me, except that I find it odd that it mentions two new keywords in = the ChangeLog that have nothing to do with the :vc keyword. Why conflate that i= nto this changeset? I don=E2=80=99t see those keywords mentioned anywhere else = but the valid keywords list, so is this for economy rather than creating two patche= s? --=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From debbugs-submit-bounces@debbugs.gnu.org Tue May 14 12:09:25 2024 Received: (at 66567) by debbugs.gnu.org; 14 May 2024 16:09:25 +0000 Received: from localhost ([127.0.0.1]:40147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6uiT-00076o-6O for submit@debbugs.gnu.org; Tue, 14 May 2024 12:09:25 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:36374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6uiN-00076g-BT for 66567@debbugs.gnu.org; Tue, 14 May 2024 12:09:23 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (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-101.mailbox.org (Postfix) with ESMTPS id 4Vf1Vv5ZCtz9sFk; Tue, 14 May 2024 18:08:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1715702919; 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=LEqvQFw+y5E864/t7F3qdX1Vn0j0XCqupz9EsigtUiA=; b=nA75h92KPLqGkUkm515Ce6ycUwVhgcCZZ4AR9klao48fHXQEka8xdHSgxBGx/Ji3Zm6cuc 05ZYsgJSEYW0GV/j49El7PLQa+6kTYe/+stsc5g9Z/ZAgrpaTWrslxL2d7Vj4SFtng3Nrd MzBqXalv2ktIdkuH6q643noOPOLrryj7pEIgkPVtCtu7cRXpRq+410WdvpO/B+c1rJuY3/ sV6BPzurwh8dWZ1Od2Yyth3noOMICJrc5v44AKksouQ+d1eDp0nPFCD0PJWYK8auew6ksK 6Zide+q3o5Vn19flhhWPj2yo+bIWvk7UceaIPlkiOwf4/YjKmhP/o8fiuxDmLg== From: Tony Zorman To: John Wiegley , Eli Zaretskii Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword In-Reply-To: References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> <87r0l9fsl1.fsf@hyperspace> <871qd91l9e.fsf@posteo.net> <87bkc59wv8.fsf@hyperspace> <87wmutfe8l.fsf@posteo.net> <87pm0hvmwj.fsf@hyperspace> <87msve9mri.fsf@posteo.net> <874jbg11p6.fsf@hyperspace> <868r0rjtco.fsf@gnu.org> Date: Tue, 14 May 2024 18:08:38 +0200 Message-ID: <87cypogyux.fsf@hyperspace> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MBO-RS-META: itriksagxig7gzqsmboiznbw8g48prbh X-MBO-RS-ID: 38adfa2dc950df93945 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66567 Cc: philipk@posteo.net, 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, On Fri, May 03 2024 23:16, John Wiegley wrote: >>>>>> Eli Zaretskii writes: > >>> I'd really like to see this merged; if it helps move things along a >>> bit quicker, I can also make the necessary changes to package-vc.el. > >> John, could you please review the patches and comment? > > Hi Eli, I=E2=80=99ve read through the proposed patches. What=E2=80=99s be= ing proposed looks > good to me, except that I find it odd that it mentions two new keywords i= n the > ChangeLog that have nothing to do with the :vc keyword. Why conflate that= into > this changeset? I don=E2=80=99t see those keywords mentioned anywhere els= e but the > valid keywords list, so is this for economy rather than creating two patc= hes? I did attach two patches to the original message, separating these out. Though you are right that perhaps I should have also created two separate bugs for this. It's just something I noticed along the way and figured I'd forget again if I didn't fix it immediately. These keywords (I hope I haven't misunderstood you and you are referring to :make and :shell-command) do, however, have something to do with :vc in the sense that they are sub-keywords of it, much like :ignored-files is. Tony --=20 Tony Zorman | https://tony-zorman.com/ From debbugs-submit-bounces@debbugs.gnu.org Tue May 14 21:19:44 2024 Received: (at 66567) by debbugs.gnu.org; 15 May 2024 01:19:44 +0000 Received: from localhost ([127.0.0.1]:41635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s73J2-0005Na-EX for submit@debbugs.gnu.org; Tue, 14 May 2024 21:19:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s73Iy-0005NF-9E for 66567@debbugs.gnu.org; Tue, 14 May 2024 21:19:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s73Iq-00024K-59; Tue, 14 May 2024 21:19:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Subject:To:From:Date:References:In-Reply-To: MIME-Version; bh=2rVxtZjVJRX/p7f0aDRH0pBPwmPEr+q0QCZWAAdKywU=; b=KHNJSW2eW7L4 nTbIW9KkHNjZP0GYHJx2FeqIZHTry7zqMQUPLLHKIE+hcKG+2o23J964w+XlJgdIjOURs4RSo8pEm pPLX2XDCkjeZkIXPQFSS5N6ldEcplLldG3iKA89I4Gk4Ez5TSJpRBrWZkpAIfMvxkAecl9KY2Xw27 RYUorh8pYjbX5dyV5Qkx7omMFiIc2R0N306ga3fT6frUKG96aRa0kqZQcuawUTbXfcw7Uhu2wqgWs GVJSLyB5N92gLTUPbrzqgqFRnZEhyUnzGo3Bzlt2BAC75jPHQJGJZRfvm/YAq4J/eFbdYFBFwV4vU iEHjEAno3KfaTg1DZJx0bw==; X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdegjedggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdfl ohhhnhcuhghivghglhgvhidfuceojhhohhhnfiesghhnuhdrohhrgheqnecuggftrfgrth htvghrnhepvdffudeujeekteeviedvffejteduteekjedvfeffhfekffehteeigeektdel hfdvnecuffhomhgrihhnpehtohhnhidqiihorhhmrghnrdgtohhmnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhohhhnfidomhgvshhmthhp rghuthhhphgvrhhsohhnrghlihhthidqieekjeektdelgeegqddujeejheefkeduiedqjh hohhhnfieppehgnhhurdhorhhgsehnvgifrghrthhishgrnhhsrdgtohhm X-ME-Proxy: Feedback-ID: ib64945b7:Fastmail X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-455-g0aad06e44-fm-20240509.001-g0aad06e4 MIME-Version: 1.0 Message-Id: In-Reply-To: <87cypogyux.fsf@hyperspace> References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> <87r0l9fsl1.fsf@hyperspace> <871qd91l9e.fsf@posteo.net> <87bkc59wv8.fsf@hyperspace> <87wmutfe8l.fsf@posteo.net> <87pm0hvmwj.fsf@hyperspace> <87msve9mri.fsf@posteo.net> <874jbg11p6.fsf@hyperspace> <868r0rjtco.fsf@gnu.org> <87cypogyux.fsf@hyperspace> Date: Tue, 14 May 2024 18:19:10 -0700 From: "John Wiegley" To: "Tony Zorman" , "Eli Zaretskii" Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66567 Cc: Philip Kaludercic , 66567@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) That all makes sense to me then. Looks good to go. John On Tue, May 14, 2024, at 9:08 AM, Tony Zorman wrote: > Hi, > > On Fri, May 03 2024 23:16, John Wiegley wrote: >>>>>>> Eli Zaretskii writes: >> >>>> I'd really like to see this merged; if it helps move things along a >>>> bit quicker, I can also make the necessary changes to package-vc.el. >> >>> John, could you please review the patches and comment? >> >> Hi Eli, I=E2=80=99ve read through the proposed patches. What=E2=80=99= s being proposed looks >> good to me, except that I find it odd that it mentions two new keywor= ds in the >> ChangeLog that have nothing to do with the :vc keyword. Why conflate = that into >> this changeset? I don=E2=80=99t see those keywords mentioned anywhere= else but the >> valid keywords list, so is this for economy rather than creating two = patches? > > I did attach two patches to the original message, separating these out. > Though you are right that perhaps I should have also created two > separate bugs for this. It's just something I noticed along the way and > figured I'd forget again if I didn't fix it immediately. > > These keywords (I hope I haven't misunderstood you and you are referri= ng > to :make and :shell-command) do, however, have something to do with :vc > in the sense that they are sub-keywords of it, much like :ignored-files > is. > > Tony > > --=20 > Tony Zorman | https://tony-zorman.com/ From debbugs-submit-bounces@debbugs.gnu.org Sat May 18 06:33:14 2024 Received: (at 66567-done) by debbugs.gnu.org; 18 May 2024 10:33:14 +0000 Received: from localhost ([127.0.0.1]:60921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8HNJ-0001Nb-US for submit@debbugs.gnu.org; Sat, 18 May 2024 06:33:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8HNE-0001NO-Gz for 66567-done@debbugs.gnu.org; Sat, 18 May 2024 06:33:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8HN4-0008Rd-L0; Sat, 18 May 2024 06:32:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=bU7Sa3zmnm7chpkw+q1bUdcAfJ84cCi8AuSf31PgE1o=; b=ZZOwmeh+JPh1 jsPrMCOksmsgwix1QDklRN4BtSEY6ehYoE5VMeXxY5vMUtXcz/xJICXqLtd1xeHODPZsLgGLghhMR KBOZkJYSHArATGdM8V7+GbpRlb0iWoVwYL2y4ebngICH4TJ+dnbg0WdsOLYe+TSWID6cUBTTEuGPt rKJHT1kj70DefbPgD2GeUgEym21lVF6wGn6Dfih0bt3Rv+zStK0i8fqB/fDmshoz13Dxzi8E4S2jH ewT5gvnqlXnNxB/wfAvxkvFNCsipN5tP0TU18Oz7nxRrpZDFxwu7BTgJ2J+aSi/sHN1walLvjfmSz JjOFibN9R0UcWutUvjuw4g==; Date: Sat, 18 May 2024 13:32:49 +0300 Message-Id: <86a5kne7fy.fsf@gnu.org> From: Eli Zaretskii To: "John Wiegley" In-Reply-To: (johnw@gnu.org) Subject: Re: bug#66567: [PATCH] use-package: Add ignored-files support to :vc keyword References: <877cnn4z2v.fsf@hyperspace> <87ttq5u9fj.fsf@posteo.net> <87ttq5bx2y.fsf@hyperspace> <87r0l91vww.fsf@posteo.net> <87r0l9fsl1.fsf@hyperspace> <871qd91l9e.fsf@posteo.net> <87bkc59wv8.fsf@hyperspace> <87wmutfe8l.fsf@posteo.net> <87pm0hvmwj.fsf@hyperspace> <87msve9mri.fsf@posteo.net> <874jbg11p6.fsf@hyperspace> <868r0rjtco.fsf@gnu.org> <87cypogyux.fsf@hyperspace> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66567-done Cc: tonyzorman@mailbox.org, philipk@posteo.net, 66567-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 14 May 2024 18:19:10 -0700 > From: "John Wiegley" > Cc: "Philip Kaludercic" , 66567@debbugs.gnu.org > > That all makes sense to me then. Looks good to go. Thanks, installed on the master branch, and closing the bug. From unknown Mon Sep 08 16:26:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 15 Jun 2024 11:24:14 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator