From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ship Mints Newsgroups: gmane.emacs.bugs Subject: bug#73098: setopt float warning unexpected Date: Fri, 13 Sep 2024 15:38:28 -0400 Message-ID: References: <86r09uwuf3.fsf@gnu.org> <86ikv6wgfo.fsf@gnu.org> <877cbk50b7.fsf@web.de> <86tteovoc8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b3328c0622055e32" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23621"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , Eli Zaretskii , 73098@debbugs.gnu.org, Stefan Kangas To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 13 21:40:23 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1spC9W-0005vT-VF for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Sep 2024 21:40:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1spC9G-0005zZ-1q; Fri, 13 Sep 2024 15:40:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1spC94-0005mA-2y for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2024 15:39:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1spC93-0003jk-P0 for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2024 15:39:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=X5mslKpsr3HjksW38yT/ytoYXZpF3/LH58OSsWnJaqc=; b=Kjej9xOz4/aSSWbF0SjgohkoW+/7CBf5VUANaUtzoCAaj2PGWydENocLwRDhTWHyNFXRAMrmYL6fgWmTY6vRAkIl9DO7V/V8/geYpEB8jOsonzRkK1Bnw51TVI3YPsNieGsJ+Fs1vLxGrKLVvI8WK84WMtVl8vtwaGNMSdlkfYYXAJPmrJgqPfd99PyAw2u29DMhjLiOn3wqJQZxb/6FuqMY7kzqs/4V7VC1BQLvfmMIUjitG7ISkbOZpJ9FY1nFaAcBtoW2KqlAhVB9BfYvkdKHYJkvad2HUwPA4lzpnIqMxWYFBwQfyQrsL5YvgR3VejGmlVu2iOVduWv15DIRfQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1spC9C-00048s-7Y for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2024 15:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Sep 2024 19:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73098 X-GNU-PR-Package: emacs Original-Received: via spool by 73098-submit@debbugs.gnu.org id=B73098.172625639715903 (code B ref 73098); Fri, 13 Sep 2024 19:40:02 +0000 Original-Received: (at 73098) by debbugs.gnu.org; 13 Sep 2024 19:39:57 +0000 Original-Received: from localhost ([127.0.0.1]:44293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spC97-00048Q-7j for submit@debbugs.gnu.org; Fri, 13 Sep 2024 15:39:57 -0400 Original-Received: from mail-vk1-f180.google.com ([209.85.221.180]:57437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spC94-000489-IB for 73098@debbugs.gnu.org; Fri, 13 Sep 2024 15:39:55 -0400 Original-Received: by mail-vk1-f180.google.com with SMTP id 71dfb90a1353d-502b405aa6dso730808e0c.2 for <73098@debbugs.gnu.org>; Fri, 13 Sep 2024 12:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726256319; x=1726861119; 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=X5mslKpsr3HjksW38yT/ytoYXZpF3/LH58OSsWnJaqc=; b=F8XhTRSwj/DIL/vqkbhmEUXooDsrG7FyT6qEpB6YHbOJFtGaZ7Df/6Dbc66hiEf1/o 9AutBo/L3MPXYhCCshVvx2xIuwdIWvLeK0I5wIUDU0rTD4K+kapOuU/O6xDabiTnDKSf dqclpsvCsigD9wBuMswrREESPJ+FwQUaD5Rj5cvPC4T4AIh0vFe8U/j5FcgILmxfsnxm niyjl8fJk89QiBR9DlGkQWY2drUUfnGufg/OL7+8uDnvNWE+i4pziZPazF6P4/qzpBpQ pcmmRWbvPbo67+sqkMZcBilggcsNKBret7OguubL5dKZkTbqba6T7vTgAjcDuV2WgFK6 dyPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726256319; x=1726861119; 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=X5mslKpsr3HjksW38yT/ytoYXZpF3/LH58OSsWnJaqc=; b=PzW2OlEvpkTzkycAuVvO7gi1pAZ24sj8U7gTxWHn0LA0Kx+qS/r0VSxziTbq5EEKUb gAINLphqbjZeBIfG/dsc1U85bl4ti3cRhVza9yneMWzt7uRR25np/CzyVR1RC7v3yX/q 8jdV1+lskWX4ccqECgU28bruHt3rbAFPjSr0/aBFZCVL0OnJCGWt6rVCYfZpadtDt/kD Dhwqwf7uv2lqZKJdVXFh3bmF61n6fwHcugZ+hzA2BULOIHrvlWAOLEmzd/FOqxI1RXW1 nHi1XYK+OkExAvGDAczj19TEXSPxtH3FEzKw1JRzdSlDK69ntgzE9NGbRtUcliUymdbn 3EnA== X-Forwarded-Encrypted: i=1; AJvYcCX+549NoU/7XHjqdxYcZBUXnMOjnhkS1rq8nKmKLRw0ntF7OZxhW2FGnxrojJOul3GMPbUFyw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzC9eME/SrlgHlLHw8gDu5e+x57vZmu1eZdMNUFBjWiebTMUle2 L/vUj/OleCZdPbcN/VK2qM+tJqU/Ob5uL0zfS+CEHwxnzaRYcUHCeqCu4Xon60F89RP14fJQ7bK 04TGZjg6tOpEPDaJg5S5EkHO6JUU= X-Google-Smtp-Source: AGHT+IGw22+mM7ITNwTMxBxPrvYEVC/lbnm9pjG3pUpyLkmhPRg3iImtM/yLBp9AySEUZPYxSNaj1EMOga0S4snN2iw= X-Received: by 2002:a05:6122:2018:b0:4f5:1978:d226 with SMTP id 71dfb90a1353d-5032d395768mr7336079e0c.3.1726256319244; Fri, 13 Sep 2024 12:38:39 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291673 Archived-At: --000000000000b3328c0622055e32 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The warning messages can be misleading. e.g., when trying to set tab-bar-format-tabs-groups to include a simple lambda, it complains about the wrong thing. It does match the hook type, but does not match the hard-coded list of options. (setopt tab-bar-format `( tab-bar-format-tabs-groups (lambda () " ") ; tab-bar-separator )) =E2=96=A0 Warning (emacs): Value '(nil tab-bar-format-tabs-groups (lambda= nil " "))' does not match type hook On Fri, Sep 13, 2024 at 3:26=E2=80=AFPM Ship Mints wr= ote: > It was removed in a later proposed edit. I read the setopt code more > deeply and ran some tests. > > On Fri, Sep 13, 2024 at 3:09=E2=80=AFPM Stefan Monnier > wrote: > >> > If you encounter a discrepancy that cannot be addressed by amending >> > the type specified by a setopt call, and you can deem the desired >> > type compatible nonetheless, use setq. If the user option has an >> > associated \"setter\" you may invoke it manually using ???" >> >> You're here trying to describe workarounds to use in case of bugs >> (either the value you set is wrong, or the type (or type-checker) is >> wrong). We usually don't do that in docstrings. >> >> >> Stefan >> >> --000000000000b3328c0622055e32 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The warning messages can be misleading. e.g., when trying to set tab-bar= -format-tabs-groups to include a simple lambda, it complains about the wron= g thing. It does match the hook type, but does not match the hard-coded lis= t of options.

=C2=A0 =C2=A0(setopt tab-bar-format
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0`(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tab-bar-format-= tabs-groups
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda () &= quot; ") ; tab-bar-separator
=C2=A0 =C2=A0 ))

=C2=A0=E2=96=A0 =C2=A0Warning (emacs): Val= ue '(nil tab-bar-format-tabs-groups (lambda nil " "))' do= es not match type hook

On Fri, Sep 13, 2024 at 3:26=E2=80=AFPM Shi= p Mints <shipmints@gmail.com&= gt; wrote:
It= was removed in a later proposed edit. I read the setopt code more deeply a= nd ran some tests.

On Fri, Sep 13, 2024 at 3:09=E2=80=AFPM Stefan Monn= ier <monni= er@iro.umontreal.ca> wrote:
> If you encounter a discrepancy that cannot be addre= ssed by amending
> the type specified by a setopt call, and you can deem the desired
> type compatible nonetheless, use setq. If the user option has an
> associated \"setter\" you may invoke it manually using ???&q= uot;

You're here trying to describe workarounds to use in case of bugs
(either the value you set is wrong, or the type (or type-checker) is
wrong).=C2=A0 We usually don't do that in docstrings.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--000000000000b3328c0622055e32--