From unknown Fri Aug 15 04:04:46 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#47572 <47572@debbugs.gnu.org> To: bug#47572 <47572@debbugs.gnu.org> Subject: Status: 27.1; (setf (map-elt m key) value) should return value but does not Reply-To: bug#47572 <47572@debbugs.gnu.org> Date: Fri, 15 Aug 2025 11:04:46 +0000 retitle 47572 27.1; (setf (map-elt m key) value) should return value but do= es not reassign 47572 emacs submitter 47572 Matt Armstrong severity 47572 normal tag 47572 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 02 17:08:33 2021 Received: (at submit) by debbugs.gnu.org; 2 Apr 2021 21:08:33 +0000 Received: from localhost ([127.0.0.1]:32962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSR1s-00043p-4m for submit@debbugs.gnu.org; Fri, 02 Apr 2021 17:08:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:51740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSR1p-00043e-Kt for submit@debbugs.gnu.org; Fri, 02 Apr 2021 17:08:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSR1p-0001Xo-GC for bug-gnu-emacs@gnu.org; Fri, 02 Apr 2021 17:08:29 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:39409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSR1l-0008Ga-UT for bug-gnu-emacs@gnu.org; Fri, 02 Apr 2021 17:08:29 -0400 X-Originating-IP: 24.113.169.116 Received: from mdeb (24-113-169-116.wavecable.com [24.113.169.116]) (Authenticated sender: matt@rfc20.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id E56FD60004 for ; Fri, 2 Apr 2021 21:08:20 +0000 (UTC) Received: from matt by mdeb with local (Exim 4.94) (envelope-from ) id 1lSR1c-000FmN-Fr for bug-gnu-emacs@gnu.org; Fri, 02 Apr 2021 14:08:16 -0700 From: Matt Armstrong To: bug-gnu-emacs@gnu.org Subject: 27.1; (setf (map-elt m key) value) should return value but does not Date: Fri, 02 Apr 2021 14:08:16 -0700 Message-ID: <87eefsfl8f.fsf@rfc20.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=217.70.183.195; envelope-from=matt@rfc20.org; helo=relay3-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) 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.6 (--) --=-=-= Content-Type: text/plain Attached is an ert test that demonstrates the problem. The crux is that: (require 'map) (setf (map-elt m key) value) returns VALUE only in the hash table implementation. `setf' should return VALUE in all cases. For alists it returns either nil or (key . value) depending on whether a key is inserted or udpated in place. For plists it returns similarly variable things. Here is the output I get from the attached test. The .el is attached afterwards. F test-map-setf-alist-insert-key (ert-test-failed ((should (equal (setf (map-elt alist ...) 'value) 'value)) :form (equal ((key . value)) value) :value nil :explanation (different-types ((key . value)) value))) F test-map-setf-alist-overwrite-key (ert-test-failed ((should (equal (setf (map-elt alist ...) 'value2) 'value2)) :form (equal nil value2) :value nil :explanation (different-atoms nil value2))) F test-map-setf-plist-insert-key (ert-test-failed ((should (equal (setf (map-elt plist ...) 'value2) 'value2)) :form (equal (key value key2 value2) value2) :value nil :explanation (different-types (key value key2 value2) value2))) F test-map-setf-plist-overwrite-key (ert-test-failed ((should (equal (setf (map-elt plist ...) 'value2) 'value2)) :form (equal (key value2) value2) :value nil :explanation (different-types (key value2) value2))) --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=setf.el Content-Transfer-Encoding: quoted-printable (require 'map) (ert-deftest test-map-setf-alist-insert-key () (let ((alist)) (should (equal (setf (map-elt alist 'key) 'value) 'value)) (should (equal alist '((key . value)))))) (ert-deftest test-map-setf-alist-overwrite-key () (let ((alist '((key . value1)))) (should (equal (setf (map-elt alist 'key) 'value2) 'value2)) (should (equal alist '((key . value2)))))) (ert-deftest test-map-setf-plist-insert-key () (let ((plist '(key value))) (should (equal (setf (map-elt plist 'key2) 'value2) 'value2)) (should (equal plist '(key2 value2 key value))))) (ert-deftest test-map-setf-plist-overwrite-key () (let ((plist '(key value))) (should (equal (setf (map-elt plist 'key) 'value2) 'value2)) (should (equal plist '(key value2))))) (ert-deftest test-hash-table-setf-insert-key () (let ((ht (make-hash-table))) (should (equal (setf (map-elt ht 'key) 'value) 'value)) (should (equal (map-elt ht 'key) 'value)))) (ert-deftest test-hash-table-setf-overwrite-key () (let ((ht (make-hash-table))) (puthash 'key 'value1 ht) (should (equal (setf (map-elt ht 'key) 'value2) 'value2)) (should (equal (map-elt ht 'key) 'value2)))) =20=20 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cair= o version 1.16.0) of 2020-11-07, modified by Debian built on x86-ubc-01 Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 System Description: Debian GNU/Linux bullseye/sid Recent messages: Save file /home/matt/git/overplay/setf.el? (y, n, !, ., q, C-r, C-f, d or C= -h) y Saving file /home/matt/git/overplay/setf.el... Wrote /home/matt/git/overplay/setf.el Reverting buffer =E2=80=98setf.el=E2=80=99. Mark set Mark saved where search started Quit [2 times] Mark set Mark saved where search started Reverting buffer =E2=80=98setf.el=E2=80=99. [4 times] Configured using: 'configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:= /usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share= /emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/27.1/site-lisp:= /usr/local/share/emacs/site-lisp:/usr/share/emacs/27.1/site-lisp:/usr/share= /emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --with-cairo --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -fdebug-prefix-map=3D/build/emacs-6jKC2B/emacs-27.1+1=3D. -fstack-protecto= r-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: bug-reference-prog-mode: t msb-mode: t winner-mode: t auto-insert-mode: t display-time-mode: t keyfreq-autosave-mode: t keyfreq-mode: t icomplete-mode: t global-magit-file-mode: t magit-file-mode: t magit-auto-revert-mode: t global-auto-revert-mode: t global-git-commit-mode: t shell-dirtrack-mode: t which-key-mode: t override-global-mode: t show-paren-mode: t electric-pair-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-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 temp-buffer-resize-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /usr/share/emacs/site-lisp/elpa/bind-key-2.4/bind-key-pkg hides /usr/share/= emacs/site-lisp/elpa-src/bind-key-2.4/bind-key-pkg /usr/share/emacs/site-lisp/elpa/bind-key-2.4/bind-key-autoloads hides /usr/= share/emacs/site-lisp/elpa-src/bind-key-2.4/bind-key-autoloads /usr/share/emacs/site-lisp/elpa/bind-key-2.4/bind-key hides /usr/share/emac= s/site-lisp/elpa-src/bind-key-2.4/bind-key /usr/share/emacs/site-lisp/elpa/dash-2.17.0/dash-pkg hides /usr/share/emacs= /site-lisp/elpa-src/dash-2.17.0/dash-pkg /usr/share/emacs/site-lisp/elpa/dash-2.17.0/dash hides /usr/share/emacs/sit= e-lisp/elpa-src/dash-2.17.0/dash /usr/share/emacs/site-lisp/elpa/dash-2.17.0/dash-autoloads hides /usr/share= /emacs/site-lisp/elpa-src/dash-2.17.0/dash-autoloads /usr/share/emacs/site-lisp/elpa/diminish-0.45/diminish-autoloads hides /usr= /share/emacs/site-lisp/elpa-src/diminish-0.45/diminish-autoloads /usr/share/emacs/site-lisp/elpa/diminish-0.45/diminish-pkg hides /usr/share= /emacs/site-lisp/elpa-src/diminish-0.45/diminish-pkg /usr/share/emacs/site-lisp/elpa/diminish-0.45/diminish hides /usr/share/ema= cs/site-lisp/elpa-src/diminish-0.45/diminish /usr/share/emacs/site-lisp/elpa/git-commit-2.99.0/git-commit-autoloads hide= s /usr/share/emacs/site-lisp/elpa-src/git-commit-2.99.0/git-commit-autoloads /usr/share/emacs/site-lisp/elpa/git-commit-2.99.0/git-commit hides /usr/sha= re/emacs/site-lisp/elpa-src/git-commit-2.99.0/git-commit /usr/share/emacs/site-lisp/elpa/git-commit-2.99.0/git-commit-pkg hides /usr= /share/emacs/site-lisp/elpa-src/git-commit-2.99.0/git-commit-pkg /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-pull hides /usr/share/em= acs/site-lisp/elpa-src/magit-2.99.0/magit-pull /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-stash hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-stash /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-clone hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-clone /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-subtree hides /usr/share= /emacs/site-lisp/elpa-src/magit-2.99.0/magit-subtree /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-tag hides /usr/share/ema= cs/site-lisp/elpa-src/magit-2.99.0/magit-tag /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-bisect hides /usr/share/= emacs/site-lisp/elpa-src/magit-2.99.0/magit-bisect /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-reflog hides /usr/share/= emacs/site-lisp/elpa-src/magit-2.99.0/magit-reflog /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-remote hides /usr/share/= emacs/site-lisp/elpa-src/magit-2.99.0/magit-remote /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-status hides /usr/share/= emacs/site-lisp/elpa-src/magit-2.99.0/magit-status /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-branch hides /usr/share/= emacs/site-lisp/elpa-src/magit-2.99.0/magit-branch /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-mode hides /usr/share/em= acs/site-lisp/elpa-src/magit-2.99.0/magit-mode /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-merge hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-merge /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-obsolete hides /usr/shar= e/emacs/site-lisp/elpa-src/magit-2.99.0/magit-obsolete /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-sequence hides /usr/shar= e/emacs/site-lisp/elpa-src/magit-2.99.0/magit-sequence /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-patch hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-patch /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-utils hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-utils /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-autorevert hides /usr/sh= are/emacs/site-lisp/elpa-src/magit-2.99.0/magit-autorevert /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-notes hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-notes /usr/share/emacs/site-lisp/elpa/magit-2.99.0/git-rebase hides /usr/share/em= acs/site-lisp/elpa-src/magit-2.99.0/git-rebase /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-autoloads hides /usr/sha= re/emacs/site-lisp/elpa-src/magit-2.99.0/magit-autoloads /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-gitignore hides /usr/sha= re/emacs/site-lisp/elpa-src/magit-2.99.0/magit-gitignore /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-commit hides /usr/share/= emacs/site-lisp/elpa-src/magit-2.99.0/magit-commit /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-section hides /usr/share= /emacs/site-lisp/elpa-src/magit-2.99.0/magit-section /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-git hides /usr/share/ema= cs/site-lisp/elpa-src/magit-2.99.0/magit-git /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-reset hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-reset /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-pkg hides /usr/share/ema= cs/site-lisp/elpa-src/magit-2.99.0/magit-pkg /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-files hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-files /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-wip hides /usr/share/ema= cs/site-lisp/elpa-src/magit-2.99.0/magit-wip /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-push hides /usr/share/em= acs/site-lisp/elpa-src/magit-2.99.0/magit-push /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-repos hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-repos /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-blame hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-blame /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-transient hides /usr/sha= re/emacs/site-lisp/elpa-src/magit-2.99.0/magit-transient /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-refs hides /usr/share/em= acs/site-lisp/elpa-src/magit-2.99.0/magit-refs /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-log hides /usr/share/ema= cs/site-lisp/elpa-src/magit-2.99.0/magit-log /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-apply hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-apply /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-process hides /usr/share= /emacs/site-lisp/elpa-src/magit-2.99.0/magit-process /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-imenu hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-imenu /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-worktree hides /usr/shar= e/emacs/site-lisp/elpa-src/magit-2.99.0/magit-worktree /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-submodule hides /usr/sha= re/emacs/site-lisp/elpa-src/magit-2.99.0/magit-submodule /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-margin hides /usr/share/= emacs/site-lisp/elpa-src/magit-2.99.0/magit-margin /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-diff hides /usr/share/em= acs/site-lisp/elpa-src/magit-2.99.0/magit-diff /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-fetch hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-fetch /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-extras hides /usr/share/= emacs/site-lisp/elpa-src/magit-2.99.0/magit-extras /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-bookmark hides /usr/shar= e/emacs/site-lisp/elpa-src/magit-2.99.0/magit-bookmark /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-ediff hides /usr/share/e= macs/site-lisp/elpa-src/magit-2.99.0/magit-ediff /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-core hides /usr/share/em= acs/site-lisp/elpa-src/magit-2.99.0/magit-core /usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit hides /usr/share/emacs/s= ite-lisp/elpa-src/magit-2.99.0/magit /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-lib hides /usr/share= /emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-lib /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch hides /usr/share/ema= cs/site-lisp/elpa-src/notmuch-0.31.4/notmuch /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-show hides /usr/shar= e/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-show /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-message hides /usr/s= hare/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-message /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-address hides /usr/s= hare/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-address /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-company hides /usr/s= hare/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-company /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-tag hides /usr/share= /emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-tag /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-crypto hides /usr/sh= are/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-crypto /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-maildir-fcc hides /u= sr/share/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-maildir-fcc /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-hello hides /usr/sha= re/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-hello /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-autoloads hides /usr= /share/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-autoloads /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-wash hides /usr/shar= e/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-wash /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-parser hides /usr/sh= are/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-parser /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-query hides /usr/sha= re/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-query /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-draft hides /usr/sha= re/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-draft /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-jump hides /usr/shar= e/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-jump /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/coolj hides /usr/share/emacs= /site-lisp/elpa-src/notmuch-0.31.4/coolj /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-print hides /usr/sha= re/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-print /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-compat hides /usr/sh= are/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-compat /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-tree hides /usr/shar= e/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-tree /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-version hides /usr/s= hare/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-version /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-pkg hides /usr/share= /emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-pkg /usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-mua hides /usr/share= /emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch-mua /usr/share/emacs/site-lisp/elpa/slime-2.26.1/slime hides /usr/share/emacs/s= ite-lisp/elpa-src/slime-2.26.1/slime /usr/share/emacs/site-lisp/elpa/slime-2.26.1/slime-autoloads hides /usr/sha= re/emacs/site-lisp/elpa-src/slime-2.26.1/slime-autoloads /usr/share/emacs/site-lisp/elpa/slime-2.26.1/slime-pkg hides /usr/share/ema= cs/site-lisp/elpa-src/slime-2.26.1/slime-pkg /usr/share/emacs/site-lisp/elpa/slime-2.26.1/slime-tests hides /usr/share/e= macs/site-lisp/elpa-src/slime-2.26.1/slime-tests /usr/share/emacs/site-lisp/elpa/transient-0.2.0.30/transient hides /usr/sha= re/emacs/site-lisp/elpa-src/transient-0.2.0.30/transient /usr/share/emacs/site-lisp/elpa/transient-0.2.0.30/transient-autoloads hide= s /usr/share/emacs/site-lisp/elpa-src/transient-0.2.0.30/transient-autoloads /usr/share/emacs/site-lisp/elpa/transient-0.2.0.30/transient-pkg hides /usr= /share/emacs/site-lisp/elpa-src/transient-0.2.0.30/transient-pkg /usr/share/emacs/site-lisp/elpa/use-package-2.4.1/use-package-ensure hides = /usr/share/emacs/site-lisp/elpa-src/use-package-2.4.1/use-package-ensure /usr/share/emacs/site-lisp/elpa/use-package-2.4.1/use-package-delight hides= /usr/share/emacs/site-lisp/elpa-src/use-package-2.4.1/use-package-delight /usr/share/emacs/site-lisp/elpa/use-package-2.4.1/use-package-pkg hides /us= r/share/emacs/site-lisp/elpa-src/use-package-2.4.1/use-package-pkg /usr/share/emacs/site-lisp/elpa/use-package-2.4.1/use-package-bind-key hide= s /usr/share/emacs/site-lisp/elpa-src/use-package-2.4.1/use-package-bind-key /usr/share/emacs/site-lisp/elpa/use-package-2.4.1/use-package-diminish hide= s /usr/share/emacs/site-lisp/elpa-src/use-package-2.4.1/use-package-diminish /usr/share/emacs/site-lisp/elpa/use-package-2.4.1/use-package-lint hides /u= sr/share/emacs/site-lisp/elpa-src/use-package-2.4.1/use-package-lint /usr/share/emacs/site-lisp/elpa/use-package-2.4.1/use-package-autoloads hid= es /usr/share/emacs/site-lisp/elpa-src/use-package-2.4.1/use-package-autolo= ads /usr/share/emacs/site-lisp/elpa/use-package-2.4.1/use-package-jump hides /u= sr/share/emacs/site-lisp/elpa-src/use-package-2.4.1/use-package-jump /usr/share/emacs/site-lisp/elpa/use-package-2.4.1/use-package hides /usr/sh= are/emacs/site-lisp/elpa-src/use-package-2.4.1/use-package /usr/share/emacs/site-lisp/elpa/use-package-2.4.1/use-package-core hides /u= sr/share/emacs/site-lisp/elpa-src/use-package-2.4.1/use-package-core /usr/share/emacs/site-lisp/elpa/with-editor-3.0.2/with-editor-autoloads hid= es /usr/share/emacs/site-lisp/elpa-src/with-editor-3.0.2/with-editor-autolo= ads /usr/share/emacs/site-lisp/elpa/with-editor-3.0.2/with-editor hides /usr/sh= are/emacs/site-lisp/elpa-src/with-editor-3.0.2/with-editor /usr/share/emacs/site-lisp/elpa/with-editor-3.0.2/with-editor-pkg hides /us= r/share/emacs/site-lisp/elpa-src/with-editor-3.0.2/with-editor-pkg Features: (shadow sort mail-extr emacsbug sendmail trace flymake-proc flymake warnings two-column iso-transl etags fileloop cap-words superword subword cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs find-dired ffap grep compile edebug hackroexp pulse xref project cl-print ielm bug-reference face-remap mule-util checkdoc lisp-mnt magit-extras dabbrev eieio-opt speedbar sb-image ezimage dframe help-fns radix-tree misearch multi-isearch copyright msb bench-test ert pp ewoc debug backtrace bench pcase rx let-alist align vc-git tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat ls-lisp org-element avl-tree generator ol-w3m ol-rmail ol-mhe ol-irc ol-info ol-gnus nnir gnus-sum url url-proxy url-privacy url-expand url-methods url-history shr url-cookie url-domsuf url-util svg xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win gnus nnheader ol-eww ol-docview doc-view jka-compr image-mode exif ol-bibtex bibtex ol-bbdb winner cus-start cus-load org-protocol org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table org-keys org-loaddefs find-func notmuch hl-line notmuch-tree notmuch-jump notmuch-hello wid-edit notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-message notmuch-draft notmuch-maildir-fcc notmuch-address notmuch-company notmuch-parser notmuch-wash coolj notmuch-query goto-addr icalendar diary-lib diary-loaddefs cal-menu calendar cal-loaddefs notmuch-tag notmuch-lib notmuch-version notmuch-compat mm-view mml-smime smime dig mailcap edmacro kmacro protbuf ol-notmuch ol org-compat org-macs skeleton autoinsert time keyfreq icomplete highlight-symbol thingatpt magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff diff-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode git-commit transient magit-git magit-section magit-utils crm log-edit message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor shell pcomplete comint ansi-color ring server dash ido which-key advice cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core paren elec-pair finder-inf info slime-autoloads package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type 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 elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 815018 112088) (symbols 48 41019 1) (strings 32 204120 12260) (string-bytes 1 5745296) (vectors 16 67539) (vector-slots 8 846957 125852) (floats 8 660 654) (intervals 56 33671 2009) (buffers 1000 68)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 04 14:32:03 2021 Received: (at 47572) by debbugs.gnu.org; 4 Apr 2021 18:32:03 +0000 Received: from localhost ([127.0.0.1]:36446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lT7XX-0005UT-Hr for submit@debbugs.gnu.org; Sun, 04 Apr 2021 14:32:03 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:44745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lT7XQ-0005Tl-EW for 47572@debbugs.gnu.org; Sun, 04 Apr 2021 14:31:58 -0400 Received: by mail-wr1-f50.google.com with SMTP id c8so9115657wrq.11 for <47572@debbugs.gnu.org>; Sun, 04 Apr 2021 11:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=fBFYHMTPmH/MwW6SWtky8OOUVoT91wkybqc3Us35GkQ=; b=AxhuSmRxbg7/kBVTFzoMDbOoFgkLhSCGA+lAxotmrCmouY3DRYvyJIn36TJDhGQ6Y9 GBrR1N2b0GxvQNse65ILf0kulfW1dEiuKsViYqVtb+OHvUh8ogw3SuQBDD88Ro+0hjWb b/7J6T8HFk5C36xaQD6RotccZsHfV/m+Z5lu8nzj3OUO30CX1MgfCyheJi2b29HdmA9Q EHksOk01DHuqwss5uLmGvUJ/0auWlh/6msM2BgXSD1PWwMOLLmCCd9FiwuBfhfSciwvU tIbwXDT9VdqRjEDjVbAj0/ZSlZ1ov9U/O6r7B+ZGw9K1aaknTcnmpRDPWAwoj8CwAY23 cnHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=fBFYHMTPmH/MwW6SWtky8OOUVoT91wkybqc3Us35GkQ=; b=WS4vjW0nHsuw0Xy6v2N61gYp1rxz5HhWOAIRnp+yX8ocYIHjkfOUFxQ+UWz93QHDUe xK83V9OwgolT1O6Nb9Mz7Q8s5vNiSHqeLiK/BF1NGJDLDNFrsqQsbteBoowFW/TRLMx3 rKUDETnaLd1dy60OtZ/shtcxwEBHso6GWiX7oO4JRYxY9JnJ3u0IZmo4TiuaUiRukaUr IQ6TUyCiO9WldeRLQnYAXLMYnydVeMU+KiyNYFF/eiSjrWgJ3n1KfhxolfSnwQdN2sjT nA1uncPqNaQ6wN1dm6plFmxk6Ehi2o6N0VU98YYyBsFoQQwYaFAZuYqV6wIXdlfXHXa6 BW+Q== X-Gm-Message-State: AOAM531rL+jxalkUjhAv99XlYd07OHYDkFGZna/PQ91/8LyZ+1lKeyZN 7Pq4qD6OIb9KtkOuBIsd2JkA6w== X-Google-Smtp-Source: ABdhPJy4s4Os4g4BimrwPYqBTyuimIgHGv/Tw5pKTo9o45UC77Zx8iUXrG6i0rHajUlErvf8HJcUgA== X-Received: by 2002:adf:fa0a:: with SMTP id m10mr12804533wrr.147.1617561110401; Sun, 04 Apr 2021 11:31:50 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id o14sm14482772wrh.88.2021.04.04.11.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Apr 2021 11:31:49 -0700 (PDT) From: "Basil L. Contovounesios" To: Matt Armstrong Subject: Re: bug#47572: 27.1; (setf (map-elt m key) value) should return value but does not References: <87eefsfl8f.fsf@rfc20.org> Date: Sun, 04 Apr 2021 19:31:48 +0100 In-Reply-To: <87eefsfl8f.fsf@rfc20.org> (Matt Armstrong's message of "Fri, 02 Apr 2021 14:08:16 -0700") Message-ID: <87lf9x52az.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47572 Cc: 47572@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 (-) found 47572 25.3.1 quit Matt Armstrong writes: > Attached is an ert test that demonstrates the problem. The crux is > that: > > (require 'map) > (setf (map-elt m key) value) > > returns VALUE only in the hash table implementation. `setf' should > return VALUE in all cases. > > For alists it returns either nil or (key . value) depending on whether a > key is inserted or udpated in place. Indeed, this bug seems to be present since map.el was introduced in Emacs 25. > For plists it returns similarly variable things. > > Here is the output I get from the attached test. The .el is attached afterwards. Would you be interested in also providing a patch for map.el? Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Thu May 06 07:31:55 2021 Received: (at 47572) by debbugs.gnu.org; 6 May 2021 11:31:55 +0000 Received: from localhost ([127.0.0.1]:37427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lecEV-0000k7-7B for submit@debbugs.gnu.org; Thu, 06 May 2021 07:31:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lecER-0000dR-PL for 47572@debbugs.gnu.org; Thu, 06 May 2021 07:31:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dGgXXDCao93Fuf+YtMwDmQFMl9F5WRI6pEjMYbKRJ/I=; b=l2A6/3WcxwqqvgdsQvIFBsO6Ku SWywiM6Pp8us8YdgOboLO2UJSpYsqtsfczDg8pomO07hwi6Wb28Q2z4e8n67+zyW+e8KfXo0/tNNf IYcNL8jit9UrPYfCpHhiNDnYZlmCjvzgFzfkmkwkR8T93VIxjuXksxKcspd0TPdZ4rng=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lecEI-0006k1-Up; Thu, 06 May 2021 13:31:45 +0200 From: Lars Ingebrigtsen To: Matt Armstrong Subject: Re: bug#47572: 27.1; (setf (map-elt m key) value) should return value but does not References: <87eefsfl8f.fsf@rfc20.org> X-Now-Playing: Bark Psychosis's _Manman_: "Tooled Up" Date: Thu, 06 May 2021 13:31:42 +0200 In-Reply-To: <87eefsfl8f.fsf@rfc20.org> (Matt Armstrong's message of "Fri, 02 Apr 2021 14:08:16 -0700") Message-ID: <87zgx8umht.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Matt Armstrong writes: > Attached is an ert test that demonstrates the problem. The crux is > that: > > (require 'map) > (setf (map-elt m key) value) > > returns VALUE only in the hash table implementation. `setf' should > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47572 Cc: 47572@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 (-) Matt Armstrong writes: > Attached is an ert test that demonstrates the problem. The crux is > that: > > (require 'map) > (setf (map-elt m key) value) > > returns VALUE only in the hash table implementation. `setf' should > return VALUE in all cases. > > For alists it returns either nil or (key . value) depending on whether a > key is inserted or udpated in place. For plists it returns similarly > variable things. Thanks; I've included your tests in Emacs 28, and fixed the map-elt code (hopefully; it passes all the tests, at least). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu May 06 07:31:58 2021 Received: (at control) by debbugs.gnu.org; 6 May 2021 11:31:58 +0000 Received: from localhost ([127.0.0.1]:37430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lecEY-0000md-GL for submit@debbugs.gnu.org; Thu, 06 May 2021 07:31:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lecEX-0000hg-1V for control@debbugs.gnu.org; Thu, 06 May 2021 07:31:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eUKvuuOUa26xHFs1ikinVFhFlKb6jBJHdcBRX3dmgZM=; b=Nadt+slBQelzlpja8VJow9plP5 GmFtCShGpmCaRUzBzBNdh2fVH9TfuVJLgf08T0pa6eDx4tUQ7t1SDhGYLtMrJBBqClHakW887KE3D al54xdP16XsBpuEyXvJxoMSl+vqvZ6RRpSfag5oiAbabmGKaAB3hR48bLvKYP2v7jJrA=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lecEP-0006kB-Kt for control@debbugs.gnu.org; Thu, 06 May 2021 13:31:51 +0200 Date: Thu, 06 May 2021 13:31:49 +0200 Message-Id: <87y2csumhm.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #47572 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 47572 fixed close 47572 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 47572 fixed close 47572 28.1 quit From unknown Fri Aug 15 04:04:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 04 Jun 2021 11:24:06 +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