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: Sat, 7 Sep 2024 09:14:54 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ea63ca0621874f57" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3989"; mail-complaints-to="usenet@ciao.gmane.io" To: 73098@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 07 15:16:22 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 1smvIb-0000t9-JZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Sep 2024 15:16:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smvIJ-0006X5-QZ; Sat, 07 Sep 2024 09:16:03 -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 1smvIH-0006Wr-H3 for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 09:16: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 1smvIH-0002be-7l for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 09:16: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:MIME-Version:To:Subject; bh=UF4puR+5k1IwIs1L2LbF+24lXo9023I4Cg1zno5s/wQ=; b=iU0XAVj8KwzOGmnz2UHM8RlhStjqXxeG+41WbYjTwldOCjilWc0RHt1XDdiO2fHh+uf74F9PihOCBTqEZsRtOo9OYyQJOC6CZnMICqNv5zELeL3DCKEllt15tRQIn3vgqH3bEYHEYN68uAQU3bBWw9g0JY95D8Hmh3L8FVbvTZpS/iiuvxCPidGgh65FmKavhRDLkZRtlXkyoPGoIoUlhpD8MDgFaD5grpZaFCYPjEA3ReLhESM3pf4TfY/2P56nLSnz+ljuzguDYAXas+U45T4wPVA98dVCRP6CbvVkbulgXEUg+lmhjH5N4n4clVm4tSPcL7ZMbJOZFP9OAUN7SQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smvIH-0003Sc-VV for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 09:16: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: Sat, 07 Sep 2024 13:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73098 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172571491413237 (code B ref -1); Sat, 07 Sep 2024 13:16:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Sep 2024 13:15:14 +0000 Original-Received: from localhost ([127.0.0.1]:55161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smvHV-0003RQ-Nk for submit@debbugs.gnu.org; Sat, 07 Sep 2024 09:15:14 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smvHU-0003RJ-7Y for submit@debbugs.gnu.org; Sat, 07 Sep 2024 09:15:12 -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 1smvHT-0006Rc-2J for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 09:15:11 -0400 Original-Received: from mail-vk1-xa31.google.com ([2607:f8b0:4864:20::a31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smvHP-0002Yk-2z for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 09:15:10 -0400 Original-Received: by mail-vk1-xa31.google.com with SMTP id 71dfb90a1353d-501269674daso664113e0c.0 for ; Sat, 07 Sep 2024 06:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725714905; x=1726319705; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=UF4puR+5k1IwIs1L2LbF+24lXo9023I4Cg1zno5s/wQ=; b=Az5reS5f/94grcLV8ailrpa1zs7JOpmYku+zRbLKyywXAwMC1+6AnYthIAPtAQ+hG5 53UvrxeZOFLA1eE6BBTsON3Bj8iKGKDp3Z7eRpf/GBgxR9EgGOBCn9xqJSfxe35fia+R LUulIeDTJz/8u3QJgxW9CfSLg6ZSjKj7htm2DUfnz/RlEoEhi2DBJQN3uXlcIV5WER85 TxP4RMd2RrLXa6qhRf+RGVw4zYs3Z6+iXiRc+9FcoaBjCAq4xXQ8xGTajIvUgbiV3BMA iTVt3MZvvueW/G1yi68tVawjapixQMB63Dv8iY/a5fI/c+xgqeZTlO2cR0111kwjSRkO RDjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725714905; x=1726319705; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=UF4puR+5k1IwIs1L2LbF+24lXo9023I4Cg1zno5s/wQ=; b=wvAnpkrSW/o8mISuEelJUA0y0d1LuzodJSwmmP1mvFuhzSvm/tQQOuJzvc5w6AzsZr MiDu7+t45oF012sdDxTP+8fFOEIq1FHFZaeoj7lG6MrViCZD0Iw8gwIb2cgcMY4VWweR egGUxWiSzolCZz96g64IgFJvJcEfA6RpCulR/8Msckr0QfBSQxeuQIMpPLNZC0C7wKVI +W6Mo3j42+tNu149CBEZSxLiAl2Yx1mRkFGtjkjdgkX8k8x+dHSAYSfp8GCDV6s52C6Z sZ3G9d3BkYWHFicNj8vCoQueFkU2aa5jGQk6oxcT2D+oWoEsf/CW+yA1Q5qYbOZmq9dH NXcw== X-Gm-Message-State: AOJu0YxAWuXcLL5GVRqo4Xp7GIeDrmQeKG/DanhE7MJydqj2PYWUb/X+ owsaBMheuxETISeH4HnxyLxlqCJcFBAPKEpdUK1CFCWYHCBmUx409vJnPgrgA8F8A58QzRsZWvY 26Yk6lWqrryMYuiMA+2F3sBRR367Ru7Xg X-Google-Smtp-Source: AGHT+IEjVbZ/GI+sc6J92QM4xrdK4T7ERl81+/xXuW9JtHtIDJDjqS396qPqBFvkR+SoZCllY78oH6cWhmc/N9LCkxY= X-Received: by 2002:a05:6102:f14:b0:49a:59cc:b948 with SMTP id ada2fe7eead31-49bde177bd7mr5678475137.7.1725714905323; Sat, 07 Sep 2024 06:15:05 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::a31; envelope-from=shipmints@gmail.com; helo=mail-vk1-xa31.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, FREEMAIL_FROM=0.001, 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-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:291384 Archived-At: --000000000000ea63ca0621874f57 Content-Type: text/plain; charset="UTF-8" This one bit me yesterday on Emacs 29.3 as I was revising my init file (for the thousandth time this week). As setopt becomes more widely recommended, people will likely encounter situations like the below where they expect constant numeric types to be coerced. (defcustom temp-float "Float" "Float type." :type 'float) (setopt temp-float 2.0) ; works (setopt temp-float 2) ; Warning (emacs): Value '2' does not match type float -Stephane P.S. I reported a bug to Prot as some much more complex modus defcustom type definitions seem either themselves broken or setopt needs some work to accommodate them. --000000000000ea63ca0621874f57 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This one bit me yesterday on Emacs 29.3 as I was revising my init file (= for the thousandth time this week).

As setopt becomes more widely recommended, people wi= ll likely encounter situations like the below where they expect constant nu= meric types to be coerced.

(defcustom temp-float "Float"
=C2=A0 "Floa= t type."
=C2=A0 :type 'float)

(setopt temp-float 2.0) ; = works
(setopt temp-float 2) ; Warning (emacs): Value '2' does no= t match type float

-Stephane

P.S. I reported a bug to Prot as some much more complex modus defcus= tom type definitions seem either themselves broken or setopt needs some wor= k to accommodate them.
--000000000000ea63ca0621874f57--