From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 29 20:50:03 2022 Received: (at submit) by debbugs.gnu.org; 30 Nov 2022 01:50:03 +0000 Received: from localhost ([127.0.0.1]:57743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0CEc-0005u3-6w for submit@debbugs.gnu.org; Tue, 29 Nov 2022 20:50:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:44774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0CEW-0005tp-Qi for submit@debbugs.gnu.org; Tue, 29 Nov 2022 20:50:00 -0500 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 1p0CEW-0002aC-8O for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 20:49:56 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0CET-0004iJ-UL for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 20:49:55 -0500 Received: by mail-ej1-x632.google.com with SMTP id td2so23915430ejc.5 for ; Tue, 29 Nov 2022 17:49:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=5xS/feAK7l5vzoI/iQLFAJ1Q0ZLnqqz0s/2jmORJSto=; b=j9Rast3zJjlCvN2k5UgN34t6QhSYJznMQTaElAqs3ficGeqxw1scSgniixoMutP8AI Fp0bGi9J5wW4Tp5FK/Eb7wz7MXr/ZHKWW/m459nOlsExPvJdWwN9PGv4aSpkyA1227vb 0O2KsvIproEmOTdvHTnw5K4yl5SQq7ZjU3MY/rhOg3JDWPc3VMR/vDOUHrrye0pueXxE X31W6ZFOUeuANINx6hVnz3Ay5xJRRHckZe1Qt0LFEvJIx9WctMoho0fkxO1rkCc8TiIy XTBtsaZr1rdBGZBqTm17A5fzDwxjyUoeNo5p1l1Gj7AQYIstCnLhebh4JntX12ZBpteG Trdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5xS/feAK7l5vzoI/iQLFAJ1Q0ZLnqqz0s/2jmORJSto=; b=oSiFdO4tlRc7X4bLfMrntppyUVCBu+Bo333BV38mCVdh4+njW2RGnomDHbviPzf7lh IYxQO/YZNUD7ebL6CprEM5WKzpKmHky0QchYoxJhrUZ3dLNrhVnB9mLTzzoEj1OVyRZw zbTubqE1rJHPsQGlnfqoKV3Wf1fXxRMQXQv5gHhWTnydVWbcmNGC1BPciyBovPIHf5Hm Jk4CbquWPeUtedlkCdFn3Kf9TJqhltheKjqCVwS632x8PZDza4kiN4CwNlj9fDXr3rT3 izGj0ilo0gMh1+KO+RSIpOvzZ13AFH9k6p1fVbhI8YpK4YyaUQ6I+PNiwJmvKrX7Pm17 12GA== X-Gm-Message-State: ANoB5plaEW8+muWPTwmn2wu2Uv73MTAHBv4UdDs+p8IuwG7FwtuGUujZ 3F5Yy5VX8y/ZUnf0TkXxQao/E8NuJ5ApxU/USX4vRHtx0Zg= X-Google-Smtp-Source: AA0mqf5cueKqYMOoaQ6PDQP0mFPqc6PrGzVZeSFaI+mVbIAuYZ5K8pqHnaADwCSUGBv56t8sEaYlyw5SAy+E58Irj38= X-Received: by 2002:a17:906:aec1:b0:7c0:a04b:6795 with SMTP id me1-20020a170906aec100b007c0a04b6795mr255274ejb.16.1669772991870; Tue, 29 Nov 2022 17:49:51 -0800 (PST) MIME-Version: 1.0 From: Juanma Barranquero Date: Wed, 30 Nov 2022 02:49:15 +0100 Message-ID: Subject: Wrong type argument when editing a multisession variable To: Bug-Gnu-Emacs Content-Type: multipart/alternative; boundary="000000000000093ae105eea652dc" Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=lekktu@gmail.com; helo=mail-ej1-x632.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-Spam-Score: -1.3 (-) 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: -2.3 (--) --000000000000093ae105eea652dc Content-Type: text/plain; charset="UTF-8" Package: emacs Version: 29.0.60 Severity: normal X-Debbugs-Cc: "Lars Ingebrigtsen" ;;; init.el (require 'multisession) (define-multisession-variable test-var nil "Test var" :package "test") (setf (multisession-value test-var) t) ;;; end of init.el emacs M-x list-multisession-values e Debugger entered--Lisp error: (wrong-type-argument symbolp (intern (cdr id))) multisession-edit-value(("test" . "test-var")) funcall-interactively(multisession-edit-value ("test" . "test-var")) command-execute(multisession-edit-value) The problem comes from this change commit bd586121ac21e046f60f75eeb0200866c38d6f9f Author: Lars Ingebrigtsen Date: 2022-01-22 11:56:13 +0100 Make the test for existing multisession variables more sensible * lisp/emacs-lisp/multisession.el (multisession-edit-value): Unconfuse the code. diff --git a/lisp/emacs-lisp/multisession.el b/lisp/emacs-lisp/multisession.el index 4a293796a8..25307594c6 100644 --- a/lisp/emacs-lisp/multisession.el +++ b/lisp/emacs-lisp/multisession.el @@ -437,8 +437,8 @@ multisession-edit-value (let* ((object (or ;; If the multisession variable already exists, use ;; it (so that we update it). - (and (boundp (intern-soft (cdr id))) - (symbol-value (intern (cdr id)))) + (and (intern-soft (cdr id)) + (bound-and-true-p (intern (cdr id)))) ;; Create a new object. (make-multisession :package (car id) because `bound-and-true-p' is a macro that requires as argument a symbol, which (intern ...) is not. ELISP> (bound-and-true-p (intern "whatever")) *** Eval error *** Wrong type argument: symbolp, (intern "whatever") so I'm afraid this change was never tested. The fix is reverting the change, doing perhaps this diff --git a/lisp/emacs-lisp/multisession.el b/lisp/emacs-lisp/multisession.el index 9d6e8c0d88..78d4137317 100644 --- a/lisp/emacs-lisp/multisession.el +++ b/lisp/emacs-lisp/multisession.el @@ -447,8 +447,9 @@ multisession-edit-value (let* ((object (or ;; If the multisession variable already exists, use ;; it (so that we update it). - (and (intern-soft (cdr id)) - (bound-and-true-p (intern (cdr id)))) + (if-let (sym (intern-soft (cdr id))) + (and (boundp sym) (symbol-value sym)) + nil) ;; Create a new object. (make-multisession :package (car id) --000000000000093ae105eea652dc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Package: emacs
Version: 29.0.60
Severity: normal
X-Debbugs-Cc: &qu= ot;Lars Ingebrigtsen" <larsi@gnus= .org>


;;; init.el
(require 'multisession)
(define-multisess= ion-variable test-var nil "Test var" :package "test")(setf (multisession-value test-var) t)
;;; end of init.el

emacs=
M= -x list-multisession-values <RET>
e

Debugger entered--Lisp error:= (wrong-type-argument symbolp (intern (cdr id)))
=C2=A0 multisession-edit-value(("test" . "t= est-var"))
=C2=A0 funcall-i= nteractively(multisession-edit-value ("test" . "test-var&quo= t;))
=C2=A0 command-execute(mult= isession-edit-value)


The= problem comes from this change

=C2= =A0 commit bd586121ac21e046f60f75eeb0200866c38d6f9f
=C2=A0 Author: Lars = Ingebrigtsen <larsi@gnus.org>=C2=A0 Date: =C2=A0 2022-01-22 11:56:13 +0100

=C2=A0 =C2=A0 =C2=A0= Make the test for existing multisession variables more sensible

=C2= =A0 =C2=A0 =C2=A0 * lisp/emacs-lisp/multisession.el (multisession-edit-valu= e):
=C2=A0 =C2=A0 =C2=A0 Unconfuse the code.

=C2=A0 diff --git a/= lisp/emacs-lisp/multisession.el b/lisp/emacs-lisp/multisession.el
=C2=A0= index 4a293796a8..25307594c6 100644
=C2=A0 --- a/lisp/emacs-lisp/multis= ession.el
=C2=A0 +++ b/lisp/emacs-lisp/multisession.el
=C2=A0 @@ -437= ,8 +437,8 @@ multisession-edit-value
=C2=A0 =C2=A0 =C2=A0(let* ((object = (or
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0;; If the multisession variable already exists, use
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; it (so= that we update it).
=C2=A0 - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(and (boundp (intern-soft (cdr id)))
=C2=A0 - =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (sym= bol-value (intern (cdr id))))
=C2=A0 + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(and (intern-soft (cdr id))
=C2=A0 + =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (= bound-and-true-p (intern (cdr id))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Create a new object.
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(make-= multisession
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 :package (car id)


because `bound-and= -true-p' is a macro that requires as argument=C2=A0a symbol, which (int= ern ...) is not.

ELISP> (= bound-and-true-p (intern "whatever"))
*** Eval error *** =C2=A0Wrong type argument: symbolp, (int= ern "whatever")

so= I'm afraid this change was never tested.

The fix is reverting the change, doing perhaps this

diff --git a/lisp/emacs-lisp/multisession= .el b/lisp/emacs-lisp/multisession.el
index 9d6e8c0d88..78d4137317 10064= 4
--- a/lisp/emacs-lisp/multisession.el
+++ b/lisp/emacs-lisp/multise= ssion.el
@@ -447,8 +447,9 @@ multisession-edit-value
=C2=A0 =C2=A0(le= t* ((object (or
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0;; If the multisession variable already exists, use
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; it (so tha= t we update it).
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(and (intern-soft (cdr id))
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (bound-and-true-p (intern (cd= r id))))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(if-let (sym (intern-soft (cdr id)))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(and (boundp sym) (symbol-v= alue sym))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0nil)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0;; Create a new object.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(make-multisession
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :package (car id)

--000000000000093ae105eea652dc-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 08:07:33 2022 Received: (at 59710) by debbugs.gnu.org; 2 Dec 2022 13:07:34 +0000 Received: from localhost ([127.0.0.1]:46628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p15lN-0005EG-Fp for submit@debbugs.gnu.org; Fri, 02 Dec 2022 08:07:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p15lM-0005EA-A3 for 59710@debbugs.gnu.org; Fri, 02 Dec 2022 08:07:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p15lG-00015O-Vi; Fri, 02 Dec 2022 08:07:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=l0ZShryvt9DzS1Lrpo+KR0J1YuHtztunTztIWbElOgY=; b=NkY9ufFiIdAw ecMHiV3jXwRizTc0KH5u2HL224CTUSGYf3A2Y70O2W2m2rB9nCZn/CjTC0OmH77VrTWNnMHKMBilP 4OKsze5FzgoF34ezFtZ74fNeNOHnd8c2ikSD9EtMAz6TSThdgObfGPBFONlxQThGUgJiTzFCm/v8C gS4tWEDhZvvgngUfjjiMIJ2bABOlUVVc1K3+7RcxAu9l+SyHMv5k/COMD3hUaWxHnmt0+NvutMC8g H96/OBeCTA+y90L74DEyPa9/DJzsxu0KImrbc+gw+a8c3TQ29xKkCXXPNYeyI3w6RYCBLhDI1SieE jgF3SETd/YpIrDhXAX4Imw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p15lG-0005TS-Cc; Fri, 02 Dec 2022 08:07:26 -0500 Date: Fri, 02 Dec 2022 15:07:02 +0200 Message-Id: <83mt86eyyx.fsf@gnu.org> From: Eli Zaretskii To: Juanma Barranquero In-Reply-To: (message from Juanma Barranquero on Wed, 30 Nov 2022 02:49:15 +0100) Subject: Re: bug#59710: Wrong type argument when editing a multisession variable References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59710 Cc: larsi@gnus.org, 59710@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 (---) > Cc: "lars ingebrigtsen" > From: Juanma Barranquero > Date: Wed, 30 Nov 2022 02:49:15 +0100 > > Debugger entered--Lisp error: (wrong-type-argument symbolp (intern (cdr id))) > multisession-edit-value(("test" . "test-var")) > funcall-interactively(multisession-edit-value ("test" . "test-var")) > command-execute(multisession-edit-value) > > The problem comes from this change > > commit bd586121ac21e046f60f75eeb0200866c38d6f9f > Author: Lars Ingebrigtsen > Date: 2022-01-22 11:56:13 +0100 > > Make the test for existing multisession variables more sensible > > * lisp/emacs-lisp/multisession.el (multisession-edit-value): > Unconfuse the code. > > diff --git a/lisp/emacs-lisp/multisession.el b/lisp/emacs-lisp/multisession.el > index 4a293796a8..25307594c6 100644 > --- a/lisp/emacs-lisp/multisession.el > +++ b/lisp/emacs-lisp/multisession.el > @@ -437,8 +437,8 @@ multisession-edit-value > (let* ((object (or > ;; If the multisession variable already exists, use > ;; it (so that we update it). > - (and (boundp (intern-soft (cdr id))) > - (symbol-value (intern (cdr id)))) > + (and (intern-soft (cdr id)) > + (bound-and-true-p (intern (cdr id)))) > ;; Create a new object. > (make-multisession > :package (car id) > > because `bound-and-true-p' is a macro that requires as argument a symbol, which (intern ...) is not. > > ELISP> (bound-and-true-p (intern "whatever")) > *** Eval error *** Wrong type argument: symbolp, (intern "whatever") > > so I'm afraid this change was never tested. > > The fix is reverting the change, doing perhaps this > > diff --git a/lisp/emacs-lisp/multisession.el b/lisp/emacs-lisp/multisession.el > index 9d6e8c0d88..78d4137317 100644 > --- a/lisp/emacs-lisp/multisession.el > +++ b/lisp/emacs-lisp/multisession.el > @@ -447,8 +447,9 @@ multisession-edit-value > (let* ((object (or > ;; If the multisession variable already exists, use > ;; it (so that we update it). > - (and (intern-soft (cdr id)) > - (bound-and-true-p (intern (cdr id)))) > + (if-let (sym (intern-soft (cdr id))) > + (and (boundp sym) (symbol-value sym)) > + nil) > ;; Create a new object. > (make-multisession > :package (car id) This makes sense to me, so please go ahead and install (assuming that the multisession tests still all pass after this change). Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 08:31:41 2022 Received: (at 59710-done) by debbugs.gnu.org; 2 Dec 2022 13:31:42 +0000 Received: from localhost ([127.0.0.1]:46749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p168j-0005Tx-HL for submit@debbugs.gnu.org; Fri, 02 Dec 2022 08:31:41 -0500 Received: from mail-ej1-f45.google.com ([209.85.218.45]:39688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p168e-0005Tr-Vm for 59710-done@debbugs.gnu.org; Fri, 02 Dec 2022 08:31:39 -0500 Received: by mail-ej1-f45.google.com with SMTP id ml11so11579721ejb.6 for <59710-done@debbugs.gnu.org>; Fri, 02 Dec 2022 05:31:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MQU+Dy7D0zRSCEe8Mx/lvt4AbnY8wbtmHR+VLaG/bz4=; b=U/CCqvwkdpjBQLNTSsB0vCy7n9ycziROENlxxT38HwBLaCbnR4nbdzJGGgSWHemRrY gRtVVD9lK7U0mK6lnz5QW8BvzicVyQgeW+p7DnQGrle/o0ak6gfhsInKgotU+i5+RVcX xJQAftL4PNNsea4Sr5zYmyqLPo1rtOw/bvM6NvdZj5olhmM67d7JfDAwZ14oxMoiZFgN w2BD2MDkpheWpraPIO84IBTSSBRPVLeNKirgiLjKAuc/MQRj0uu0x1Uc0B8yC6MWjf4w 5glIu9GYkEQOzLuTOV0A9MJmLPZ/zCpzxBtYv1XlpH2z4clV2rWLzT5aRm9G5FaijX7D tXPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=MQU+Dy7D0zRSCEe8Mx/lvt4AbnY8wbtmHR+VLaG/bz4=; b=M5KhOXSa96zVb9qs06hzksnA7hJM4uJFQUzqZnNht7lYdPKFdAos6hy1okskSQJMAi AjkCAoFz7kg/xoAGrvHIDhwu97dRmSwqGNfYLtklgG4noDDehnJF9p/LcnEO7pPEIGqR STfS9w3ZA3UeUpWKpbDcvvaJlxWUcFVg2RcQRerYNrK0rNg8cQU0gHo48eI0vZwfaQSa Gzy9EEWNymo+PkabWS/BOyYv4nHREUaeXYSgMgI21HjJPrEIWYOWV2JWF65rL4NojbNk NinqAdvsFqW68G72PY0TN8SNCd76kOU73h+SpI/AJmroLc8bq4/32pSij9x0fgzpK861 N62w== X-Gm-Message-State: ANoB5pkcARasv8KCH24yWH0c1Z4GvX/b9r0en4obXtcKGnptl490CKkc dYBBS3UnE0uJPPFQpPt+JbIo+MBuUszCxCtQzmg= X-Google-Smtp-Source: AA0mqf4eMoASnrsey0QTKq+dUOkDAiJYqs9v+uMpSLM2Fw8qIMUU3DRPSdt/8g7RO5FkmXAXZWUZBAmCVKk37g+jqlQ= X-Received: by 2002:a17:906:a991:b0:7ba:85a7:2ec3 with SMTP id jr17-20020a170906a99100b007ba85a72ec3mr37630133ejb.36.1669987890121; Fri, 02 Dec 2022 05:31:30 -0800 (PST) MIME-Version: 1.0 References: <83mt86eyyx.fsf@gnu.org> In-Reply-To: <83mt86eyyx.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 2 Dec 2022 14:30:52 +0100 Message-ID: Subject: Re: bug#59710: Wrong type argument when editing a multisession variable To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000f8527205eed85add" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59710-done Cc: larsi@gnus.org, 59710-done@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: -1.0 (-) --000000000000f8527205eed85add Content-Type: text/plain; charset="UTF-8" On Fri, Dec 2, 2022 at 2:07 PM Eli Zaretskii wrote: > This makes sense to me, so please go ahead and install (assuming that the > multisession tests still all pass after this change). Yes, they pass. Installed in commit e5b0141b0d of 2022-12-02. BTW, I wonder if it would make sense to make bound-and-true-p to check that it gets a symbol: diff --git i/lisp/bindings.el w/lisp/bindings.el index c1ad5f7520..6ee730af58 100644 --- i/lisp/bindings.el +++ w/lisp/bindings.el @@ -671,4 +671,6 @@ bound-and-true-p Note that if `lexical-binding' is in effect, this function isn't meaningful if it refers to a lexically bound variable." + (unless (symbolp var) + (error "Wrong type argument: symbolp, %S" var)) `(and (boundp (quote ,var)) ,var)) --000000000000f8527205eed85add Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


<= div dir=3D"ltr" class=3D"gmail_attr">On Fri, Dec 2, 2022 at 2:07 PM Eli Zar= etskii <eliz@gnu.org> wrote:
> This makes sense to me, so please go ahead and install (assuming = that the
> multisession tests still all pass after this change).
<= br>
Yes, they pass. Installed in commit e5b0141b0d of 2022-12-02.
BTW, I wonder if it would make sense to = make bound-and-true-p to check that it gets a symbol:

diff --git i/lisp/bindings.el w/lisp/bindings.el
index= c1ad5f7520..6ee730af58 100644
--- i/lisp/bindings.el
+++ w/lisp/bind= ings.el
@@ -671,4 +671,6 @@ bound-and-true-p
=C2=A0Note that if `lexi= cal-binding' is in effect, this function isn't
=C2=A0meaningful = if it refers to a lexically bound variable."
+ =C2=A0(unless (symbo= lp var)
+ =C2=A0 =C2=A0(error "Wrong type argument: symbolp, %S&quo= t; var))
=C2=A0 =C2=A0`(and (boundp (quote ,var)) ,var))
=C2=A0

--000000000000f8527205eed85add-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 10:06:56 2022 Received: (at 59710) by debbugs.gnu.org; 2 Dec 2022 15:06:56 +0000 Received: from localhost ([127.0.0.1]:47238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p17cu-0006RY-8w for submit@debbugs.gnu.org; Fri, 02 Dec 2022 10:06:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p17cl-0006RC-Nk for 59710@debbugs.gnu.org; Fri, 02 Dec 2022 10:06:54 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p17cf-0004IP-J9; Fri, 02 Dec 2022 10:06:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tT6SJLWcDhVtKeA0TvuTckKh6MvjnKoBucPhilxhJH4=; b=P/U2RME/cVsH YphzBQrzQDYLyXirlPCyYkSHGrbIzIwAn6O/ONgOBE0scRmFQJwD7bLyJTeTu6a3uixn6XfkBFmda t6C8Ir4e1QWaoeJB2PQ9Vnl6jlpSHPK5/qhvUirBjJfdvnuhnZLYxLCUTVl9yVkkK0R9PDRFcPs1/ uYaf4CspCIxyEZW0dvc4Sre8oPMHawEc2Oxay2MkuIK9jWl8Ow7T5IfunUIqLpDFaAPCj4A7ikYrG mIMQNNaSf7KTLjH6V+aiNSpvwls5JfRDVDrSqiF0FesSMe6IIWiiIkFrtHr3uPrU4V5GS7YczKepR 4DkJ/sXDUZfIjLAXPw5jfg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p17ce-0005uM-L9; Fri, 02 Dec 2022 10:06:40 -0500 Date: Fri, 02 Dec 2022 17:06:17 +0200 Message-Id: <835yetg80m.fsf@gnu.org> From: Eli Zaretskii To: Juanma Barranquero , Stefan Monnier , Lars Ingebrigtsen In-Reply-To: (message from Juanma Barranquero on Fri, 2 Dec 2022 14:30:52 +0100) Subject: Re: bug#59710: Wrong type argument when editing a multisession variable References: <83mt86eyyx.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59710 Cc: 59710@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 (---) > From: Juanma Barranquero > Date: Fri, 2 Dec 2022 14:30:52 +0100 > Cc: larsi@gnus.org, 59710-done@debbugs.gnu.org > > BTW, I wonder if it would make sense to make bound-and-true-p to check that it gets a symbol: > > diff --git i/lisp/bindings.el w/lisp/bindings.el > index c1ad5f7520..6ee730af58 100644 > --- i/lisp/bindings.el > +++ w/lisp/bindings.el > @@ -671,4 +671,6 @@ bound-and-true-p > Note that if `lexical-binding' is in effect, this function isn't > meaningful if it refers to a lexically bound variable." > + (unless (symbolp var) > + (error "Wrong type argument: symbolp, %S" var)) > `(and (boundp (quote ,var)) ,var)) I have no opinion on that. Lars, Stefan: WDYT? From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 10:40:15 2022 Received: (at 59710) by debbugs.gnu.org; 2 Dec 2022 15:40:15 +0000 Received: from localhost ([127.0.0.1]:47380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1898-0006jw-OF for submit@debbugs.gnu.org; Fri, 02 Dec 2022 10:40:15 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1896-0006jm-OC for 59710@debbugs.gnu.org; Fri, 02 Dec 2022 10:40:13 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D80A1100129; Fri, 2 Dec 2022 10:40:06 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 15DF810011C; Fri, 2 Dec 2022 10:40:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1669995605; bh=o2dsyaDhYTkchn3eW2PMASUQz1Z18L4693GDSgCahd4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=IGRWE+8XZXietjA60oHZPiz96DKqPW5pvsM5nOeFUlc+Jx1QK1nu1NuE8Qj/49l4G fxl/5VTXzb7sqadj4GSeggRPwsJKrXfyzSl7jYbasQbvsrFyt/JvmsFsxw6wyAymvd T0TDBzuCBUTrF8xy48560/3J4drHk/j0s9dXAD6QctMUkDn7miq84Nx9zwZe7YX6v9 nTHP38k/c49iqyr4+oyeNTLSD4pVoYE81vvRphH2c3Ua7ABTBQKlRjRkLM6S92+pHN q8wpiVwCGWnPqliQLgRr3bdnFxhtkPhKFQh3I/WVmvo6noMqzidu1nuHZKDUWasMX7 80yGFvtkP7bBw== Received: from pastel (unknown [45.72.193.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C7839122B7B; Fri, 2 Dec 2022 10:40:04 -0500 (EST) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#59710: Wrong type argument when editing a multisession variable In-Reply-To: <835yetg80m.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 02 Dec 2022 17:06:17 +0200") Message-ID: References: <83mt86eyyx.fsf@gnu.org> <835yetg80m.fsf@gnu.org> Date: Fri, 02 Dec 2022 10:40:04 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.272 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain KAM_SHORT 0.001 Use of a URL Shortener for very short URL X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59710 Cc: Juanma Barranquero , Lars Ingebrigtsen , 59710@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 (---) >> @@ -671,4 +671,6 @@ bound-and-true-p >> Note that if `lexical-binding' is in effect, this function isn't >> meaningful if it refers to a lexically bound variable." >> + (unless (symbolp var) >> + (error "Wrong type argument: symbolp, %S" var)) >> `(and (boundp (quote ,var)) ,var)) > > I have no opinion on that. Lars, Stefan: WDYT? I wish Someone=E2=84=A2 implemented something like [Fortifying macros](https://dl.acm.org/doi/10.1145/1863543.1863577) to solve this in a more general way :-) I have no objections against such a change. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 19:25:58 2022 Received: (at 59710) by debbugs.gnu.org; 3 Dec 2022 00:25:58 +0000 Received: from localhost ([127.0.0.1]:49720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1GLu-0003FR-BV for submit@debbugs.gnu.org; Fri, 02 Dec 2022 19:25:58 -0500 Received: from mail-ed1-f50.google.com ([209.85.208.50]:35387) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1GLq-0003Eu-VD for 59710@debbugs.gnu.org; Fri, 02 Dec 2022 19:25:55 -0500 Received: by mail-ed1-f50.google.com with SMTP id i15so298962edf.2 for <59710@debbugs.gnu.org>; Fri, 02 Dec 2022 16:25:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4xANaGxAcNNrYh8nFGT1ZUHpoVHIjtbmiH0GN3DBRmI=; b=p+7FHlw76ome+v2qymBCyQgWrRJr78DkWNWpnPXWv2jkwPGqLAulSFCTqQsrOjeTsU c3aE6X6tKJz+OGCzYy/YM5qyi+s5f2T+thX0dk/mJcxiz80agRsZJsOVLwLIzWzUgvcj nDtUNpHhMbCCYJ61VqFxyYraM/9Kkj634u47db0VhW22cBdoG5zsorF8tlN5aO5kyiQ7 eP3amKAXrrbynpIpLLc/CkGTR2OAYi8m1ILGoWYC9tUbDVJGx9ZTBet/3/VOnp7ttanV GZFEvNzhzrJznMO1dDKEqtaMMwhLRp9OVDIbEqSrQ1+AwbeNYr5IjWmvVmlfdygvZDf5 X10g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=4xANaGxAcNNrYh8nFGT1ZUHpoVHIjtbmiH0GN3DBRmI=; b=KoO1WpNGeMpNmhvoEJXwbJCiBnETwSTrTTsTV+ea2gTRl0pOqq7RStFi3TASxFvTgw ZcBeKthmVNTyG23Zx/y9bHVE2/gH8ZDnuK4hpr9tKpzy3SbGJBjqhA7m7+bZOBUMMEwB NwwQ13tIMz07GixdCf+/id2STL/Qr5SZwVh88H0Xb7bz7Mv8oTJxp/a2xCBdm+QITnIy +Q0EKFevsfTVPqN680tTTcuZOTNjC8XayKCT/kywD5axBySicUo/3Sqlj/qShuS29/M8 ir/shPG5AbYD6mO6DcKhxEXvXHokemXgCbqgXDtp5q+j/9q/QZzkEa5ct80HtDlkIiBv pl5Q== X-Gm-Message-State: ANoB5pkysIlJimiTwNfugnnaLZzpRgQT4yFKGfcgBX7qIDVT9pyoDTrY +5NGN0Bwe0P5i2wsWr4wEXaEE1+rpBqvz7uaPsk= X-Google-Smtp-Source: AA0mqf7CHnzx6aJ5nXowIcyEtUGMbWKHEQODu9KasCMybX2rkPfw6iqba2vvEAX6nGB9LqV968RdPHOmYuUKA2uu61w= X-Received: by 2002:a05:6402:444c:b0:462:2e27:3bf2 with SMTP id o12-20020a056402444c00b004622e273bf2mr66174307edb.13.1670027149033; Fri, 02 Dec 2022 16:25:49 -0800 (PST) MIME-Version: 1.0 References: <83mt86eyyx.fsf@gnu.org> <835yetg80m.fsf@gnu.org> In-Reply-To: From: Juanma Barranquero Date: Sat, 3 Dec 2022 01:25:13 +0100 Message-ID: Subject: Re: bug#59710: Wrong type argument when editing a multisession variable To: Stefan Monnier Content-Type: multipart/alternative; boundary="000000000000fbc72405eee17ed6" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59710 Cc: Eli Zaretskii , Lars Ingebrigtsen , 59710@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: -1.0 (-) --000000000000fbc72405eee17ed6 Content-Type: text/plain; charset="UTF-8" In fact, I think it would be marginally better (unless (symbolp var) (signal 'wrong-type-argument (list 'symbolp var))) Assuming ok to install... where? emacs-29 or master? --000000000000fbc72405eee17ed6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In fact, I think it would be marginally better

(unless (sy= mbolp var)
=C2=A0 (signal 'wrong-type-argument (list 'symbolp var)))<= /div>
Assuming ok to install... where? emacs-29 or master?

--000000000000fbc72405eee17ed6-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 19:28:34 2022 Received: (at 59710) by debbugs.gnu.org; 3 Dec 2022 00:28:34 +0000 Received: from localhost ([127.0.0.1]:49743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1GOQ-0003IU-0j for submit@debbugs.gnu.org; Fri, 02 Dec 2022 19:28:34 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:39437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1GON-0003IN-0p for 59710@debbugs.gnu.org; Fri, 02 Dec 2022 19:28:33 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9328D100178; Fri, 2 Dec 2022 19:28:25 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 816AC100143; Fri, 2 Dec 2022 19:28:23 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1670027303; bh=nUhEZzATHpjEh8Lw6ZJMRQmvznmC0DFsGtGs8EsZAPk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Ax9aeCdeS9TcTdbAymLIGWIcOWEkKkiTeKZoFF0WEXIyyT+1noem9uE65AH0Rc1m8 HIT8tbTIc9mcFetCP8cuA5gPyUWMG16qrnBLFccHI+dQ6DBuoztBSkhoSZXFYLZGDy kkP4rlA9kLHZKKh8+FIaK6N7Fgl6SUaN6YwHmsBFUNt9Q3HWHT4RrTk3IHvatcjshy z7ja/Y/dYLKL7RItMl7dCvzODBHSTxGPZ1bJ/TyuxrQyfzAdy+OwrNaz3pdMQG79hP LCebqpBmjis4Bin8w9eUSPMqP9PIcqKI0gw4v0ihHVBESdHVrpLzQsa741pm2Mxv1p v80iglHTV41xg== Received: from pastel (unknown [45.72.193.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5126B122FFF; Fri, 2 Dec 2022 19:28:23 -0500 (EST) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#59710: Wrong type argument when editing a multisession variable In-Reply-To: (Juanma Barranquero's message of "Sat, 3 Dec 2022 01:25:13 +0100") Message-ID: References: <83mt86eyyx.fsf@gnu.org> <835yetg80m.fsf@gnu.org> Date: Fri, 02 Dec 2022 19:28:21 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.316 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59710 Cc: Eli Zaretskii , Lars Ingebrigtsen , 59710@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 (---) Juanma Barranquero [2022-12-03 01:25:13] wrote: > In fact, I think it would be marginally better > > (unless (symbolp var) > (signal 'wrong-type-argument (list 'symbolp var))) > > Assuming ok to install... where? emacs-29 or master? master Tefan From unknown Sat Aug 16 19:19:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 31 Dec 2022 12: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