From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 07 09:45:07 2025 Received: (at submit) by debbugs.gnu.org; 7 Apr 2025 13:45:07 +0000 Received: from localhost ([127.0.0.1]:53480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u1mmg-0006ly-1F for submit@debbugs.gnu.org; Mon, 07 Apr 2025 09:45:07 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53770) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u1mmd-0006bW-8C for submit@debbugs.gnu.org; Mon, 07 Apr 2025 09:45:04 -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 1u1mmX-0000iR-U2 for bug-gnu-emacs@gnu.org; Mon, 07 Apr 2025 09:44:57 -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 1u1mmX-0000fQ-M5 for bug-gnu-emacs@gnu.org; Mon, 07 Apr 2025 09:44:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by fencepost.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u1mmX-0002aD-DO for bug-emacs@gnu.org; Mon, 07 Apr 2025 09:44:57 -0400 Received: from mail-yw1-x1134.google.com ([2607:f8b0:4864:20::1134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u1mmU-0000cy-C1 for bug-emacs@gnu.org; Mon, 07 Apr 2025 09:44:57 -0400 Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-6f666c94285so46728337b3.3 for ; Mon, 07 Apr 2025 06:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; t=1744033432; x=1744638232; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Vk6Y3GI02uqOYJZKOX2c7ZQlHVVIwGoI8OmqUJDKpYA=; b=jEWqssTBLHAS2Rxc/d6h95B/VN3Cz8enls8MznZaYQYGcS+VNpldhDvUQ3eslzaaES uthJScmxq/bgD5fYaohURkap2NLlwZTu8qEwOR+3gVDGSajPXK3y9KyI7gK8nr9cBHvk 8fqLfQhOn9poydIFGio2eCs+VIUfAlpWEOIPk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744033432; x=1744638232; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Vk6Y3GI02uqOYJZKOX2c7ZQlHVVIwGoI8OmqUJDKpYA=; b=Mt0Uu7oTDmcnRGtMm0nuRnuL2KPakJlyGa8Rz2ypzCq5ZV7VQZ3hy6UTIvczNqHyBq vVZkjsI9kVCTlVLuKfFsUIxr6ZcWgneCmDhEKZ7ddMwTlq7uTu19bY33Nz8aFuZ95rIn tNu5/gttAPMlQP5RahvziF5P6rbTpUF3EWB1afNtr4CmE3lLXIB4Ppe+Jij/lishadCj DSPFLdfCc7FLhWpMSEowNJae6rO8W9X+OM2B3ZZYl0mIwh9P+zvYQuPWDV2WEXgspmOg VIzYXTn62VbLvdETawR2+meEgLejdG2ixNUedBe5hd7VTAN/5IfZThr8a0cDvHvehBVl ueCA== X-Gm-Message-State: AOJu0Yz4xktzJkyoFvK7xCBjXWz70Q+zK+y4pR9Y5pNV6yJRmDEZGfL4 MrO9mLfY9vGIlItkrOSA0UdLHZwlUnXGPhD4/ehrzzumsicV/KeyOh7rc168iVH+VcA24CZPT+1 XLpyBkccVNrrhrs193Ra+N3NT3wwE3ho8Ef/xK8thhAaHOPV8PCA= X-Gm-Gg: ASbGncvm3D1EO8VeQPmsBDS9Zzqifd+c7AtmYhd4oWBy9luj7BVntx/rxEKRE4ldNp7 SPwACIW/U7BaevrXtMs5NPdaDmDD8Do8SZTfBn9sC6IkiKDwpaZnUi7qxS0fNiRwDFivWU8hfIi 4hcmRA8p+gki4plAJWja78Yuvh1kA= X-Google-Smtp-Source: AGHT+IGbb3d5f6cEKssfH6vCdzUGpUEbMW6vShRjO/bhrHVKu1CuySGM59SbAPF/6JzeYNBXN2clzHp487KPxDQerzM= X-Received: by 2002:a05:6902:4809:b0:e6d:f41c:6bdb with SMTP id 3f1490d57ef6-e6e316c5b62mr14331416276.6.1744033431727; Mon, 07 Apr 2025 06:43:51 -0700 (PDT) MIME-Version: 1.0 From: Reuben Thomas Date: Mon, 7 Apr 2025 14:43:39 +0100 X-Gm-Features: ATxdqUFd9OxtGLgOIJJHQovJ0o1ZAE69h2rpyjKa_2-Y6Ii_XoajJY3xsF5_51c Message-ID: Subject: How to add multiple functions to one hook with :hook in use-package? To: bug-emacs Content-Type: multipart/alternative; boundary="0000000000002ccae80632306d82" Received-SPF: pass client-ip=2607:f8b0:4864:20::1134; envelope-from=rrt@sc3d.org; helo=mail-yw1-x1134.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit 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.1 (/) --0000000000002ccae80632306d82 Content-Type: text/plain; charset="UTF-8" The manual says: The @code{:hook} keyword allows adding functions to hooks. It takes @c FIXME: The actual forms accepted by :hook are different, see below! one argument of the form @var{hooks}, specifying one or more functions to add to one or more hooks. The FIXME suggests that the documentation may be incorrect! I am precisely trying to add multiple functions to one hook, and I can't work out how to do it with a single :hook clause. Is this in fact possible? The most obvious syntax, copying the syntax for adding a function to multiple hooks, does not work, e.g.: (use-package foo-mode :hook (foo-mode . (function-a function-b))) I tried other things, and searching online, and even looking at the source code for use-package, but I can't work it out. Hence, maybe a good chance to fix this FIXME in the docs, and explain to users how this is done, or state that it cannot be done, and you have to use another method to add multiple functions to a hook. I have to say, use-package (which I have only now looked at) is a revelation! -- https://rrt.sc3d.org --0000000000002ccae80632306d82 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The manual says:

The @code{:hook} keyword allows adding functions to hooks.=C2=A0 It= takes
@c FIXME: The actual forms accepted by :hook are different, see b= elow!
one argument of the form @var{hooks}, specifying one or more funct= ions
to add to one or more hooks.

<= div>
The FIXME suggests that the documentation may be inc= orrect!

I am precisely= trying to add multiple functions to one hook, and I can't work out how= to do it with a single :hook clause. Is this in fact possible? The most ob= vious syntax, copying the syntax for adding a function to multiple hooks, d= oes not work, e.g.:

(u= se-package foo-mode
=C2=A0 :hook
=C2=A0 (foo-mode . (function-a function-b)))

=
I tried other things, and searching online, a= nd even looking at the source code for use-package, but I can't work it= out. Hence, maybe a good chance to fix this FIXME in the docs, and explain= to users how this is done, or state that it cannot be done, and you have t= o use another method to add multiple functions to a hook.

I have to say, use-package (which I h= ave only now looked at) is a revelation!

--
<= div dir=3D"ltr">https://= rrt.sc3d.org
--0000000000002ccae80632306d82-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 07 09:47:24 2025 Received: (at submit) by debbugs.gnu.org; 7 Apr 2025 13:47:24 +0000 Received: from localhost ([127.0.0.1]:53512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u1mou-0001PN-6a for submit@debbugs.gnu.org; Mon, 07 Apr 2025 09:47:24 -0400 Received: from lists.gnu.org ([2001:470:142::17]:40516) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u1mos-0001Oy-77 for submit@debbugs.gnu.org; Mon, 07 Apr 2025 09:47:22 -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 1u1mol-0001DD-AR for bug-gnu-emacs@gnu.org; Mon, 07 Apr 2025 09:47:16 -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 1u1mok-00011c-NC for bug-gnu-emacs@gnu.org; Mon, 07 Apr 2025 09:47:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by fencepost.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u1moj-0003lM-Rv for bug-emacs@gnu.org; Mon, 07 Apr 2025 09:47:14 -0400 Received: from mail-yb1-xb2a.google.com ([2607:f8b0:4864:20::b2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u1moi-000115-3u for bug-emacs@gnu.org; Mon, 07 Apr 2025 09:47:13 -0400 Received: by mail-yb1-xb2a.google.com with SMTP id 3f1490d57ef6-e6582542952so3049112276.3 for ; Mon, 07 Apr 2025 06:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; t=1744033631; x=1744638431; darn=gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=f7QQ+DI35uabdKjbmlAwJ6h2ebrHcKqps1tOZVGxMhM=; b=NYsX+wNLT6fcs7DrcgzvgFmUHJ9XpS+0ZFYJMe/dQRuI8Nng9rDmnGRPucRKVfuZTI E8NFBxbYlYrLc3j5PvfvFpKCp/v9q/yLFyrsHiknzuJszc5C7OgX3yV8f6AmVCsvEd4E Gcxh/SdcmGWpyVW332calUqV7dtZMkKsa1TV4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744033631; x=1744638431; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f7QQ+DI35uabdKjbmlAwJ6h2ebrHcKqps1tOZVGxMhM=; b=TC5yDy8Hnb3VGvLY8E0T853cYAMdaoL6N4Dhkn4yTIbDCZoRXzCS38kBw5JXXGj1/i VIJmK/zoyDwAwFT8bHtfl+6mdpqROQ6h+563dTkg1B5Ccbc2uh+MHOOBRHEGtktAZNnk zsl+aX+yA+nAP0i3Pb//21i0m4pJcfOmcd3w7La7jvbpMluS2O2TH583kBDFxHC9VAPO PVcxXkG7CTzmInOBjqrTOJ3DgXWAQI63yfB/joYIwKbktUcd3FiojkrLLDWNzbDWJIry MNDsVUiwXWxKZrApmvYlo6EjqPsDqu3KEpIIkcj7tJXmjDnomaQ0ORdqcQfNDezjRk+W 6swQ== X-Gm-Message-State: AOJu0YyuAYNKVlGjHR268AQ3ZXn5h8EGMlr4M4QIJYUruKFnV7LY9EbZ ozh6tRiv3EUeSjFT5UHl5tqvmDDPMJADdj+lLK7szF4XxRKCkCHrBFUy1Ts1oqs6lPYUcwNLfm7 RGgYTnZpmAp8cqaP4/DAVFacgC2b4D1C/gejJC5la5ZdHOm02Dng= X-Gm-Gg: ASbGnct34O+SLpxgv6jHF7suKsWd51m62cZpJhofAoZxC9FGZrADqHCGyOs7+nEWvvp ckzB8EVW1Zq5+wTkY/EdqDPky9BHb8H3NdCF0KkaZDC8/94WXJcKDstFd7w0qYDiRm5cCwIeM+7 5CqxgQZIEQDzzWxFTaV4UkFyPKzP8= X-Google-Smtp-Source: AGHT+IHknVOiAkIskQnPUoAjlDX94vmkmf23ZVtaYgAbi/RJFlu4KU/IlKaKlL4KTVsM/qFnMJmV5tercLTVyLREas4= X-Received: by 2002:a05:6902:248e:b0:e6d:ddaf:ab24 with SMTP id 3f1490d57ef6-e6e316d11bbmr13824275276.8.1744033631118; Mon, 07 Apr 2025 06:47:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Reuben Thomas Date: Mon, 7 Apr 2025 14:46:59 +0100 X-Gm-Features: ATxdqUEk1CY2xjxS6hJIxI6HXq-xkeNZ8JaXnlntfJS7mURRNTuegEJE_LoxNc4 Message-ID: Subject: Re: How to add multiple functions to one hook with :hook in use-package? To: bug-emacs Content-Type: multipart/alternative; boundary="0000000000000f45c20632307918" Received-SPF: pass client-ip=2607:f8b0:4864:20::b2a; envelope-from=rrt@sc3d.org; helo=mail-yb1-xb2a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit 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.1 (/) --0000000000000f45c20632307918 Content-Type: text/plain; charset="UTF-8" On Mon, 7 Apr 2025 at 14:43, Reuben Thomas wrote: > > I tried other things, and searching online, and even looking at the source > code for use-package, but I can't work it out. > I had another look at the source code, and found this: (concat label " a or ( . )" " or list of these") It's unfortunate that this is part of an error message, as I've never seen the error, but I think this explains the syntax, and indeed says that you can't add multiple functions to a single hook with one :hook line; in other words, it would be necessary to write something like: (use-package foo-mode :hook ((foo-mode . function-a) (foo-mode . function-b))) -- https://rrt.sc3d.org --0000000000000f45c20632307918 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, 7 Apr 2025 at = 14:43, Reuben Thomas <rrt@sc3d.org&g= t; wrote:

I tried o= ther things, and searching online, and even looking at the source code for = use-package, but I can't work it out.

I had another look at the source code, = and found this:

=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 (concat label " a <symbol> or= (<symbol or list of symbols> . <symbol or function>)"
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"= or list of these")

= It's unfortunate that this is part of an error message, as I've nev= er seen the error, but I think this explains the syntax, and indeed says th= at you can't add multiple functions to a single hook with one :hook lin= e; in other words, it would be necessary to write something like:

(use-package foo-mode
=C2=A0=C2=A0 :hook
=C2=A0=C2=A0 ((fo= o-mode . function-a)
=C2=A0=C2=A0 (foo-mode . funct= ion-b)))
=C2=A0
--
--0000000000000f45c20632307918-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 13 04:49:28 2025 Received: (at 77609) by debbugs.gnu.org; 13 Apr 2025 08:49:28 +0000 Received: from localhost ([127.0.0.1]:38395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3t1q-0001tz-SC for submit@debbugs.gnu.org; Sun, 13 Apr 2025 04:49:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42916) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3t1o-0001sn-An for 77609@debbugs.gnu.org; Sun, 13 Apr 2025 04:49:24 -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 1u3t1i-0004AH-Oc; Sun, 13 Apr 2025 04:49:18 -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=XQcZvaDobcOCPpO3vYI5xfkCftLmlAUtKgCCLxLO0tQ=; b=TtrhgTJILrsX 8t1lXybh+BfBepKSTmX2wzDFz9xzZB7Fiqzstt+5dzF29DtNDbMnMSF+wTMYygy25B+GY5GrOEaTg MoxSkBZFMSTudPyx+AIhlHzIUiNXsO+FYr/+BCNUvXCHHOaSO2IsmR3AJRgG6eIkDj9vMu0O7/UJA Zsiphv5Fjp5YVsuhLFAuheiHEKCE4EtjL0Gp5vEXs3GY8ZyDHrEYHYFnnS9TRSEy+uzOT2spuRyZV 1fWHZEIG+G29hECG98EHHNBpt9asQtP7DQKuTuAisPyQGtMLoMvcoAn9LdVMKIjVHYleKK3O3QzDz o3vXtdUGNAbQvV8Y/p+Vdw==; Date: Sun, 13 Apr 2025 11:49:15 +0300 Message-Id: <864iysla44.fsf@gnu.org> From: Eli Zaretskii To: Reuben Thomas , John Wiegley In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#77609: How to add multiple functions to one hook with :hook in use-package? References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77609 Cc: 77609@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: Mon, 7 Apr 2025 14:46:59 +0100 > From: Reuben Thomas via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > On Mon, 7 Apr 2025 at 14:43, Reuben Thomas wrote: > > I tried other things, and searching online, and even looking at the source code for use-package, but I > can't work it out. > > I had another look at the source code, and found this: > > (concat label " a or ( . )" > " or list of these") > > It's unfortunate that this is part of an error message, as I've never seen the error, but I think this explains the > syntax, and indeed says that you can't add multiple functions to a single hook with one :hook line; in other > words, it would be necessary to write something like: > > (use-package foo-mode > :hook > ((foo-mode . function-a) > (foo-mode . function-b))) John, can you please help in understanding how the documentation could be clarified in this regard? From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 24 21:10:49 2025 Received: (at 77609) by debbugs.gnu.org; 25 Apr 2025 01:10:49 +0000 Received: from localhost ([127.0.0.1]:43251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u87aa-00015u-KG for submit@debbugs.gnu.org; Thu, 24 Apr 2025 21:10:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55272) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u87aY-00015W-80 for 77609@debbugs.gnu.org; Thu, 24 Apr 2025 21:10:47 -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 1u87aR-0002EZ-4p; Thu, 24 Apr 2025 21:10:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=j4wyl/W5xca2wM7AQaxW1EzwYsAYlm+bCget8YyHv80=; b=OwQORHOxQ2Rof/vqi5vG EJLfAlQNYjXo5yks54YdTxB3beuItbSjfK+LmgzYogObIFlRIxqzPWeK73h0gAw/Vp3kVUe0yz4Mz 03Uz/9DDKd3rd1aDPbYXykTDhKdznzX2/pH1UfGTDkOE0AYTNGhNLEFVYmEMBkeUXQUQ+z3ydojef aXc2wKq6ry90UnMJq7D+SRmv6wU8gs3bVU/eO/mwACmB5WynSRbQF0Yqd1wc+EwjAyhaBklNxCwPU Q9mQrpF+ZtOAbA+VA2WlF6Mo57syN58cmAIE6n2xFRXq7qFeL++otvRuaTOIN6LcYElSmy8duWmP1 963nQc2p7b4n8g==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvhedtleekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkfgggtgfgsehtqhertddt reejnecuhfhrohhmpeflohhhnhcuhghivghglhgvhicuoehjohhhnhifsehgnhhurdhorh hgqeenucggtffrrghtthgvrhhnpeeiffdthedviedvtdfffeffffevkeeludejieeltddu feehfefhhfefgeejteefgeenucffohhmrghinhepnhgvfigrrhhtihhsrghnshdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhh nhifodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeikeejkedtleeggedqud ejjeehfeekudeiqdhjohhhnhifpeepghhnuhdrohhrghesnhgvfigrrhhtihhsrghnshdr tghomhdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoh epjeejiedtleesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehrrhhtsehs tgefugdrohhrghdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: ib64945b7:Fastmail From: John Wiegley To: Eli Zaretskii Subject: Re: bug#77609: How to add multiple functions to one hook with :hook in use-package? In-Reply-To: <864iysla44.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 13 Apr 2025 11:49:15 +0300") References: <864iysla44.fsf@gnu.org> Date: Thu, 24 Apr 2025 18:10:32 -0700 Message-ID: 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: 77609 Cc: 77609@debbugs.gnu.org, Reuben Thomas 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: >> It's unfortunate that this is part of an error message, as I've never se= en the error, but I think this explains the >> syntax, and indeed says that you can't add multiple functions to a singl= e hook with one :hook line; in other >> words, it would be necessary to write something like: >>=20 >> (use-package foo-mode >> :hook >> ((foo-mode . function-a) >> (foo-mode . function-b))) > John, can you please help in understanding how the documentation could be > clarified in this regard? I mean, there=E2=80=99s no reason it could be extended to support a list, l= ike: (foo-mode . (function-a function b)) So do we want to document the restriction, or relax it? --=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 Fri Apr 25 03:28:49 2025 Received: (at 77609) by debbugs.gnu.org; 25 Apr 2025 07:28:49 +0000 Received: from localhost ([127.0.0.1]:46536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8DUO-0008HX-7n for submit@debbugs.gnu.org; Fri, 25 Apr 2025 03:28:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36742) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8DUH-0008Gt-VD for 77609@debbugs.gnu.org; Fri, 25 Apr 2025 03:28:46 -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 1u8DUB-0002GA-Mp; Fri, 25 Apr 2025 03:28:35 -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=XjIjyWUBU0qF6DVgwdsPgH7BIfNsLvk2xXhYINpHpys=; b=qf23RitlKV+7eg5eOJpm /nByUhkiS5IPT19k1Wn4viPVpZt/8/gFzkmXZxnN+KZIPCu0VFdvuxTmXOXpKW8+62r+q74H4UFJ9 3mktK+wf2nm9th+AWj0zFi/DkmvL4PAnKh7Yn21udXlTB2Om5BznEX2aQQ4c6WvPdA830M9c3SyUF EfqvBkZpjLl5w9ldnKomCJRl7HxH/IeOEkBryxjPLYACBJZffD//98zHpsIz4coPTB1nEmMwpxg98 mw8rHZHNUmAEHvQaArc3lC2DvfhvefiUJ8w25UninhY8QTZaPrm9CO5l854yFpxEilXRrDy8F8IV4 fMn7pHN5qDax4g==; Date: Fri, 25 Apr 2025 10:28:32 +0300 Message-Id: <868qnoya1r.fsf@gnu.org> From: Eli Zaretskii To: John Wiegley In-Reply-To: (message from John Wiegley on Thu, 24 Apr 2025 18:10:32 -0700) Subject: Re: bug#77609: How to add multiple functions to one hook with :hook in use-package? References: <864iysla44.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77609 Cc: 77609@debbugs.gnu.org, rrt@sc3d.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 (---) > From: John Wiegley > Cc: Reuben Thomas , 77609@debbugs.gnu.org > Date: Thu, 24 Apr 2025 18:10:32 -0700 > > >>>>> Eli Zaretskii writes: > > >> It's unfortunate that this is part of an error message, as I've never seen the error, but I think this explains the > >> syntax, and indeed says that you can't add multiple functions to a single hook with one :hook line; in other > >> words, it would be necessary to write something like: > >> > >> (use-package foo-mode > >> :hook > >> ((foo-mode . function-a) > >> (foo-mode . function-b))) > > > John, can you please help in understanding how the documentation could be > > clarified in this regard? > > I mean, there’s no reason it could be extended to support a list, like: > > (foo-mode . (function-a function b)) > > So do we want to document the restriction, or relax it? The latter, I guess, assuming it isn't too complicated. From debbugs-submit-bounces@debbugs.gnu.org Sat May 10 05:23:24 2025 Received: (at 77609) by debbugs.gnu.org; 10 May 2025 09:23:24 +0000 Received: from localhost ([127.0.0.1]:43836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uDgQW-0004qa-Dz for submit@debbugs.gnu.org; Sat, 10 May 2025 05:23:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33986) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uDgQT-0004qH-Mx for 77609@debbugs.gnu.org; Sat, 10 May 2025 05:23:22 -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 1uDgQN-0000OH-Va; Sat, 10 May 2025 05:23:15 -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=y53y/tp2f66SRI7budwAXxnzQVbPaPuKuiJt5IhLs3g=; b=bF1sHCSDKB2ecLs+Pjzh pu02kj/4+wzM6zA8zwvQP4aS5V58LtEJlFwIwcBi3WAbs1AaXcRCHi587Y0HB51C5FmOpV0kagvaI eHoFlRD9j3b3mwesRW2e58PsAx+6aJXrVlVK3sKECTuGy36PgrBF2QCnenWkG4alfGW6nnfDLRh1e uwHRoIgy9U7YklswRSqFP08hp51BfaC2oN9MGCzNei70a5Z1GTejZeA0Nn6QKZk4DtuqaFNbJqz21 CvQMLL6UHlr5KrHTy9Zcvlx2SuYNxP7gO+QEGW27LfdxONOYPZs1FjSHXx6j95+gyQe/T1sv0Wxwa fXS6Aq26CKx8OQ==; Date: Sat, 10 May 2025 12:23:12 +0300 Message-Id: <86ldr4bz0f.fsf@gnu.org> From: Eli Zaretskii To: johnw@gnu.org In-Reply-To: <868qnoya1r.fsf@gnu.org> (message from Eli Zaretskii on Fri, 25 Apr 2025 10:28:32 +0300) Subject: Re: bug#77609: How to add multiple functions to one hook with :hook in use-package? References: <864iysla44.fsf@gnu.org> <868qnoya1r.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77609 Cc: 77609@debbugs.gnu.org, rrt@sc3d.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 (---) Ping! How can we make any further progress here? > Cc: 77609@debbugs.gnu.org, rrt@sc3d.org > Date: Fri, 25 Apr 2025 10:28:32 +0300 > From: Eli Zaretskii > > > From: John Wiegley > > Cc: Reuben Thomas , 77609@debbugs.gnu.org > > Date: Thu, 24 Apr 2025 18:10:32 -0700 > > > > >>>>> Eli Zaretskii writes: > > > > >> It's unfortunate that this is part of an error message, as I've never seen the error, but I think this explains the > > >> syntax, and indeed says that you can't add multiple functions to a single hook with one :hook line; in other > > >> words, it would be necessary to write something like: > > >> > > >> (use-package foo-mode > > >> :hook > > >> ((foo-mode . function-a) > > >> (foo-mode . function-b))) > > > > > John, can you please help in understanding how the documentation could be > > > clarified in this regard? > > > > I mean, there’s no reason it could be extended to support a list, like: > > > > (foo-mode . (function-a function b)) > > > > So do we want to document the restriction, or relax it? > > The latter, I guess, assuming it isn't too complicated. > > > > From debbugs-submit-bounces@debbugs.gnu.org Thu May 22 02:20:45 2025 Received: (at 77609) by debbugs.gnu.org; 22 May 2025 06:20:45 +0000 Received: from localhost ([127.0.0.1]:58818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uHzIL-00058T-0i for submit@debbugs.gnu.org; Thu, 22 May 2025 02:20:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43532) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uHzII-000581-HY for 77609@debbugs.gnu.org; Thu, 22 May 2025 02:20: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 1uHzIC-0007hy-RG; Thu, 22 May 2025 02:20:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=lpuX1RweC2GqESt3B55kTwKPFFDWSIy0iQwhsIGGRUo=; b=AaQPT1xxIFek3Y+m3SSF 3AD9olS9FhajCtvldizibPeznFdRPutD2OT7NfZh6nn5FtQTU5D7jcwUC/eVomTXPhoBHTdUwHfBQ e2hd4NXSc2AhMSElWbGP/2a2pp2Lzf+o2kWEfS0xSUC5Wq6JuAbQQaxlZTcgdlx4yj6gZsWoEPpMc tbaOD2RJlC7c+UyQKwZumuu/Aq1heF3nFDQz4FTLOnJshxPH5ghQDetxgOBe4S9cZ7HcD79JRrl5N 9saKkw4nAJqMO1fyScxyX5eaftvj9tJL1QKyMtGOeAouvkND3HqS0npKftcKF9RtmCXuSnjBKhNqC oUtEjWBTCPNh9Q==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgdehvdefucdltddurdegfedvrddttd dmucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgf nhhsuhgsshgtrhhisggvpdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttd enucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghffffk fgggtgfgsehtqhertddtreejnecuhfhrohhmpeflohhhnhcuhghivghglhgvhicuoehjoh hhnhifsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpeeiffdthedviedvtdfffeff ffevkeeludejieeltddufeehfefhhfefgeejteefgeenucffohhmrghinhepnhgvfigrrh htihhsrghnshdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehjohhhnhifodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqd eikeejkedtleeggedqudejjeehfeekudeiqdhjohhhnhifpeepghhnuhdrohhrghesnhgv figrrhhtihhsrghnshdrtghomhdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtph houhhtpdhrtghpthhtoheprhhrthesshgtfegurdhorhhgpdhrtghpthhtohepjeejiedt leesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopegvlhhiiiesghhnuhdroh hrgh X-ME-Proxy: Feedback-ID: ib64945b7:Fastmail From: John Wiegley To: Eli Zaretskii Subject: Re: bug#77609: How to add multiple functions to one hook with :hook in use-package? In-Reply-To: <86ldr4bz0f.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 May 2025 12:23:12 +0300") References: <864iysla44.fsf@gnu.org> <868qnoya1r.fsf@gnu.org> <86ldr4bz0f.fsf@gnu.org> Date: Wed, 21 May 2025 23:20:32 -0700 Message-ID: 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: 77609 Cc: 77609@debbugs.gnu.org, rrt@sc3d.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: > Ping! How can we make any further progress here? So, I dug into =E2=80=98use-package-normalize/:hook=E2=80=99 to see how har= d it would be and=E2=80=A6 it=E2=80=99s unreasonably hard. Accepting a list of functions in this way i= s just not something the code was designed to do in its current form. So rather than risk breaking lots of things, I think the user just has to expand: :hook (foo a b) :hook (foo . (a b)) into :hook (foo . a) (foo . b) --=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 Thu May 22 03:55:07 2025 Received: (at 77609) by debbugs.gnu.org; 22 May 2025 07:55:07 +0000 Received: from localhost ([127.0.0.1]:59419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uI0lf-0003PB-7O for submit@debbugs.gnu.org; Thu, 22 May 2025 03:55:07 -0400 Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]:48422) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uI0lc-0003Ob-8x for 77609@debbugs.gnu.org; Thu, 22 May 2025 03:55:04 -0400 Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-70c7b8794faso77281867b3.1 for <77609@debbugs.gnu.org>; Thu, 22 May 2025 00:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; t=1747900498; x=1748505298; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3RlqkAOUPoN73faEHqtaNU7bn874uR6vWVQYLyteows=; b=lYEEsu2cFYNmjcfeGK8bxNUORXxR0ignHtlmUZ/UcDDebHz6n279Y4P34jLh7eR+xN TEn7JTd+kmrNj1W1zIhVDFth1q0tHuUmLGSYEL8/XPKOaypB1SE6+xhhxXR+hr4i1SiZ XCtkEK/vFH0HcrFhzsNvp7qQkVMY9qz3z5B0c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747900498; x=1748505298; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3RlqkAOUPoN73faEHqtaNU7bn874uR6vWVQYLyteows=; b=wiiBaI3CDIteXffhz5Y/IBowSZK6IPA8GDGA/PAQt+Z+gw3ef7PyXTHt0ebxJZpG3F VALESIVOggyvzlN7Ud1NaSkk65b4tyTx/9hm+koHmN4JKzLfJ3yyHAfOVf+DMX0BOdyG x1HehsfnkStSQNNed59tt56mOUnu8V1XVxpx82QaKAWWkAE6RVXIPaUblqi7i2ptMmTy Km7GZy1nbZWAxyWpM/70hkxJN1L0H96WrTxfmqIOt1/7UlzGBZdvz5s8+UBqaksQbutk sw9MN1kt3JZtsWW3ZxIcHoK6ZPtSAhfuxMEqW4LlFmbnf96b18r8mp7DDga+5804NOOl /jBg== X-Forwarded-Encrypted: i=1; AJvYcCVMlUS9+JttDA5hg+fkYMab98UdKcTLkZkcXxDnvUHdBoRKTuAUaiEYfe4yuKpx9CKdQDw0gQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0Ywq571tQUCLSCv98UU0eLN1klqrz51fwvI5M4VKcf0r1RUO5y3p PMTRGnmEcqDLSLHCsPnSe989irW67F/Ipunsv3SFzmtgYAkfI4BGlvgHS+Vd5nXnX8qEPWtMNV+ 3mahiPzWQm2Zdp4XVdJGwpZtWCGWXBFfoHfcsWN1ihQ== X-Gm-Gg: ASbGnctnJOzGC+ZwOhnWmmi9r5KzMTNnP60IiArCl/6uQwYXAA/EBhcrkF0MTO39Eo8 BJ1u9kV0lbJQDLd72Q3rvXR/WEMoAoJM5C3+BiCXlOctHRiTpkokNeAZ5t5R1I4l0Cm1yNSD961 nY7t1W//dfmRAIkOiFdWi3RgsTjQKYe+Q9lz0t8R55oqzRKeA8n0Klo2o/hnXjhpe93A== X-Google-Smtp-Source: AGHT+IEuCyuyJ5DxkyH6D325G22fQbwFoyraOPGhC4KhXQLjSr8zEVSnP/EXIVDli8T8kqHRRcIzRK1CFYT5nl+UyXc= X-Received: by 2002:a05:690c:6a0d:b0:70c:b882:303 with SMTP id 00721157ae682-70cb88204e8mr278920127b3.20.1747900498461; Thu, 22 May 2025 00:54:58 -0700 (PDT) MIME-Version: 1.0 References: <864iysla44.fsf@gnu.org> <868qnoya1r.fsf@gnu.org> <86ldr4bz0f.fsf@gnu.org> In-Reply-To: From: Reuben Thomas Date: Thu, 22 May 2025 08:54:47 +0100 X-Gm-Features: AX0GCFsy7zP5EbqWBo48k1UM-LfXA-lBw5AFLAtQTSgF9bKbROkAng_CAVgveoE Message-ID: Subject: Re: bug#77609: How to add multiple functions to one hook with :hook in use-package? To: John Wiegley Content-Type: multipart/alternative; boundary="0000000000005066770635b4cc21" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77609 Cc: Eli Zaretskii , 77609@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.0 (-) --0000000000005066770635b4cc21 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 22 May 2025 at 07:20, John Wiegley wrote: > >>>>> Eli Zaretskii writes: > > > Ping! How can we make any further progress here? > > So, I dug into =E2=80=98use-package-normalize/:hook=E2=80=99 to see how h= ard it would be > and=E2=80=A6 > it=E2=80=99s unreasonably hard. Accepting a list of functions in this way= is just > not > something the code was designed to do in its current form. > Thanks for looking into this. --=20 https://rrt.sc3d.org --0000000000005066770635b4cc21 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable --
--0000000000005066770635b4cc21-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 24 05:58:56 2025 Received: (at 77609-done) by debbugs.gnu.org; 24 May 2025 09:58:56 +0000 Received: from localhost ([127.0.0.1]:57366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIleZ-0003Ao-Of for submit@debbugs.gnu.org; Sat, 24 May 2025 05:58:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52594) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uIleX-0003AR-Nr for 77609-done@debbugs.gnu.org; Sat, 24 May 2025 05:58:54 -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 1uIleR-0006SZ-EK; Sat, 24 May 2025 05:58:47 -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=ZPBvek3nsBnWlEgdStIlUCNeyZB6D6tgKUefHXEjhdQ=; b=piCKMs3P59m8GSHv5dGG hCG5CMS6hCRioU5kI/0w/PJ6TYi+7vBudshWExwtECYmjK8CrpBbbcjxJ/T3lmNVqlSKsuYc9Snzu 9PhSykV7gp2f8O+QBK/KDHqUFabLN7ZHQUmltiaBM3d97d7/RF64u7v//K4kzkgvzkXgOQer8c3PJ xb4v9f3XV1HSzCh86oxmJfej1n4tH9J/hG/EMuczKGJ4XNtjYAbiYLH6N8/F6oaYrNN48tnxZL01Y KTpvqg3BmUOzLhqPh9EszDDf6Ta9WHfos9NoDZ7ccBAnpI2u922nWtF/gk6x7hSVnrgop2ZyhUTBQ pX6MpdjK0SB9nA==; Date: Sat, 24 May 2025 12:58:10 +0300 Message-Id: <86frgu1gb1.fsf@gnu.org> From: Eli Zaretskii To: John Wiegley In-Reply-To: (message from John Wiegley on Wed, 21 May 2025 23:20:32 -0700) Subject: Re: bug#77609: How to add multiple functions to one hook with :hook in use-package? References: <864iysla44.fsf@gnu.org> <868qnoya1r.fsf@gnu.org> <86ldr4bz0f.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77609-done Cc: 77609-done@debbugs.gnu.org, rrt@sc3d.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 (---) > From: John Wiegley > Cc: 77609@debbugs.gnu.org, rrt@sc3d.org > Date: Wed, 21 May 2025 23:20:32 -0700 > > >>>>> Eli Zaretskii writes: > > > Ping! How can we make any further progress here? > > So, I dug into ‘use-package-normalize/:hook’ to see how hard it would be and… > it’s unreasonably hard. Accepting a list of functions in this way is just not > something the code was designed to do in its current form. > > So rather than risk breaking lots of things, I think the user just has to > expand: > > :hook (foo a b) > :hook (foo . (a b)) > > into > > :hook > (foo . a) > (foo . b) Thanks, I've now updated the manual with this information, and I'm therefore closing this bug.