From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58531: 29.0.50; Wrong predicate used by map-elt gv getter Date: Sat, 15 Oct 2022 00:45:02 +0300 Message-ID: <87r0zaxeox.fsf@tcd.ie> Reply-To: "Basil L. Contovounesios" Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30428"; mail-complaints-to="usenet@ciao.gmane.io" To: 58531@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 14 23:46:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojSVV-0007h1-V6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 23:46:18 +0200 Original-Received: from localhost ([::1]:55412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojSVU-0004DG-DC for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 17:46:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojSVH-0004AZ-49 for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 17:46:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojSVG-00018Q-Ql for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 17:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojSVG-0000p8-JB for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 17:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 21:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58531 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16657839183093 (code B ref -1); Fri, 14 Oct 2022 21:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Oct 2022 21:45:18 +0000 Original-Received: from localhost ([127.0.0.1]:38853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojSUX-0000np-Dt for submit@debbugs.gnu.org; Fri, 14 Oct 2022 17:45:17 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:44046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojSUV-0000nh-3L for submit@debbugs.gnu.org; Fri, 14 Oct 2022 17:45:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojSUT-0003px-Q8 for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 17:45:14 -0400 Original-Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:39690) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojSUQ-00013w-KE for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 17:45:13 -0400 Original-Received: by mail-ej1-x636.google.com with SMTP id b2so13183139eja.6 for ; Fri, 14 Oct 2022 14:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=s2i9MZkYujSsLiD1jtDVUcJ/1XL4Q2191lRpRr3sENI=; b=XW4EpWVer6wW1kxT9BMaJykw8kwVjh3Aqc7uBmu2dtiKhLfFVEOUk9nS0yb9UKcb4f 7Rlh4wl+NYLcTb4vBPC/NnPj0ydL3mrKb309xyo+pc2moXR/ykBS0fV7yk9mhPc+CHMP 2s3w3TQshieStL0htjhLf/tLWWp/S5MAkP8QI9e1dAyJJ5HAfDUha5BehaPNnfoZceWh /vnzguxeDz5HTcyJaqT+VEXjHHHVMc3DjmoTFt/yQ3rMsa7oKMgzfrAHqghX4AJJzWVM wp4CGk3O3AL+oEkHFPTylcvPGU7YrxdLBIAi+YmJkhYN8PvEtALZ9JG1KPzTe/vhnWCh +p9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=s2i9MZkYujSsLiD1jtDVUcJ/1XL4Q2191lRpRr3sENI=; b=uSgkdvzLIPeU0waR9CQlffNGVqA0GAqljHjRKMyON5X1MkSxWMFQZeCVWjdSfYBSsD +TvOv1Txf2V/OIwgG7deKkga2nfWQW+Upy7/Gd/qdePosGzA4LTQ2zLFlnjMm9s04fIF qO2QRERV3Tr14VDhuHaC1e/tjObogWOLHtSEoYwpHODzxizJbCqf3HmHqQdiva+sMEJq TMmssKeuJKcw1YynHeoJyivEXOmsVc8ssaTvS26bD1ZwLOSSH2Cqrg4bfcHCeR6XfeUq 4luY/8VBPm5bseofcp/TdgYG9w1k+rCJonm0r2YLeZIXL2YpMPJw4c0ki5TXOaXhWexw h9rw== X-Gm-Message-State: ACrzQf1V01Jh063a1nmfab8BnzDVfF3TDqARVLuCHdMp0JTmVCINc/kO O+3NXUDLSmYEF6Gyq5hKlx/RFnoWIgeE5g== X-Google-Smtp-Source: AMsMyM7LvDV6Swwlc2OGsZA5eYz1GY3p4/ilEIE7DMXnmmySg7YF9Ytw11xU0XFbOOGfyZQmaOZqKg== X-Received: by 2002:a17:907:6088:b0:78d:8e24:40d0 with SMTP id ht8-20020a170907608800b0078d8e2440d0mr7391ejc.590.1665783904893; Fri, 14 Oct 2022 14:45:04 -0700 (PDT) Original-Received: from localhost ([2a02:587:321f:7e8a:d9:365a:ced1:b3d1]) by smtp.gmail.com with ESMTPSA id u18-20020a170906951200b0072ed9efc9dfsm2136927ejx.48.2022.10.14.14.45.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 14:45:03 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=contovob@tcd.ie; helo=mail-ej1-x636.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245491 Archived-At: --=-=-= Content-Type: text/plain 0. emacs -Q 1. M-x load-library RET map RET 2. (let ((l (list (cons 'a 1)))) (setf (map-elt l "a" nil #'string=) 2) l) C-j This correctly gives ((a . 2)). 3. (let ((l (list (cons 'a 1)))) (cl-incf (map-elt l "a" nil #'string=)) l) C-j This gives the following backtrace: --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=backtrace.txt Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) +(nil 1) (let* ((v (+ (map-elt l "a" nil) 1))) (condition-case nil (with-no-warnings (map-put! l "a" v #'string=)) (map-not-inplace (setq l (map-insert l "a" v)) v))) (let ((l (list (cons 'a 1)))) (let* ((v (+ (map-elt l "a" nil) 1))) (condition-case nil (with-no-warnings (map-put! l "a" v #'string=)) (map-not-inplace (setq l (map-insert l "a" v)) v))) l) (progn (let ((l (list (cons 'a 1)))) (let* ((v (+ (map-elt l "a" nil) 1))) (condition-case nil (with-no-warnings (map-put! l "a" v #'string=)) (map-not-inplace (setq l (map-insert l "a" v)) v))) l)) eval((progn (let ((l (list (cons 'a 1)))) (let* ((v (+ (map-elt l "a" nil) 1))) (condition-case nil (with-no-warnings (map-put! l "a" v #'string=)) (map-not-inplace (setq l (map-insert l "a" v)) v))) l)) t) elisp--eval-last-sexp(t) eval-last-sexp(t) eval-print-last-sexp(nil) funcall-interactively(eval-print-last-sexp nil) call-interactively(eval-print-last-sexp nil nil) command-execute(eval-print-last-sexp) --=-=-= Content-Type: text/plain Whereas it should give the same result as step 2. Patch to follow. Thanks, -- Basil In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2022-10-14 built on tia Repository revision: cbd04ad3d572850775f18bde868c71abcde733ed Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure 'CFLAGS=-Og -ggdb3' -C --prefix=/home/blc/.local --enable-checking=structs --with-file-notification=yes --with-x-toolkit=lucid --with-x' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LANG: en_IE.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Debugger Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-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 buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree cl-print debug backtrace help-mode cl-macs map byte-opt gv bytecomp byte-compile cconv thingatpt cl-loaddefs cl-lib find-func rmc iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine 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 composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 51573 5638) (symbols 48 6489 0) (strings 32 18774 1872) (string-bytes 1 537756) (vectors 16 12706) (vector-slots 8 181823 10539) (floats 8 29 46) (intervals 56 370 2) (buffers 1000 11)) --=-=-=--