From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#56400: Make setopt warn on type mismatch Date: Tue, 05 Jul 2022 21:51:01 +0300 Organization: LINKOV.NET Message-ID: <86h73vz94a.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31314"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 56400@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 06 10:22:43 2022 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 1o90J0-00081W-Gm for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 10:22:42 +0200 Original-Received: from localhost ([::1]:48572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o90Iz-0004Hc-Ej for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 04:22:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o90GS-0002cq-SX for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 04:20:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o90GS-0007HS-HF for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 04:20:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o90GR-0003Qc-Dj for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 04:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jul 2022 08:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56400 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 56400-submit@debbugs.gnu.org id=B56400.165709555213073 (code B ref 56400); Wed, 06 Jul 2022 08:20:03 +0000 Original-Received: (at 56400) by debbugs.gnu.org; 6 Jul 2022 08:19:12 +0000 Original-Received: from localhost ([127.0.0.1]:52193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o90Fc-0003Om-Fo for submit@debbugs.gnu.org; Wed, 06 Jul 2022 04:19:12 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:53639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o90Fa-0003OU-13 for 56400@debbugs.gnu.org; Wed, 06 Jul 2022 04:19:10 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id D09D5E0004; Wed, 6 Jul 2022 08:19:02 +0000 (UTC) In-Reply-To: (Stefan Kangas's message of "Tue, 5 Jul 2022 08:32:29 -0700") 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" Xref: news.gmane.io gmane.emacs.bugs:236204 Archived-At: > Why not make `setopt' warn in case there is a type mismatch? > For example, in: > > (setopt tetris-buffer-width "hello") > > But the type of `tetris-buffer-width' is natnum. > > I think this would save users from shooting themselves in the foot. > If they are sure they want to do that, they can use `setq' or > `customize-set-variable' directly. This is exactly what `set-variable' does.