From unknown Sun Jul 27 05:15:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#56400 <56400@debbugs.gnu.org> To: bug#56400 <56400@debbugs.gnu.org> Subject: Status: Make setopt warn on type mismatch Reply-To: bug#56400 <56400@debbugs.gnu.org> Date: Sun, 27 Jul 2025 12:15:24 +0000 retitle 56400 Make setopt warn on type mismatch reassign 56400 emacs submitter 56400 Stefan Kangas severity 56400 wishlist tag 56400 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 11:32:37 2022 Received: (at submit) by debbugs.gnu.org; 5 Jul 2022 15:32:37 +0000 Received: from localhost ([127.0.0.1]:51308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8kXV-0008To-Dx for submit@debbugs.gnu.org; Tue, 05 Jul 2022 11:32:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:60614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8kXT-0008Tf-7t for submit@debbugs.gnu.org; Tue, 05 Jul 2022 11:32:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8kXT-0004Gd-2P for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 11:32:35 -0400 Received: from mail-pj1-f52.google.com ([209.85.216.52]:37566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8kXP-0006Zs-Ki for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 11:32:33 -0400 Received: by mail-pj1-f52.google.com with SMTP id y14-20020a17090a644e00b001ef775f7118so8861555pjm.2 for ; Tue, 05 Jul 2022 08:32:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=4yErRpQcPr1idSBojOn4/kKD8lvIeBdOUZujEME2XyQ=; b=IqoGNRprV/VVhlVIqKVwJmUNwHq5dDf/8NdhPmsqzvWDxgUZ/jfF9ZZng9EaPtYV7w gAYCu0yCcPilYU1AkQz1Oan0p9E4l2J2uUifITIWcBaTWA5RxeSQfxRYrlpO2OuVDvec 4nzNAHCqURZ5DHl19tpFWdJ+4XgvBefnJUBOX6/TF1q29+sD54Hms8d9ugfOEbeqilfx hf2I11ma1HUojVK+NbOgrPgvt5xIQn+vl7JI/e8/E8p5BAQ0wOqPsyUkFMCy8zG5PvGC +89gblehL4y+UzQSvrCQ4OQb3ds43lJkWhjRGeAtwRMVGbkcIp3MXlfZ9O0XnHMMlF6P JAGA== X-Gm-Message-State: AJIora/18a5/YL104Yp6aeqSLoDavZDP2ToExS21koMyGRdyABtGN1yQ 1gSJ4tDQms7BpaN41xvEvwVVeQQV2vmlHRQOFcSbLRjh X-Google-Smtp-Source: AGRyM1tIyCvKyOtxpIiXLaccu25kinxRbrWacmI4yj8L0eLtviE3oEIOPoKU95Zcl8RcuCjr4fgdqhO613O4HSc6/tw= X-Received: by 2002:a17:90b:4d8e:b0:1ed:56ab:b2ce with SMTP id oj14-20020a17090b4d8e00b001ed56abb2cemr44102919pjb.175.1657035150281; Tue, 05 Jul 2022 08:32:30 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 5 Jul 2022 08:32:29 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Tue, 5 Jul 2022 08:32:29 -0700 Message-ID: Subject: Make setopt warn on type mismatch To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.216.52; envelope-from=stefankangas@gmail.com; helo=mail-pj1-f52.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.8 (/) 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: -1.8 (-) Severity: wishlist 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 12:57:33 2022 Received: (at 56400) by debbugs.gnu.org; 5 Jul 2022 16:57:33 +0000 Received: from localhost ([127.0.0.1]:51510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8lre-0004U9-4t for submit@debbugs.gnu.org; Tue, 05 Jul 2022 12:57:33 -0400 Received: from quimby.gnus.org ([95.216.78.240]:45964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8lrc-0004Tw-Dl for 56400@debbugs.gnu.org; Tue, 05 Jul 2022 12:57:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=AnNYUPYxTw0mT41uEWRPhgK7RNm2Y8u4M3OSl2PGwIw=; b=BnsJlxvDPYow0jXncGiVwzsDDP ONoZKicpDNl8VLFatdKZPgFsFF/pezUZEPGl+s9R0iosfSfFFaQzzrJ5N4eVtaOKGvSSL7TSSrCoX 3SUejeqbzA1KjlIgVNwDbq89d4G9u3P7w3uklo/0YHwjjosLXs0i3Y0/pwL/dka+lfAQ=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8lrT-0003yX-MI; Tue, 05 Jul 2022 18:57:22 +0200 From: Lars Ingebrigtsen To: Stefan Kangas Subject: Re: bug#56400: Make setopt warn on type mismatch In-Reply-To: (Stefan Kangas's message of "Tue, 5 Jul 2022 08:32:29 -0700") References: X-Now-Playing: Frankie Goes To Hollywood's _Liverpool_: "Rage Hard" Date: Tue, 05 Jul 2022 18:57:17 +0200 Message-ID: <87wncrzedu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Kangas writes: > 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. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56400 Cc: 56400@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 (---) Stefan Kangas writes: > 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. It should throw an error already: ;;;###autoload (defun setopt--set (variable value) (custom-load-symbol variable) ;; Check that the type is correct. (when-let ((type (get variable 'custom-type))) (unless (widget-apply (widget-convert type) :match value) (user-error "Value `%S' does not match type %s" value type))) Did you mean a byte compilation warning? I don't really think that people will be using setopt much in code, just in .emacs, so I'm not sure that'd give us much. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 12:57:34 2022 Received: (at control) by debbugs.gnu.org; 5 Jul 2022 16:57:34 +0000 Received: from localhost ([127.0.0.1]:51513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8lrh-0004UL-MH for submit@debbugs.gnu.org; Tue, 05 Jul 2022 12:57:33 -0400 Received: from quimby.gnus.org ([95.216.78.240]:45978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8lrg-0004U0-0L for control@debbugs.gnu.org; Tue, 05 Jul 2022 12:57:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6ac3TJuzkKDT1BdV4AMYlnAlWI6iXBiLhVq800k4uM4=; b=qjqOFnJj0PXwMLktxUQTRnzlrs YZ/XtfCvvZe5kNDYgHF8Jt9t6AXpDvSxnXiAHEV3BhwMf3bxC+Z73HGeueBun9IT3BMnLxDU5Hngj Hnc06mwg6Odg7nRoQp+DqEmHIOFe1cCPuuuEeMNz6KFwtfsjCCtUjvl7qy0jYL8G54c0=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8lrX-0003yg-UV for control@debbugs.gnu.org; Tue, 05 Jul 2022 18:57:26 +0200 Date: Tue, 05 Jul 2022 18:57:23 +0200 Message-Id: <87v8sbzedo.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #56400 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 56400 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) tags 56400 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 13:08:44 2022 Received: (at 56400) by debbugs.gnu.org; 5 Jul 2022 17:08:44 +0000 Received: from localhost ([127.0.0.1]:51528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8m2W-0006xP-AU for submit@debbugs.gnu.org; Tue, 05 Jul 2022 13:08:44 -0400 Received: from mail-pj1-f41.google.com ([209.85.216.41]:51156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8m2T-0006xB-BR for 56400@debbugs.gnu.org; Tue, 05 Jul 2022 13:08:43 -0400 Received: by mail-pj1-f41.google.com with SMTP id a15so6059479pjs.0 for <56400@debbugs.gnu.org>; Tue, 05 Jul 2022 10:08:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cnAZilSIZXmjwR2nxSxPDx0ToeksJiMEeuyb0ZUDW4s=; b=LoyyDKJjljfL/Jmo0Vf9ITMD6jDRIwJlhz2uzN2WOnsjoaJhUY7dohsb38afRdXn6P X/eyMSAORPAEvy9RcnQbKPuqxIR/iulMCbwdRK3P1eu57eCu2ji6nqXdaLJSsx4uoa8D PXMNtL8T/ECZJA78pvm03asZy8X8370VRqQJmho9ojcgKHaBBRPJ0GwJDqBQIwsj1q81 eGLMEzwY5nQorUSbuoelgTXvibBmOlSJPkhV35VpzYr0tpjWW5pd7krijKJdpU9h7nFv fb5lC0toiUGPmjusqvSHRm8t9YVhX67hsv20wE8dPfksnfMgyH/9AVLPORWaD1qbYI6r 56wQ== X-Gm-Message-State: AJIora9cP3HBob2XZizsxNpEH7eztvp87dpvHbdsdqk4xvch2CtGm7Tq BwEgMllNmo4czWYl+N4FreVRMSnZ+hVhKaB0inY= X-Google-Smtp-Source: AGRyM1tAbkTxHty8R6bNoYF/vXdxDvkRN2Kf00i03NKNVjaYW0wG5Q5mcf8VZw48ocVjIV0ZzvTqJlsnhIZJcovbxko= X-Received: by 2002:a17:90b:896:b0:1ef:935c:f326 with SMTP id bj22-20020a17090b089600b001ef935cf326mr7800222pjb.193.1657040915554; Tue, 05 Jul 2022 10:08:35 -0700 (PDT) MIME-Version: 1.0 References: <87wncrzedu.fsf@gnus.org> In-Reply-To: <87wncrzedu.fsf@gnus.org> From: Stefan Kangas Date: Tue, 5 Jul 2022 19:08:24 +0200 Message-ID: Subject: Re: bug#56400: Make setopt warn on type mismatch To: Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 56400 Cc: 56400@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: -0.5 (/) Lars Ingebrigtsen writes: > Stefan Kangas writes: > > > 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. > > It should throw an error already: Aha, I guess it doesn't throw an error if `tetris' isn't loaded already, as it has no way of knowing the type yet. IOW, in emacs -Q, I need to say this to get an error: (progn (require 'tetris) (setopt tetris-buffer-width "hello")) That's pretty good, but I wonder if we could do better. I expect that users will often set settings from libraries that aren't yet loaded. For example, how about warning upon loading the library if the variable is set to an incompatible value? Or something. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 13:33:10 2022 Received: (at 56400) by debbugs.gnu.org; 5 Jul 2022 17:33:10 +0000 Received: from localhost ([127.0.0.1]:51591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8mQA-0007cA-12 for submit@debbugs.gnu.org; Tue, 05 Jul 2022 13:33:10 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8mQ5-0007bX-O5 for 56400@debbugs.gnu.org; Tue, 05 Jul 2022 13:33:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+fDbP4SRkRlZJ4lQc/Lqu5AJRnop3i88AopubzVylCY=; b=VSqZo3WPoLAWwSyH+5ziWuFPk1 QvGqcljD+ywj4D23nhr6uNtQBNQVC0Lac7+dkqWXzxVQxQCoW6N/vDyg0tPGr2jhJAyrakRSWqUM1 CPJtJ6vejq8C8K0jILOS5v99YJy2fjBd6puQDb6tZfbY8a8HQNbrOvJStV44ZS9NnLhM=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8mPv-0004FS-Vv; Tue, 05 Jul 2022 19:32:58 +0200 From: Lars Ingebrigtsen To: Stefan Kangas Subject: Re: bug#56400: Make setopt warn on type mismatch In-Reply-To: (Stefan Kangas's message of "Tue, 5 Jul 2022 19:08:24 +0200") References: <87wncrzedu.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEU1MzOVgnXGwb7/ //9KtDuHAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YHBREIMpTdbNIAAAF0SURBVCjPVdKxbtswEAbg X4LJgVuKOCg8dwjyFJSBeOgkAz4NmrooQPgUjoF0Vo26g6cMpCHeU+aOcgxUkz795I8TJWBJLb4u ov/QxRt+oZ5QBU6BGVGSb2+CXhDGVdz6wLmgsdNS0SnccTKmvybuGGF7DiXZrGOLfl72sndxB8dp tyS85DBBkAmEbnQFXNCsY8GpHdBpG1aC+y88cWp2UtBsCnIje8jbCYvA53cMoBjmPe+VtPlr9R8S VOvcKhqFO0xbX5IdyP2ezLzsGReP16ag8lKAx1LwJuAVa9uF5QLL9CUp0AlgrwnsdEvyiWfoiV72 P+Mt6RaHGf8E/fdj9Hogeoj94pC3rdwNNID3LrcVMaf2LzKF3NZnAX6AK5ZE9iTcg0c7v9wonzG9 1nKyCmOQZLY7GOKLfwBvQqxgEye/RHq2MoHtwwiDD1/HypsT76Vg0J/Cuy5p2wdqHTQkr9XUyTPX Z0UXdIGls+6hkOSvMgWfJVnGkipgUgAAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDctMDVUMTc6 MDg6NTArMDA6MDCp4FCRAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA3LTA1VDE3OjA4OjUwKzAw OjAw2L3oLQAAAABJRU5ErkJggg== X-Now-Playing: Frankie Goes To Hollywood's _Liverpool_: "Watching The Wildlife" Date: Tue, 05 Jul 2022 19:32:53 +0200 Message-ID: <875ykbo46y.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Kangas writes: > Aha, I guess it doesn't throw an error if `tetris' isn't loaded > already, as it has no way of knowing the type yet. IOW, in emacs -Q, > I need to say this to get an error: > > (progn > (require 'te [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56400 Cc: 56400@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 (---) Stefan Kangas writes: > Aha, I guess it doesn't throw an error if `tetris' isn't loaded > already, as it has no way of knowing the type yet. IOW, in emacs -Q, > I need to say this to get an error: > > (progn > (require 'tetris) > (setopt tetris-buffer-width "hello")) Yup. > That's pretty good, but I wonder if we could do better. I expect that > users will often set settings from libraries that aren't yet loaded. > For example, how about warning upon loading the library if the > variable is set to an incompatible value? Or something. Hm... yes, that should certainly be possible. I guess the check would go in... `custom-declare-variable'? Yeah, almost. Now fixed in Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 13:33:23 2022 Received: (at control) by debbugs.gnu.org; 5 Jul 2022 17:33:23 +0000 Received: from localhost ([127.0.0.1]:51594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8mQN-0007ch-8b for submit@debbugs.gnu.org; Tue, 05 Jul 2022 13:33:23 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8mQL-0007cQ-Gs for control@debbugs.gnu.org; Tue, 05 Jul 2022 13:33:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8hbex0sXT3qEd9EcS9pEC5o1Vk1v+VD4j88i6FZMOAM=; b=E1B0Eg0FXqOzSfKz/MhPnpPUIQ KciW1NF4ZETwVeQtn1Twem1i6tDCtjxXN4AG/ZlEGSCaz0b2rxiWodH2xIS6NiPSkic0DxS1M/XrO 8uVpzE4W+600cSr3Gurvk6jopEmLwQMrrwfVbB1h2GZmdhDIfT2/7kHYGJKpKXy3tXBw=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8mQD-0004Fe-Ff for control@debbugs.gnu.org; Tue, 05 Jul 2022 19:33:15 +0200 Date: Tue, 05 Jul 2022 19:33:13 +0200 Message-Id: <871quzo46e.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #56400 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 56400 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) close 56400 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 13:43:17 2022 Received: (at 56400) by debbugs.gnu.org; 5 Jul 2022 17:43:17 +0000 Received: from localhost ([127.0.0.1]:51609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8mZx-0007rf-1R for submit@debbugs.gnu.org; Tue, 05 Jul 2022 13:43:17 -0400 Received: from mail-pl1-f179.google.com ([209.85.214.179]:39841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8mZv-0007rS-Io for 56400@debbugs.gnu.org; Tue, 05 Jul 2022 13:43:16 -0400 Received: by mail-pl1-f179.google.com with SMTP id c13so7829147pla.6 for <56400@debbugs.gnu.org>; Tue, 05 Jul 2022 10:43:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PTbXsJ/6PBFV8zHA/QeGE3+MqAi+z4qC1SwVm3LpAmo=; b=UmAmRNVRMbEjwkk2aV+jdjcI7zKqqS3BwabsVcq+gQtuCun9IeSneZB6qTyF8MKSCN kuq2McmfzkXqkzDhSZzrIwT2BxJJA3r99Gmbe8MC2TVdx5yZKDKVfbfP2ZbMexRmm5SS Zyza0mHk5uelfPSBrD23VZNHatZLhAWl8ZeDuqwMrFNEKNqki8moc1vfgM0EnFc3fxu5 jBaxc45FJAnt2383VKUrP5mgUdIGaeqge+txqGXnzx2cqqW666oZlD4gIYnonql/+v/n 0cLcbpzdFDj4I6QHCidTdIIGxqfsDi88soZ/9XKHHPIo6WvTzJMZdKE8JphWvQOAQj57 /ppg== X-Gm-Message-State: AJIora8ci14GZM24LTosPBeYP8mJzybIFEfVG9hFUHmgFPBjXyc1EH6o t8fmYTMIeLc7Vqpg+mLWV6IrvFfuvhzaT9A2Mfw= X-Google-Smtp-Source: AGRyM1sJq2pHMYCji79CVpANkujHHACjbgegBVZNww3IIND4dIKN1ciu/gP/5DG6LpPuBNazrelsRhY0R76q7gfqhRw= X-Received: by 2002:a17:902:7c0d:b0:16b:7dd2:626c with SMTP id x13-20020a1709027c0d00b0016b7dd2626cmr42116357pll.152.1657042989799; Tue, 05 Jul 2022 10:43:09 -0700 (PDT) MIME-Version: 1.0 References: <87wncrzedu.fsf@gnus.org> <875ykbo46y.fsf@gnus.org> In-Reply-To: <875ykbo46y.fsf@gnus.org> From: Stefan Kangas Date: Tue, 5 Jul 2022 19:42:58 +0200 Message-ID: Subject: Re: bug#56400: Make setopt warn on type mismatch To: Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 56400 Cc: 56400@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: -0.5 (/) Lars Ingebrigtsen writes: > Now fixed in Emacs 29. Thanks! Should this change be in NEWS? I guess it affects both `setq' and `setopt'. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 05 14:07:55 2022 Received: (at 56400) by debbugs.gnu.org; 5 Jul 2022 18:07:56 +0000 Received: from localhost ([127.0.0.1]:51617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8mxn-0002EJ-OQ for submit@debbugs.gnu.org; Tue, 05 Jul 2022 14:07:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8mxk-0002E3-Qj for 56400@debbugs.gnu.org; Tue, 05 Jul 2022 14:07:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=b93XykU6SKCRrD2+RbtDkFzepgYYb746dKoZizvFP2M=; b=M6bF3/GRPKCbFOMYoiv/tzg2zF 15zsOKFgeh84jrA6CCMevYlRXsKrCPqkmPtraxXHFbvDg+7+dVA3q26PBLYWxDr3hLVouKCCjOoIO F94cUUdRjwkF3s0pXOMj5nq2Gn2STgcAwULOsqqJgnVx6+axS0Br2O5FHAq47+gaZTbM=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8mxb-0004Tz-Vd; Tue, 05 Jul 2022 20:07:46 +0200 From: Lars Ingebrigtsen To: Stefan Kangas Subject: Re: bug#56400: Make setopt warn on type mismatch In-Reply-To: (Stefan Kangas's message of "Tue, 5 Jul 2022 19:42:58 +0200") References: <87wncrzedu.fsf@gnus.org> <875ykbo46y.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJFBMVEUwLi42NDRAPTxF Q0FCPz4mJCUaGRogHyAfHx8fHR4NDQ3////EU9znAAAAAWJLR0QLH9fEwAAAAAd0SU1FB+YHBREg O7BcetwAAADgSURBVDjL7ZCxDYMwEEUvBT2OlAHCCqyQFQ5EG4mTjt6gLJANYuQFKJgyZ0CEwLlN lW/Llv7z95cNcM7z/JZlRpRCgqIEC6oBt7IkeoaFoPZMtux9yY5W1QUB9eTY1+3qLSuEje3m9KIJ 0Kt1GmDfWay+EU4J/7C29Fu/mMEkp3UomgFPcwfmh7E7gF4sr13VKc2fjjYC1ASTKtBO7x+IWKkA jcE9cDJYA4Exgkn0q05qInSkKpAOiCQAIh3RRAzA1Vz0RIF6Iv6Jf/ArMApoxnGQORsN0TCEDcQ+ aGjG+xsRIchaW3yNAgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wNy0wNVQxNzozMjo1OSswMDow MLK444oAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDctMDVUMTc6MzI6NTkrMDA6MDDD5Vs2AAAA AElFTkSuQmCC X-Now-Playing: Joy Division's _Unknown Pleasures_: "I Remember Nothing" Date: Tue, 05 Jul 2022 20:07:41 +0200 Message-ID: <87wncrmo0i.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Kangas writes: > Thanks! Should this change be in NEWS? I guess it affects both > `setq' and `setopt'. No, just setopt -- it only gives the warning if the variable has been set with setopt. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56400 Cc: 56400@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 (---) Stefan Kangas writes: > Thanks! Should this change be in NEWS? I guess it affects both > `setq' and `setopt'. No, just setopt -- it only gives the warning if the variable has been set with setopt. I didn't think it was NEWS-worthy, seeing as `setopt' is new in Emacs 29, and this is just part of how it works (now). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 04:19:12 2022 Received: (at 56400) by debbugs.gnu.org; 6 Jul 2022 08:19:12 +0000 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 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 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id D09D5E0004; Wed, 6 Jul 2022 08:19:02 +0000 (UTC) From: Juri Linkov To: Stefan Kangas Subject: Re: bug#56400: Make setopt warn on type mismatch In-Reply-To: (Stefan Kangas's message of "Tue, 5 Jul 2022 08:32:29 -0700") Organization: LINKOV.NET References: Date: Tue, 05 Jul 2022 21:51:01 +0300 Message-ID: <86h73vz94a.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 56400 Cc: 56400@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: -0.9 (/) > 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 06:43:42 2022 Received: (at control) by debbugs.gnu.org; 6 Jul 2022 10:43:42 +0000 Received: from localhost ([127.0.0.1]:52603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o92VS-0003RF-6U for submit@debbugs.gnu.org; Wed, 06 Jul 2022 06:43:42 -0400 Received: from mail-pj1-f51.google.com ([209.85.216.51]:45040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o92VP-0003Qz-RN for control@debbugs.gnu.org; Wed, 06 Jul 2022 06:43:40 -0400 Received: by mail-pj1-f51.google.com with SMTP id o3-20020a17090a744300b001ef8f7f3dddso6904282pjk.3 for ; Wed, 06 Jul 2022 03:43:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=M4RFQwFR04FPJxInQy+55UZEnhSf1NJJXTMQIMGtRMs=; b=ywSs2i2/5Y66mK50aET+sJpaguyAcCfDRfllIWQdjrfCVD6V2PbKTkETKsXmkKq9/9 s/ljn7G5oRooZu7HHfhe+JphKlsUMBY6d85v28TCW7eST7zmRvUxn7RpmSJwA2ISlfhK M0/nJGQL+JwBV3V2vQLPTKXy936ixrk12PIO9HXtxKnIbKilPKOojoMIVxv08UDtdXj9 n5V9ehS+L0ffw1ofazq6Svuxd9yEiHfttu7caBkpp7iWdQxv6rfwuSREBRjGbG4Snc05 luCRxQ3Y6gdBg4PzCZe5cQo9AyCjkwaInTfJhHV43BVXh9S88bhHPKV2mQZOls7YxUxb uYKg== X-Gm-Message-State: AJIora+szLzF1KDivIME8a+XABjwUshYbUXl7JMwzdNh0RPzWyJvPEBK jLtIFKX54r+7wu78nXbTXypGfRAlHY1HwBODKqVrGiAv X-Google-Smtp-Source: AGRyM1t5GovTfjYdV/Zvtz8ewkI13tgiWkAxlWbKp2USbN2Nki69Oaj/prVNxyErGdZcoTKx3q+vXqZEtYkOotIUVeg= X-Received: by 2002:a17:903:2444:b0:16b:917e:3b04 with SMTP id l4-20020a170903244400b0016b917e3b04mr44562620pls.145.1657104214165; Wed, 06 Jul 2022 03:43:34 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Wed, 6 Jul 2022 12:43:23 +0200 Message-ID: Subject: To: control Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 56400 29.1 thanks Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.216.51 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.216.51 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.0 PDS_TONAME_EQ_TOLOCAL_VSHORT Very short body and From looks like 2 different emails 2.0 BLANK_SUBJECT Subject is present but empty 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: control 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: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 56400 29.1 thanks Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.216.51 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.216.51 listed in wl.mailspike.net] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.0 PDS_TONAME_EQ_TOLOCAL_VSHORT Very short body and From looks like 2 different emails 2.0 BLANK_SUBJECT Subject is present but empty 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager close 56400 29.1 thanks From unknown Sun Jul 27 05:15:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 03 Aug 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator