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 13:14:59 -0400 Message-ID: References: <86r09uwuf3.fsf@gnu.org> <86ikv6wgfo.fsf@gnu.org> <877cbk50b7.fsf@web.de> <86tteovoc8.fsf@gnu.org> <868qvvk1yl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000094fbd10622035d82" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6235"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael_heerdegen@web.de, 73098@debbugs.gnu.org, stefankangas@gmail.com, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 13 19:17:27 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 1sp9vC-0001Sq-SR for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Sep 2024 19:17:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sp9us-00082f-Ci; Fri, 13 Sep 2024 13:17: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 1sp9uo-00082F-6c for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2024 13:17:02 -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 1sp9ue-0004jJ-MU for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2024 13:17:01 -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=8GVA+vSYPi6k5lBgLctzzTWx+WyUU3WZgha4hLxIEUc=; b=lbnXHcm+cU0fOYl0BzBMvgBcNBH/nQwee/L9JAygO3S8mDEAUmPJXZL7o3R2YWn390XcBdWajTPowTBbfuq9HI4gKfAkuEOHzpRTxNZuWYG/7utzMgxWHz6J6SRHmmsypgMC8/6Q78CuTR9fhKWimViTsB8/xn2N/IYIgilAwy8JJTOs3KZB1hjfX+j/dcAeRLSBLPuLE9NMe2eT5VIXcICICQXed1e+V+IOl85JK2DCIQpw01zYRMja3MLCilN4IBGph/j73AYdz3YOR3nZV9hVliMI/6rjGnX2nfQtAt20oyWAltRkkgtysVLi+5QohYiIt92SNc/LGZqRNSkghg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sp9un-0004MR-Vm for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2024 13:17: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 17:17:01 +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.172624778816698 (code B ref 73098); Fri, 13 Sep 2024 17:17:01 +0000 Original-Received: (at 73098) by debbugs.gnu.org; 13 Sep 2024 17:16:28 +0000 Original-Received: from localhost ([127.0.0.1]:44187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sp9uG-0004L6-7m for submit@debbugs.gnu.org; Fri, 13 Sep 2024 13:16:28 -0400 Original-Received: from mail-yb1-f169.google.com ([209.85.219.169]:61508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sp9uD-0004Kg-T3 for 73098@debbugs.gnu.org; Fri, 13 Sep 2024 13:16:26 -0400 Original-Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-e1a7e54b898so2169595276.2 for <73098@debbugs.gnu.org>; Fri, 13 Sep 2024 10:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726247711; x=1726852511; 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=8GVA+vSYPi6k5lBgLctzzTWx+WyUU3WZgha4hLxIEUc=; b=c8OwTeAaQBU35JLaMic8vYVJzs6itQsJhSqf1gOm7YMJyfjmDaia71Q92hmNJ+vtPv qzmQ5gq0xxI3j9Uvc55Hlpyx/S5KB0k89SbRzZ63HjHOiNwMipKyG3qD8lIRRVUdsCCP RW/rVX4TOIc/iAKQgaKDEmTHkOD6keVDtStFn88BqHzqNwRSmmyeO2X5p6VLWjyhgOLa I4HGPF/fZ4WWSO8v6QqIBIDjlJzP/Nt+zoCuxXNWSznFBdl3IOauXbvO0hSPZYyVDST6 Nf3QE2ZkN/LgyKHBf4beiDjQQ/Gj/YAImUv5hAWShkGdl4mjpwuraSX37pCK/rle/7Rn tBoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726247711; x=1726852511; 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=8GVA+vSYPi6k5lBgLctzzTWx+WyUU3WZgha4hLxIEUc=; b=H1hoNmW4fLQy8TVUm8+lCirrEc37mI/jpIkY06g2i3X+wHKVbPjn6pWnk5WXvD0+ul +gdgH1uJYz48pOnaU/fxbgRKuTNC/YVo+H59zheFQyNA24KHjK/G2itp8iimDb3tSePn 682KhS8XN+7kZoKc4GXB57bbAvawQWh1LXWoih89IbiEP/94ur2zPuph0CdU4YMjZQU0 LVTL0GCfUPE/o7YTeoOCMT70l7ztpMSyI9xqqMjMGpQWAsByWezFQ1x9qcYDtEXANsnY ljuuhWIBgDOfQQ1+k1EyXueTa6UQJL7EZM6RlDbx+/HbMGiQV0A2tIzVNyExV/F93iuX R15g== X-Forwarded-Encrypted: i=1; AJvYcCVEk1xdOEuZrI5xh8Kl75o3rIE0itfvGFS68tYQsr5lfYp95x7RLkdZquMH0qSfzaId9SO1dg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzNXA6/kvHjJ0nGLJcNZkgLL9joGwUR7IrRrvh84mOcx0XCRmil ti/TvxVmuLnzeWY1J/YGEOy5PhmqB7LJf82YU6ZkG/5pfXzsVqyMY9TqpRjNeg994JNJ35CcWph /lUDsbI5KcK3aGGiPxZQXZ4GXDf8= X-Google-Smtp-Source: AGHT+IGRbjCDn8SLb761yYCjED8InNQk4jHWZHypfjRCn0gyRMK6Nzf0Kciyvj072RJ6o5kv/Ol5DgLK7AvF/YRkN0A= X-Received: by 2002:a05:6902:1026:b0:e11:6a73:9008 with SMTP id 3f1490d57ef6-e1d9db92946mr5873437276.3.1726247710550; Fri, 13 Sep 2024 10:15:10 -0700 (PDT) In-Reply-To: <868qvvk1yl.fsf@gnu.org> 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:291667 Archived-At: --00000000000094fbd10622035d82 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Revised language: "Set VARIABLE/VALUE pairs with type warnings, and return the final VALUE. This is like setq, but is meant for user options instead of plain variables. This means that setopt will execute any custom-set form associated with VARIABLE, and will emit a warning if VALUE is not of the type expected by the user option. Example: If the user option is declared to accept a `float', set the option to 2.0 rather than 2, which is considered an `integer'. Despite the warning, the user option will still be set to VALUE." On Fri, Sep 13, 2024 at 11:28=E2=80=AFAM Eli Zaretskii wrote= : > > From: Ship Mints > > Date: Fri, 13 Sep 2024 11:11:18 -0400 > > Cc: Stefan Monnier , Eli Zaretskii < > eliz@gnu.org>, > > Michael Heerdegen , > 73098@debbugs.gnu.org > > > > Perhaps, some expanded advice in the docstring for setopt? > > > > "Set VARIABLE/VALUE pairs with enforced types, and return the final > VALUE. > > "Enforce" is inaccurate, since a value that doesn't match :type just > emits a warning (which can be shut up by the users, if they want), it > doesn't signal an error. And the variable is assigned the value event > if the type doesn't match. > --00000000000094fbd10622035d82 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
<= font face=3D"monospace">Revised language:

"Set VARIABLE/VALUE pairs with type warnings, and return the fina= l VALUE.

This is like setq, but is meant for user options instead of=
plain variables.=C2=A0 This means that setopt will execute any
custo= m-set form associated with VARIABLE, and will emit a
warning if VALUE is not of=C2= =A0the type expected by the user option.

Example: If the user option is declared to acce= pt a `float',=C2=A0
set the option to 2.0 rather than 2, which is considered an = `integer'.

Despite the warning, the user option will still be set to VALUE."

=
On Fri, Sep 13, 2024 at 11:28=E2=80=AFAM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Ship Mints <shipmints@gmail.com> > Date: Fri, 13 Sep 2024 11:11:18 -0400
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, Eli Zaretskii <eliz@gnu.org>,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0Michael Heerdegen <michael_heerdegen@web.de>, <= a href=3D"mailto:73098@debbugs.gnu.org" target=3D"_blank">73098@debbugs.gnu= .org
>
> Perhaps, some expanded advice in the docstring for setopt?
>
> "Set VARIABLE/VALUE pairs with enforced types, and return the fin= al VALUE.

"Enforce" is inaccurate, since a value that doesn't match :ty= pe just
emits a warning (which can be shut up by the users, if they want), it
doesn't signal an error.=C2=A0 And the variable is assigned the value e= vent
if the type doesn't match.
--00000000000094fbd10622035d82--