unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47572: 27.1; (setf (map-elt m key) value) should return value but does not
@ 2021-04-02 21:08 Matt Armstrong
  2021-04-04 18:31 ` Basil L. Contovounesios
  2021-05-06 11:31 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 3+ messages in thread
From: Matt Armstrong @ 2021-04-02 21:08 UTC (permalink / raw)
  To: 47572

[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]

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)))


[-- Attachment #2: setf.el --]
[-- Type: application/emacs-lisp, Size: 1316 bytes --]

[-- Attachment #3: Type: text/plain, Size: 21055 bytes --]




In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo 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 ‘setf.el’.
Mark set
Mark saved where search started
Quit [2 times]
Mark set
Mark saved where search started
Reverting buffer ‘setf.el’. [4 times]

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --enable-libsystemd --with-pop=yes
 --enable-locallisppath=/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=alsa --without-gconf --with-mailutils --build
 x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
 --with-pop=yes
 --enable-locallisppath=/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=alsa --without-gconf --with-mailutils --with-cairo
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs-6jKC2B/emacs-27.1+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-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/emacs/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/site-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/emacs/site-lisp/elpa-src/diminish-0.45/diminish
/usr/share/emacs/site-lisp/elpa/git-commit-2.99.0/git-commit-autoloads hides /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/share/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/emacs/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/emacs/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/emacs/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/emacs/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/emacs/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/emacs/site-lisp/elpa-src/magit-2.99.0/magit-merge
/usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-obsolete hides /usr/share/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/share/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/emacs/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/emacs/site-lisp/elpa-src/magit-2.99.0/magit-utils
/usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-autorevert hides /usr/share/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/emacs/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/emacs/site-lisp/elpa-src/magit-2.99.0/git-rebase
/usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-autoloads hides /usr/share/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/share/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/emacs/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/emacs/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/emacs/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/emacs/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/emacs/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/emacs/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/emacs/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/emacs/site-lisp/elpa-src/magit-2.99.0/magit-blame
/usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-transient hides /usr/share/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/emacs/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/emacs/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/emacs/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/emacs/site-lisp/elpa-src/magit-2.99.0/magit-imenu
/usr/share/emacs/site-lisp/elpa/magit-2.99.0/magit-worktree hides /usr/share/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/share/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/emacs/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/emacs/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/share/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/emacs/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/emacs/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/site-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/emacs/site-lisp/elpa-src/notmuch-0.31.4/notmuch
/usr/share/emacs/site-lisp/elpa/notmuch-0.31.4/notmuch-show hides /usr/share/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/share/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/share/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/share/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/share/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 /usr/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/share/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/share/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/share/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/share/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/share/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/share/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/share/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/share/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/share/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/share/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/site-lisp/elpa-src/slime-2.26.1/slime
/usr/share/emacs/site-lisp/elpa/slime-2.26.1/slime-autoloads hides /usr/share/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/emacs/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/emacs/site-lisp/elpa-src/slime-2.26.1/slime-tests
/usr/share/emacs/site-lisp/elpa/transient-0.2.0.30/transient hides /usr/share/emacs/site-lisp/elpa-src/transient-0.2.0.30/transient
/usr/share/emacs/site-lisp/elpa/transient-0.2.0.30/transient-autoloads hides /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 /usr/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 hides /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 hides /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 /usr/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 hides /usr/share/emacs/site-lisp/elpa-src/use-package-2.4.1/use-package-autoloads
/usr/share/emacs/site-lisp/elpa/use-package-2.4.1/use-package-jump hides /usr/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/share/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 /usr/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 hides /usr/share/emacs/site-lisp/elpa-src/with-editor-3.0.2/with-editor-autoloads
/usr/share/emacs/site-lisp/elpa/with-editor-3.0.2/with-editor hides /usr/share/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 /usr/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))

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#47572: 27.1; (setf (map-elt m key) value) should return value but does not
  2021-04-02 21:08 bug#47572: 27.1; (setf (map-elt m key) value) should return value but does not Matt Armstrong
@ 2021-04-04 18:31 ` Basil L. Contovounesios
  2021-05-06 11:31 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 3+ messages in thread
From: Basil L. Contovounesios @ 2021-04-04 18:31 UTC (permalink / raw)
  To: Matt Armstrong; +Cc: 47572

found 47572 25.3.1
quit

Matt Armstrong <matt@rfc20.org> 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#47572: 27.1; (setf (map-elt m key) value) should return value but does not
  2021-04-02 21:08 bug#47572: 27.1; (setf (map-elt m key) value) should return value but does not Matt Armstrong
  2021-04-04 18:31 ` Basil L. Contovounesios
@ 2021-05-06 11:31 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-06 11:31 UTC (permalink / raw)
  To: Matt Armstrong; +Cc: 47572

Matt Armstrong <matt@rfc20.org> 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-06 11:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02 21:08 bug#47572: 27.1; (setf (map-elt m key) value) should return value but does not Matt Armstrong
2021-04-04 18:31 ` Basil L. Contovounesios
2021-05-06 11:31 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).