From unknown Fri Jun 20 18:24:58 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#21701 <21701@debbugs.gnu.org> To: bug#21701 <21701@debbugs.gnu.org> Subject: Status: 25.0.50; ert explainer for equal can't handle negative numbers (work in 24.5) Reply-To: bug#21701 <21701@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:24:58 +0000 retitle 21701 25.0.50; ert explainer for equal can't handle negative number= s (work in 24.5) reassign 21701 emacs submitter 21701 Anders Lindgren severity 21701 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 18 04:57:14 2015 Received: (at submit) by debbugs.gnu.org; 18 Oct 2015 08:57:14 +0000 Received: from localhost ([127.0.0.1]:54777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZnjmD-0004wO-2g for submit@debbugs.gnu.org; Sun, 18 Oct 2015 04:57:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57497) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZnjmA-0004wE-As for submit@debbugs.gnu.org; Sun, 18 Oct 2015 04:57:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Znjm8-0000hY-L0 for submit@debbugs.gnu.org; Sun, 18 Oct 2015 04:57:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znjm8-0000hU-5g for submit@debbugs.gnu.org; Sun, 18 Oct 2015 04:57:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znjm0-0003YR-Oa for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 04:57:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Znjlz-0000gR-6b for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 04:57:00 -0400 Received: from mail-vk0-x22a.google.com ([2607:f8b0:400c:c05::22a]:35904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znjlz-0000gF-0t for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 04:56:59 -0400 Received: by vkex70 with SMTP id x70so82696249vke.3 for ; Sun, 18 Oct 2015 01:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=2MX6VIp/eRkVB8SRXrIGf+8CJrZZEJE/BG4CmmX/txE=; b=CWMj1wXQ20f+KZ1uOiSjFy2E5ajybTfOD2ilBad6LyKRwrUAAtrrZY7/nnB+WXRrDD /l/KaDWwWS5AEbxyTieJ240Ecz+24b5YIslg1bnrc+LIlL74+96gpXhGD7e8pToBlCxT JV1akWsjte6DjdT6Us5LDrYulV4j5hUcL0FRWUagJyhzdP2Vjz02jHntvHDV5lSeb8ly 4eR/layxwQ0JA9zMfoCO+PF5SdSRObuUSz9vJ9iwFcICzUfZOeeLqPV3Hl+kI1pQW3K8 t4UB9wfirvtWStp7vYvjwTJjyWtXDRNMir7Y63mWT57dxcTmgWphMAZ9YkD01DqhGhd/ lHwg== MIME-Version: 1.0 X-Received: by 10.31.170.68 with SMTP id t65mr14655377vke.31.1445158618284; Sun, 18 Oct 2015 01:56:58 -0700 (PDT) Received: by 10.31.210.134 with HTTP; Sun, 18 Oct 2015 01:56:58 -0700 (PDT) Date: Sun, 18 Oct 2015 10:56:58 +0200 Message-ID: Subject: 25.0.50; ert explainer for equal can't handle negative numbers (work in 24.5) From: Anders Lindgren To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=001a11431b66164c7205225d362a X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) --001a11431b66164c7205225d362a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Steps to repeat, eval the following and run `ert'. (ert-deftest bad-equal () (should (equal 23 -50))) Instead of a normal Ert error, the following is reported: A bad-equal aborted When placing the cursor on the error and press "d" (to run the test case in the debugger), the following call stack is presented: apply(debug (error (wrong-type-argument characterp -50))) ert--run-test-debugger([cl-struct-ert--test-execution-info... #[128 "\301\300=02\"\207" [[cl-struct-ert--test-execution-info ... format("?%c" -50) ert--explain-format-atom(-50) ert--explain-equal-rec(23 -50) ert--explain-equal(23 -50) apply(ert--explain-equal (23 -50)) (list :explanation (apply -explainer- args-1)) Clearly, the code is trying to print -50 as a character. This worked in Emacs 24.5, where Ert reported: F bad-equal (ert-test-failed ((should (equal 23 -50)) :form (equal 23 -50) :value nil :explanation (different-atoms (23 "#x17" "?=17") (-50 "#x3fffffffffffffce")))) Sincerely, Anders Lindgren In GNU Emacs 25.0.50.158 (x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F27)) of 2015-10-16 Repository revision: ff4798b8b493ba1ec51dcb1c59a11824865124b8 Windowing system distributor 'Apple', version 10.3.1348 Configured using: 'configure --with-ns --without-dbus' Configured features: ACL ZLIB TOOLKIT_SCROLL_BARS NS Important settings: value of $LC_CTYPE: UTF-8 locale-coding-system: utf-8-unix Major mode: ERT-Results Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. bad-equal Ran 1 tests, 0 results were as expected, 1 unexpected Running test bad-equal... Entering debugger... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message dired format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils pp cl-extra help-mode cl-macs gv ert find-func ewoc easymenu debug cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 89635 5963) (symbols 48 19436 0) (miscs 40 78 159) (strings 32 15385 4052) (string-bytes 1 463936) (vectors 16 12257) (vector-slots 8 415700 5035) (floats 8 162 183) (intervals 56 271 6) (buffers 976 14)) --001a11431b66164c7205225d362a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Steps to repeat, eval the following and run `ert'.
=
(ert-deftest bad-equal ()
=C2=A0 (should (equal 23 -50)))

Ins= tead of a normal Ert error, the following is reported:

A bad-equal=C2=A0 =C2=A0 aborted

When placing the cursor on the error and pre= ss "d" (to run the test case in the debugger), the following call= stack is presented:

=C2=A0 apply(debug (error (wrong-type-argument = characterp -50)))
=C2=A0 ert--run-test-debugger([cl-struct-ert--test-exe= cution-info...
=C2=A0 #[128 "\301\300=02\"\207" [[cl-stru= ct-ert--test-execution-info ...
=C2=A0 format("?%c" -50)
= =C2=A0 ert--explain-format-atom(-50)
=C2=A0 ert--explain-equal-rec(23 -5= 0)
=C2=A0 ert--explain-equal(23 -50)
=C2=A0 apply(ert--explain-equal = (23 -50))
=C2=A0 (list :explanation (apply -explainer- args-1))

C= learly, the code is trying to print -50 as a character.

This worked = in Emacs 24.5, where Ert reported:

F bad-equal
=C2=A0 =C2=A0 (ert= -test-failed
=C2=A0 =C2=A0 =C2=A0((should
=C2=A0 =C2=A0 =C2=A0 =C2=A0= (equal 23 -50))
=C2=A0 =C2=A0 =C2=A0 :form
=C2=A0 =C2=A0 =C2=A0 (equa= l 23 -50)
=C2=A0 =C2=A0 =C2=A0 :value nil :explanation
=C2=A0 =C2=A0 = =C2=A0 (different-atoms
=C2=A0 =C2=A0 =C2=A0 =C2=A0(23 "#x17" = "?=17")
=C2=A0 =C2=A0 =C2=A0 =C2=A0(-50 "#x3fffffffffffff= ce"))))


Sincerely,
=C2=A0 =C2=A0 Anders Lindgren

In GNU Emacs 25.0.50.158 (x86_64-apple-darwin14.5.0, NS appkit-1348.17= Version 10.10.5 (Build 14F27))
=C2=A0of 2015-10-16
Repository revisi= on: ff4798b8b493ba1ec51dcb1c59a11824865124b8
Windowing system distributo= r 'Apple', version 10.3.1348
Configured using:
=C2=A0'con= figure --with-ns --without-dbus'

Configured features:
ACL ZLI= B TOOLKIT_SCROLL_BARS NS

Important settings:
=C2=A0 value of $LC_= CTYPE: UTF-8
=C2=A0 locale-coding-system: utf-8-unix

Major mode: = ERT-Results

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2= =A0 global-eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-= wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2= =A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 f= ont-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-= mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: = t
=C2=A0 buffer-read-only: t
=C2=A0 line-number-mode: t
=C2=A0 tra= nsient-mark-mode: t

Recent messages:
For information about GNU Em= acs and the GNU system, type C-h C-a.
bad-equal
Ran 1 tests, 0 result= s were as expected, 1 unexpected
Running test bad-equal...
Entering d= ebugger...

Load-path shadows:
None found.

Features:
(sh= adow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 = mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev = gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fn= s mail-prsvr mail-utils pp cl-extra help-mode cl-macs gv
ert find-func e= woc easymenu debug cl-loaddefs pcase cl-lib time-date
mule-util tooltip = eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel ns-wi= n term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated= -list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar r= fn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facem= enu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietna= mese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew g= reek romanian slovak czech
european ethiopic indian cyrillic chinese cha= rscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer = cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-= properties overlay
sha1 md5 base64 format env code-pages mule custom wid= get
hashtable-print-readable backquote cocoa ns multi-tty
make-networ= k-process emacs)

Memory information:
((conses 16 89635 5963)
= =C2=A0(symbols 48 19436 0)
=C2=A0(miscs 40 78 159)
=C2=A0(strings 32 = 15385 4052)
=C2=A0(string-bytes 1 463936)
=C2=A0(vectors 16 12257)=C2=A0(vector-slots 8 415700 5035)
=C2=A0(floats 8 162 183)
=C2=A0(i= ntervals 56 271 6)
=C2=A0(buffers 976 14))
--001a11431b66164c7205225d362a-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 18 13:29:26 2015 Received: (at control) by debbugs.gnu.org; 18 Oct 2015 17:29:26 +0000 Received: from localhost ([127.0.0.1]:55322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Znrlt-0001aV-Nf for submit@debbugs.gnu.org; Sun, 18 Oct 2015 13:29:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40599) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Znrls-0001aN-7L for control@debbugs.gnu.org; Sun, 18 Oct 2015 13:29:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Znrlr-0008Fi-23 for control@debbugs.gnu.org; Sun, 18 Oct 2015 13:29:23 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znrlq-0008FY-Vz for control@debbugs.gnu.org; Sun, 18 Oct 2015 13:29:23 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1Znrlq-0003DA-9F for control@debbugs.gnu.org; Sun, 18 Oct 2015 13:29:22 -0400 Subject: control message for bug 19759 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Sun, 18 Oct 2015 13:29:22 -0400 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.0 (-----) block 19759 by 21701 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 04:42:02 2015 Received: (at 21701) by debbugs.gnu.org; 4 Dec 2015 09:42:02 +0000 Received: from localhost ([127.0.0.1]:38220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4msL-0006DF-T7 for submit@debbugs.gnu.org; Fri, 04 Dec 2015 04:42:02 -0500 Received: from mail-vk0-f51.google.com ([209.85.213.51]:35222) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4msK-0006D6-2z for 21701@debbugs.gnu.org; Fri, 04 Dec 2015 04:42:00 -0500 Received: by vkha189 with SMTP id a189so62029569vkh.2 for <21701@debbugs.gnu.org>; Fri, 04 Dec 2015 01:41:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=slq7Wp0/N/LjOxlc4wzSo1BYZbIPfRPYMNGr9lv2tPc=; b=K94cB2Y3OCwOyJMQyzCJ1xAvENlcGq2kxqWdmXiLnTIscn8dZYJc1NPN2W9iLxB9Rs x44L2rqdG+dH2ZJRFC8kg6+moulIAGP9UxYhiqLOTA1Pe1vnITNjKpt79kQyxk/Ed/Wz /0D9UM0DQ68389MLqpUxiG/S+dzlL423iooTcRsI9xZUZ6+BmFSmsJ4xRL5p0Awc1Wo7 QgUCNybT2oCNba3JAuMEGIZtXZsq381iWuGReXztuisHWNVfIckro3enUjAZPZgMNGYZ 7YV099UmniImCxnOxDJkh40Ie/SXIbyTgWzg+6XLUWDVuGCUKjVKclstDlDtpaJki6ms c4wg== MIME-Version: 1.0 X-Received: by 10.31.11.204 with SMTP id 195mr9497073vkl.23.1449222119397; Fri, 04 Dec 2015 01:41:59 -0800 (PST) Received: by 10.31.210.133 with HTTP; Fri, 4 Dec 2015 01:41:59 -0800 (PST) Date: Fri, 4 Dec 2015 10:41:59 +0100 Message-ID: Subject: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) From: Anders Lindgren To: 21701@debbugs.gnu.org Content-Type: multipart/alternative; boundary=001a114560cea09f1f05260f5102 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21701 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.7 (/) --001a114560cea09f1f05260f5102 Content-Type: text/plain; charset=UTF-8 I just realised that the underlying problem is a change to `cl-typecase'. It treats -50 as a character. (cl-typecase -50 (character "A character") (fixnum "A fixnum") (t "Something else")) Emacs 25 returns "A character" and emacs 24 "A fixnum". -- Anders --001a114560cea09f1f05260f5102 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I just realised that the underlying problem is a change to= `cl-typecase'. It treats -50 as a character.

(= cl-typecase -50
=C2=A0 (character "A character")
<= div>=C2=A0 (fixnum "A fixnum")
=C2=A0 (t "Somethin= g else"))

Emacs 25 returns "A character&= quot; and emacs 24 "A fixnum".

=C2= =A0 =C2=A0 -- Anders

--001a114560cea09f1f05260f5102-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 08:30:52 2015 Received: (at 21701-done) by debbugs.gnu.org; 4 Dec 2015 13:30:52 +0000 Received: from localhost ([127.0.0.1]:38353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4qRn-00050h-S1 for submit@debbugs.gnu.org; Fri, 04 Dec 2015 08:30:52 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:8690) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4qRk-00050X-VL for 21701-done@debbugs.gnu.org; Fri, 04 Dec 2015 08:30:49 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CvCwA731xV/yr292hcgxCEAsEMCYR+gk0EAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQEGAQEBAR6LOoUFB4QtBYwwqFQjgjuBWyCCeAEBAQ X-IPAS-Result: A0CvCwA731xV/yr292hcgxCEAsEMCYR+gk0EAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQEGAQEBAR6LOoUFB4QtBYwwqFQjgjuBWyCCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="184470266" Received: from 104-247-246-42.cpe.teksavvy.com (HELO pastel.home) ([104.247.246.42]) by ironport2-out.teksavvy.com with ESMTP; 04 Dec 2015 08:30:47 -0500 Received: by pastel.home (Postfix, from userid 20848) id DCB85614D1; Fri, 4 Dec 2015 08:30:47 -0500 (EST) From: Stefan Monnier To: Anders Lindgren Subject: Re: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) Message-ID: References: Date: Fri, 04 Dec 2015 08:30:47 -0500 In-Reply-To: (Anders Lindgren's message of "Fri, 4 Dec 2015 13:18:49 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21701-done Cc: 21701-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) > I just realised that the underlying problem is a change to `cl-typecase'. > It treats -50 as a character. > > (cl-typecase -50 > (character "A character") > (fixnum "A fixnum") > (t "Something else")) > > Emacs 25 returns "A character" and emacs 24 "A fixnum". I installed the patch below which should fix this. Stefan diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 09d2d3f..c8aad3a 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2885,7 +2885,7 @@ cl--macroexp-fboundp (put 'real 'cl-deftype-satisfies #'numberp) (put 'fixnum 'cl-deftype-satisfies #'integerp) (put 'base-char 'cl-deftype-satisfies #'characterp) -(put 'character 'cl-deftype-satisfies #'integerp) +(put 'character 'cl-deftype-satisfies #'natnump) ;;;###autoload From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 10:41:50 2015 Received: (at 21701-done) by debbugs.gnu.org; 4 Dec 2015 15:41:50 +0000 Received: from localhost ([127.0.0.1]:39152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4sUX-0008Hq-La for submit@debbugs.gnu.org; Fri, 04 Dec 2015 10:41:50 -0500 Received: from mail-vk0-f43.google.com ([209.85.213.43]:33611) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4sUV-0008Hi-8z for 21701-done@debbugs.gnu.org; Fri, 04 Dec 2015 10:41:47 -0500 Received: by vkca188 with SMTP id a188so68195886vkc.0 for <21701-done@debbugs.gnu.org>; Fri, 04 Dec 2015 07:41:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QxU+w/fmROtLhgn9wywDf5leLli4vQCL7RXDwtg0iu4=; b=kqqjnjFliayVY2DRVDz8Yy7Ckv/kfjI5g+Pvz2Hkl4e9sXqk3bZHXtMhactcshcMOl BxRv5gMfIjhUlJTGg+iFU1Ao2hDYrDgArJ1/qMbPSxNd9yO+bCjGZsDSmkqY2xC6QleZ M+CqjPbUfNAsY4Jn295qL61J2UgTz4O+ZxNArGrCVA1ri+Mch7d5qaG+7QZaXcD+bedj lYjYzxX8K4PP+/ARkjKqWpPDgtOC3QR/H3eh1XV4mQpBpRFv6OcmxD3tz/CZog70jEgG 2EOy4IaqS5MmYF+6wNjbm0vSSpAaB9GoEiKWb2KjvB3uv2Ut9gDPpnNIOE2PNvqyIda3 OlXA== MIME-Version: 1.0 X-Received: by 10.31.58.74 with SMTP id h71mr10589468vka.149.1449243706776; Fri, 04 Dec 2015 07:41:46 -0800 (PST) Received: by 10.31.210.133 with HTTP; Fri, 4 Dec 2015 07:41:46 -0800 (PST) In-Reply-To: References: Date: Fri, 4 Dec 2015 16:41:46 +0100 Message-ID: Subject: Re: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) From: Anders Lindgren To: Stefan Monnier Content-Type: multipart/alternative; boundary=001a114405c655e4fd0526145896 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21701-done Cc: 21701-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.7 (/) --001a114405c655e4fd0526145896 Content-Type: text/plain; charset=UTF-8 Hi, This should solve the immediate problem with negative numbers. However, I gave this some though and realised that there is still a problem with large numbers. For example: (cl-typecase (+ (max-char) 1) (character "A character") (fixnum "A fixnum") (t "Something else")) Returns "A character". However, "(format "%c" (+ (max-char) 1))" raises the error "(wrong-type-argument characterp 4194304)". The question is if `cl-typecase', `format', and `characterp' should have the same definition on what a character is. If not, then ERT must be modified to handle this, e.g. by using `base-char' rather than `character'. Personally, I would perfer if `character' would mean the same thing in all contexts. I would suggest that we restore the old meaning of `character', drop `base-char', and add a new type class, say `key-event', that could include things like ?\M-\C-x. -- Anders On Fri, Dec 4, 2015 at 2:30 PM, Stefan Monnier wrote: > > I just realised that the underlying problem is a change to `cl-typecase'. > > It treats -50 as a character. > > > > (cl-typecase -50 > > (character "A character") > > (fixnum "A fixnum") > > (t "Something else")) > > > > Emacs 25 returns "A character" and emacs 24 "A fixnum". > > I installed the patch below which should fix this. > > > Stefan > > > diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el > index 09d2d3f..c8aad3a 100644 > --- a/lisp/emacs-lisp/cl-macs.el > +++ b/lisp/emacs-lisp/cl-macs.el > @@ -2885,7 +2885,7 @@ cl--macroexp-fboundp > (put 'real 'cl-deftype-satisfies #'numberp) > (put 'fixnum 'cl-deftype-satisfies #'integerp) > (put 'base-char 'cl-deftype-satisfies #'characterp) > -(put 'character 'cl-deftype-satisfies #'integerp) > +(put 'character 'cl-deftype-satisfies #'natnump) > > > ;;;###autoload > --001a114405c655e4fd0526145896 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

This should solve the immediate pro= blem with negative numbers.

However, I gave this s= ome though and realised that there is still a problem with large numbers. F= or example:

(cl-typecase (+ (max-char) 1)
=C2=A0 (character "A character")
=C2=A0 (fixnum = "A fixnum")
=C2=A0 (t "Something else"))

Returns "A character".

<= /div>
However, "(format "%c" (+ (max-char) 1))" rai= ses the error "(wrong-type-argument characterp 4194304)".

The question is if `cl-typecase', `format', and `= characterp' should have the same definition on what a character is. If = not, then ERT must be modified to handle this, e.g. by using `base-char'= ; rather than `character'.

Personally, I would= perfer if `character' would mean the same thing in all contexts. I wou= ld suggest that we restore the old meaning of `character', drop `base-c= har', and add a new type class, say `key-event', that could include= things like ?\M-\C-x.

=C2=A0 =C2=A0 -- Anders

On Fri, D= ec 4, 2015 at 2:30 PM, Stefan Monnier <monnier@iro.umontreal.ca= > wrote:
> = I just realised that the underlying problem is a change to `cl-typecase'= ;.
> It treats -50 as a character.
>
> (cl-typecase -50
>=C2=A0 =C2=A0(character "A character")
>=C2=A0 =C2=A0(fixnum "A fixnum")
>=C2=A0 =C2=A0(t "Something else"))
>
> Emacs 25 returns "A character" and emacs 24 "A fixnum&q= uot;.

I installed the patch below which should fix this.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan


diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 09d2d3f..c8aad3a 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2885,7 +2885,7 @@ cl--macroexp-fboundp
=C2=A0(put 'real 'cl-deftype-satisfies #'numberp)
=C2=A0(put 'fixnum 'cl-deftype-satisfies #'integerp)
=C2=A0(put 'base-char 'cl-deftype-satisfies #'characterp)
-(put 'character 'cl-deftype-satisfies #'integerp)
+(put 'character 'cl-deftype-satisfies #'natnump)


=C2=A0;;;###autoload

--001a114405c655e4fd0526145896-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 12:36:59 2015 Received: (at 21701) by debbugs.gnu.org; 4 Dec 2015 17:37:00 +0000 Received: from localhost ([127.0.0.1]:39310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4uHz-0002o6-Kz for submit@debbugs.gnu.org; Fri, 04 Dec 2015 12:36:59 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:42386) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4uHw-0002nv-OU for 21701@debbugs.gnu.org; Fri, 04 Dec 2015 12:36:57 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CvCwA731xV/yr292hcgxCEAsEMCYdHBAQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEIAgEfizqFBQeELQWGaIVIL6glI4I7gVsggngBAQE X-IPAS-Result: A0CvCwA731xV/yr292hcgxCEAsEMCYdHBAQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEIAgEfizqFBQeELQWGaIVIL6glI4I7gVsggngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="184491038" Received: from 104-247-246-42.cpe.teksavvy.com (HELO pastel.home) ([104.247.246.42]) by ironport2-out.teksavvy.com with ESMTP; 04 Dec 2015 12:36:55 -0500 Received: by pastel.home (Postfix, from userid 20848) id C034D61753; Fri, 4 Dec 2015 12:36:55 -0500 (EST) From: Stefan Monnier To: Anders Lindgren Subject: Re: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) Message-ID: References: Date: Fri, 04 Dec 2015 12:36:55 -0500 In-Reply-To: (Anders Lindgren's message of "Fri, 4 Dec 2015 16:41:46 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21701 Cc: 21701@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) > However, "(format "%c" (+ (max-char) 1))" raises the error > The question is if `cl-typecase', `format', and `characterp' should have > the same definition on what a character is. characterp corresponds to `base-char', at least if we want cl-* functions to follow the Common-Lisp semantics. > If not, then ERT must be modified to handle this, e.g. by using > `base-char' rather than `character'. That's indeed what should be done if ERT needs this to be a plain character that can inserted in a string. Common-Lisp's `character' includes not just characters but also "characters with modifiers" such as ?\M-\H-=E9, which can't appear in a string and are rejected by `characterp'. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 13:17:20 2015 Received: (at 21701) by debbugs.gnu.org; 4 Dec 2015 18:17:20 +0000 Received: from localhost ([127.0.0.1]:39342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4uv1-0003mb-Sg for submit@debbugs.gnu.org; Fri, 04 Dec 2015 13:17:20 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:64951) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4uuz-0003mS-EB for 21701@debbugs.gnu.org; Fri, 04 Dec 2015 13:17:17 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CvCwA731xV/yr292hcgxCEAsEMCYdHBAQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEIAgEfizqFBQeELQWGaIVIL6glI4IKHBWBWyCCeAEBAQ X-IPAS-Result: A0CvCwA731xV/yr292hcgxCEAsEMCYdHBAQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEIAgEfizqFBQeELQWGaIVIL6glI4IKHBWBWyCCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="184495577" Received: from 104-247-246-42.cpe.teksavvy.com (HELO pastel.home) ([104.247.246.42]) by ironport2-out.teksavvy.com with ESMTP; 04 Dec 2015 13:17:17 -0500 Received: by pastel.home (Postfix, from userid 20848) id 8E47E61753; Fri, 4 Dec 2015 13:17:16 -0500 (EST) From: Stefan Monnier To: Anders Lindgren Subject: Re: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) Message-ID: References: Date: Fri, 04 Dec 2015 13:17:16 -0500 In-Reply-To: (Stefan Monnier's message of "Fri, 04 Dec 2015 12:36:55 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21701 Cc: 21701@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) > That's indeed what should be done if ERT needs this to be a plain > character that can inserted in a string. Common-Lisp's `character' > includes not just characters but also "characters with modifiers" such > as ?\M-\H-=E9, which can't appear in a string and are rejected by > `characterp'. I installed a patch which makes ERT use pcase over cl-typecase. In most cases it doesn't make a big difference, but in a few spots, it is cleaner because a subsequent cl-destructuring-bind can be merged into it (and it got rid of those places where we used (member :foo) as a type to just check equality, which is rather inefficient). Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 14:42:56 2015 Received: (at 21701) by debbugs.gnu.org; 4 Dec 2015 19:42:56 +0000 Received: from localhost ([127.0.0.1]:39411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4wFr-0005tM-Tu for submit@debbugs.gnu.org; Fri, 04 Dec 2015 14:42:56 -0500 Received: from mail-vk0-f43.google.com ([209.85.213.43]:35505) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4wFp-0005tC-UQ for 21701@debbugs.gnu.org; Fri, 04 Dec 2015 14:42:54 -0500 Received: by vkha189 with SMTP id a189so71804213vkh.2 for <21701@debbugs.gnu.org>; Fri, 04 Dec 2015 11:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KOzQT9vnTXIqlxW1n8J3RYr0Nz3UuP1vvYZQMPzzBVA=; b=bLauSm4dUv8hm5YEssdOG/9ohvHrQIK1eooBGKm2apUqhaSdc+NMQ/zp1EhSy40Le+ iv0ZszPFezevpMFdzdXTTrbZVvTMsIpD6IAODFdgqt6HPBuSEz48tklHxnd3A2mutIHO xlRotGR6FaPzddabQRyHpexyHJPjmw2ftqMqHEZmO83AMKx3C1vgir3V2yrelcbDq5tl NxmK90FfkfNFzc6bdv2C4zBom5hljj587eDeI5fYB21CbUbowaz0CmUaUuyDAg0Ctbaw 7NNUnpL38xaoasTszR9ejlrxF+R5qsn7jXD/c619lAUyZHmIQTa5XZg96tWekIp5LW+b 0tng== MIME-Version: 1.0 X-Received: by 10.31.152.207 with SMTP id a198mr11561225vke.68.1449258173458; Fri, 04 Dec 2015 11:42:53 -0800 (PST) Received: by 10.31.210.133 with HTTP; Fri, 4 Dec 2015 11:42:53 -0800 (PST) In-Reply-To: References: Date: Fri, 4 Dec 2015 20:42:53 +0100 Message-ID: Subject: Re: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) From: Anders Lindgren To: Stefan Monnier Content-Type: multipart/alternative; boundary=001a113d39e29defcd052617b655 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21701 Cc: 21701@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.7 (/) --001a113d39e29defcd052617b655 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! I assumed that `characterp' and the `character' type class was connected in Common Lisp. If they aren't I guess the current system makes sense. I downloaded the ert changes and ran all my local tests and I haven't seen any problems. Thanks! -- Anders On Fri, Dec 4, 2015 at 7:17 PM, Stefan Monnier wrote: > > That's indeed what should be done if ERT needs this to be a plain > > character that can inserted in a string. Common-Lisp's `character' > > includes not just characters but also "characters with modifiers" such > > as ?\M-\H-=C3=A9, which can't appear in a string and are rejected by > > `characterp'. > > I installed a patch which makes ERT use pcase over cl-typecase. > In most cases it doesn't make a big difference, but in a few spots, it > is cleaner because a subsequent cl-destructuring-bind can be merged into > it (and it got rid of those places where we used (member :foo) > as a type to just check equality, which is rather inefficient). > > > Stefan > --001a113d39e29defcd052617b655 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

I assumed that `characterp' and= the `character' type class was connected in Common Lisp. If they aren&= #39;t I guess the current system makes sense.

I do= wnloaded the ert changes and ran all my local tests and I haven't seen = any problems.

Thanks!

=C2= =A0 =C2=A0 -- Anders

On Fri, Dec 4, 2015 at 7:17 PM, Stefan Monnier <= monnier@iro.umontreal.ca> wrote:
> That's indeed what should be done if ERT ne= eds this to be a plain
> character that can inserted in a string.=C2=A0 Common-Lisp's `char= acter'
> includes not just characters but also "characters with modifiers&= quot; such
> as ?\M-\H-=C3=A9, which can't appear in a string and are rejected = by
> `characterp'.

I installed a patch which makes ERT use pcase over cl-typecase.
In most cases it doesn't make a big difference, but in a few spots, it<= br> is cleaner because a subsequent cl-destructuring-bind can be merged into it (and it got rid of those places where we used (member :foo)
as a type to just check equality, which is rather inefficient).


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--001a113d39e29defcd052617b655-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 16:08:37 2015 Received: (at 21701) by debbugs.gnu.org; 4 Dec 2015 21:08:37 +0000 Received: from localhost ([127.0.0.1]:39446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4xam-0007s7-VH for submit@debbugs.gnu.org; Fri, 04 Dec 2015 16:08:37 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:24664) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4xaS-0007rc-ME for 21701@debbugs.gnu.org; Fri, 04 Dec 2015 16:08:35 -0500 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id tB4L8E2W020383 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Dec 2015 21:08:15 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id tB4L8CEo025503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 4 Dec 2015 21:08:13 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id tB4L8CMH021658; Fri, 4 Dec 2015 21:08:12 GMT MIME-Version: 1.0 Message-ID: <205686f5-2edb-4ab7-b9dd-82f03fbfb194@default> Date: Fri, 4 Dec 2015 13:08:10 -0800 (PST) From: Drew Adams To: Anders Lindgren , Stefan Monnier Subject: RE: bug#21701: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: multipart/alternative; boundary="__1449263292188310449abhmp0012.oracle.com" X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21701 Cc: 21701@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (--) --__1449263292188310449abhmp0012.oracle.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable A reasonable guess.It might make sense to add a note to the Elisp manual, i= n node `Character Type' or node `Character Codes' (where we talk about `cha= racterp'), or both, to point out that Emacs Lisp characters are not the sam= e as Common Lisp chars. =C2=A0 I assumed that `characterp' and the `character' type class was connected in= Common Lisp. If they aren't I guess the current system makes sense. --__1449263292188310449abhmp0012.oracle.com Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

A re= asonable guess.It might make sense to add a note to the Elisp manual, in no= de `Character Type' or node `Character Codes' (where we talk about `charact= erp'), or both, to point out that Emacs Lisp characters are not the same as= Common Lisp chars.

 

I assume= d that `characterp' and the `character' type class was connected in Common = Lisp. If they aren't I guess the current system makes sense.

=
--__1449263292188310449abhmp0012.oracle.com-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 16:25:54 2015 Received: (at 21701) by debbugs.gnu.org; 4 Dec 2015 21:25:54 +0000 Received: from localhost ([127.0.0.1]:39451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4xrV-0008Fz-OB for submit@debbugs.gnu.org; Fri, 04 Dec 2015 16:25:53 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:37174) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4xrT-0008Fn-JG for 21701@debbugs.gnu.org; Fri, 04 Dec 2015 16:25:52 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CtCwA731xV/yr292hcgxCEAsEMCYdLBAICgTw5FAEBAQEBAQGBCkEFg10BAQMBViMFCwsOJhIUGA0kiDcIzyMBAQEHAQEBAR6LOoUFB4QtBYwwqFQjgjuBWyCCeAEBAQ X-IPAS-Result: A0CtCwA731xV/yr292hcgxCEAsEMCYdLBAICgTw5FAEBAQEBAQGBCkEFg10BAQMBViMFCwsOJhIUGA0kiDcIzyMBAQEHAQEBAR6LOoUFB4QtBYwwqFQjgjuBWyCCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="184514282" Received: from 104-247-246-42.cpe.teksavvy.com (HELO pastel.home) ([104.247.246.42]) by ironport2-out.teksavvy.com with ESMTP; 04 Dec 2015 16:25:50 -0500 Received: by pastel.home (Postfix, from userid 20848) id B94AF61753; Fri, 4 Dec 2015 16:25:50 -0500 (EST) From: Stefan Monnier To: Anders Lindgren Subject: Re: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) Message-ID: References: Date: Fri, 04 Dec 2015 16:25:50 -0500 In-Reply-To: (Anders Lindgren's message of "Fri, 4 Dec 2015 20:42:53 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21701 Cc: 21701@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) > I assumed that `characterp' and the `character' type class was connected in > Common Lisp. They are. The CLHS says: (characterp object) == (typep object 'character) In Elisp that would translate to (cl-characterp object) == (cl-typep object 'character) But cl-lib does not define cl-characterp and Elisp defines characterp differently than Common-Lisp. > If they aren't I guess the current system makes sense. I think the current system can't make complete sense, sadly, because of such subtle incompatibility between Elisp and Common Lisp. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 16:32:47 2015 Received: (at 21701) by debbugs.gnu.org; 4 Dec 2015 21:32:47 +0000 Received: from localhost ([127.0.0.1]:39460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4xyA-0008Qj-SM for submit@debbugs.gnu.org; Fri, 04 Dec 2015 16:32:47 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:39258) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4xy8-0008Qb-OH for 21701@debbugs.gnu.org; Fri, 04 Dec 2015 16:32:45 -0500 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id tB4LWhgS019933 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Dec 2015 21:32:44 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id tB4LWhuD015381 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 4 Dec 2015 21:32:43 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id tB4LWgSY000652; Fri, 4 Dec 2015 21:32:43 GMT MIME-Version: 1.0 Message-ID: Date: Fri, 4 Dec 2015 13:32:41 -0800 (PST) From: Drew Adams To: Stefan Monnier , Anders Lindgren Subject: RE: bug#21701: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21701 Cc: 21701@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (--) > (cl-characterp object) =3D=3D (cl-typep object 'character) >=20 > But cl-lib does not define cl-characterp Perhaps it should. And then the doc should point out that in Emacs Lisp, `cl-characterp' !=3D `characterp'. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 17:58:13 2015 Received: (at 21701) by debbugs.gnu.org; 4 Dec 2015 22:58:13 +0000 Received: from localhost ([127.0.0.1]:39479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4zIr-00024S-1j for submit@debbugs.gnu.org; Fri, 04 Dec 2015 17:58:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59366) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4zIo-00024K-PQ for 21701@debbugs.gnu.org; Fri, 04 Dec 2015 17:58:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4zIo-0002RZ-1W for 21701@debbugs.gnu.org; Fri, 04 Dec 2015 17:58:10 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4zIk-0002Py-TE; Fri, 04 Dec 2015 17:58:06 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1a4zIk-00049m-1g; Fri, 04 Dec 2015 17:58:06 -0500 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#21701: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) References: X-Spook: Ceridian Albanian Comirex PET Treasury Bin Laden X-Ran: vYaRBW|]OrhZ>P(HB=+O+[1&QYva7w0gxWXq_chnV'wNtvD X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 04 Dec 2015 17:58:05 -0500 In-Reply-To: (Stefan Monnier's message of "Fri, 04 Dec 2015 13:17:16 -0500") Message-ID: <98d1ul4y9u.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 21701 Cc: 21701@debbugs.gnu.org, Anders Lindgren X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.0 (-----) Stefan Monnier wrote: > I installed a patch which makes ERT use pcase over cl-typecase. This causes test failures. http://hydra.nixos.org/build/28477383 http://hydra.nixos.org/build/28477383/log/raw FAILED ert-test-equal-including-properties FAILED ert-test-explain-equal FAILED ert-test-explain-equal-improper-list FAILED ert-test-explain-equal-string-properties FAILED ert-test-plist-difference-explanation FAILED ert-test-run-tests-interactively FAILED ert-test-run-tests-interactively-2 From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 05 10:08:45 2015 Received: (at 21701) by debbugs.gnu.org; 5 Dec 2015 15:08:45 +0000 Received: from localhost ([127.0.0.1]:39991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5ES5-0003dp-7n for submit@debbugs.gnu.org; Sat, 05 Dec 2015 10:08:45 -0500 Received: from mail-vk0-f53.google.com ([209.85.213.53]:35042) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a5ERj-0003dD-Tj for 21701@debbugs.gnu.org; Sat, 05 Dec 2015 10:08:42 -0500 Received: by vkha189 with SMTP id a189so81331195vkh.2 for <21701@debbugs.gnu.org>; Sat, 05 Dec 2015 07:08:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LRZpi1Ju4PMMSTHi6rSrRL3FdI33rN6jCbN9Nvugbrg=; b=CEbRc9r1ypADGVw82XzTG/VQdzz16ZXcJFgkSouG8AKlFAj1RVrSQ0290a5HJyvZ26 8y0nE/sYRIIVyblmc44ufEJXAi8kp43tXd0iQE9O+EDgJhhWa/GkQc+Pg0BX7D5iM6aE +SajdR8IPHrufbchpdc9c88CtIPmfSmvLJlu1zuROy+Ml5/YcqLbf/eUqgiMgCWwXT+t I2PPHdA93yk6m5/C38fZ0M94wTrj39zDceJOOa9FV5B9euzl2vqB3H5J2hxsc2JspEab 5Nj48MJOpz/st443foQAceESep0lfUrlh+nqmk0E1+2x9t4u1bxLvo5dTliR8gI7PBW9 fUlQ== MIME-Version: 1.0 X-Received: by 10.31.138.20 with SMTP id m20mr14410515vkd.70.1449328103461; Sat, 05 Dec 2015 07:08:23 -0800 (PST) Received: by 10.31.210.133 with HTTP; Sat, 5 Dec 2015 07:08:23 -0800 (PST) In-Reply-To: <98d1ul4y9u.fsf@fencepost.gnu.org> References: <98d1ul4y9u.fsf@fencepost.gnu.org> Date: Sat, 5 Dec 2015 16:08:23 +0100 Message-ID: Subject: Re: bug#21701: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) From: Anders Lindgren To: Glenn Morris Content-Type: multipart/mixed; boundary=001a1144f922c532de052627feac X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21701 Cc: 21701@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.7 (/) --001a1144f922c532de052627feac Content-Type: multipart/alternative; boundary=001a1144f922c532d6052627feaa --001a1144f922c532d6052627feaa Content-Type: text/plain; charset=UTF-8 Hi, Two of the problems can be fixed with the attached patch. The third, `ert-test-record-backtrace' in `ert-tests.el' seems to compare backtrace output -- I haven't looked it as I have no idea what it is supposed to test. -- Anders On Fri, Dec 4, 2015 at 11:58 PM, Glenn Morris wrote: > Stefan Monnier wrote: > > > I installed a patch which makes ERT use pcase over cl-typecase. > > This causes test failures. > > http://hydra.nixos.org/build/28477383 > http://hydra.nixos.org/build/28477383/log/raw > > > FAILED ert-test-equal-including-properties > FAILED ert-test-explain-equal > FAILED ert-test-explain-equal-improper-list > FAILED ert-test-explain-equal-string-properties > FAILED ert-test-plist-difference-explanation > FAILED ert-test-run-tests-interactively > FAILED ert-test-run-tests-interactively-2 > --001a1144f922c532d6052627feaa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

Two of the problems can be fixed wi= th the attached patch.

The third, `ert-test-record= -backtrace' in `ert-tests.el' seems to compare backtrace output -- = I haven't looked it as I have no idea what it is supposed to test.

=C2=A0 =C2=A0 -- Anders

On Fri, Dec 4, 2015 at 11:58 PM, Gle= nn Morris <rgm@gnu.org> wrote:
S= tefan Monnier wrote:

> I installed a patch which makes ERT use pcase over cl-typecase.

This causes test failures.

http://hydra.nixos.org/build/28477383
http://hydra.nixos.org/build/28477383/log/raw


=C2=A0 =C2=A0FAILED=C2=A0 ert-test-equal-including-properties
=C2=A0 =C2=A0FAILED=C2=A0 ert-test-explain-equal
=C2=A0 =C2=A0FAILED=C2=A0 ert-test-explain-equal-improper-list
=C2=A0 =C2=A0FAILED=C2=A0 ert-test-explain-equal-string-properties
=C2=A0 =C2=A0FAILED=C2=A0 ert-test-plist-difference-explanation
=C2=A0 =C2=A0FAILED=C2=A0 ert-test-run-tests-interactively
=C2=A0 =C2=A0FAILED=C2=A0 ert-test-run-tests-interactively-2

--001a1144f922c532d6052627feaa-- --001a1144f922c532de052627feac Content-Type: text/plain; charset=US-ASCII; name="ert.diff" Content-Disposition: attachment; filename="ert.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iht8iiua0 ZGlmZiAtLWdpdCBhL2xpc3AvZW1hY3MtbGlzcC9lcnQuZWwgYi9saXNwL2VtYWNzLWxpc3AvZXJ0 LmVsCmluZGV4IGE3NWIyM2IuLjAyYWU0MWIgMTAwNjQ0Ci0tLSBhL2xpc3AvZW1hY3MtbGlzcC9l cnQuZWwKKysrIGIvbGlzcC9lbWFjcy1saXNwL2VydC5lbApAQCAtNTE1LDcgKzUxNSw3IEBAIGVy dC0tZXhwbGFpbi1lcXVhbC1yZWMKICAgICAgICAgICAgICAgICAgIGZvciB4aSA9IChlcnQtLWV4 cGxhaW4tZXF1YWwtcmVjIGFpIGJpKQogICAgICAgICAgICAgICAgICAgZG8gKHdoZW4geGkgKGNs LXJldHVybiBgKGFycmF5LWVsdCAsaSAseGkpKSkKICAgICAgICAgICAgICAgICAgIGZpbmFsbHkg KGNsLWFzc2VydCAoZXF1YWwgYSBiKSB0KSkpKQotICAgICAgKChwcmVkIGF0b21wKQorICAgICAg KChwcmVkIGF0b20pCiAgICAgICAgKGlmIChub3QgKGVxdWFsIGEgYikpCiAgICAgICAgICAgIChp ZiAoYW5kIChzeW1ib2xwIGEpIChzeW1ib2xwIGIpIChzdHJpbmc9IGEgYikpCiAgICAgICAgICAg ICAgICBgKGRpZmZlcmVudC1zeW1ib2xzLXdpdGgtdGhlLXNhbWUtbmFtZSAsYSAsYikKQEAgLTEw NzEsNyArMTA3MSw3IEBAIGVydC0taW5zZXJ0LWh1bWFuLXJlYWRhYmxlLXNlbGVjdG9yCiAgICAg ICAgICAgICAgICAgICAgICAobWFrZS1zeW1ib2wgIjx1bm5hbWVkIHRlc3Q+IikpKQogICAgICAg ICAgICAgICAgICAgKGAoLG9wZXJhdG9yIC4gLG9wZXJhbmRzKQogICAgICAgICAgICAgICAgICAg IChwY2FzZSBvcGVyYXRvcgotICAgICAgICAgICAgICAgICAgICAgKChvciAnZXFsICdhbmQgJ25v dCAnb3IpCisgICAgICAgICAgICAgICAgICAgICAoKG9yICdtZW1iZXIgJ2VxbCAnYW5kICdub3Qg J29yKQogICAgICAgICAgICAgICAgICAgICAgIGAoLG9wZXJhdG9yICxAKG1hcGNhciAjJ3JlYyBv cGVyYW5kcykpKQogICAgICAgICAgICAgICAgICAgICAgKChvciAndGFnICdzYXRpc2ZpZXMpCiAg ICAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3IpKSkpKSkK --001a1144f922c532de052627feac-- From unknown Fri Jun 20 18:24:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 03 Jan 2016 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