From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ivan Andrus Newsgroups: gmane.emacs.bugs Subject: bug#40693: 28.0.50; json-encode-alist changes alist Date: Fri, 17 Apr 2020 20:59:54 -0600 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="85130"; mail-complaints-to="usenet@ciao.gmane.io" To: 40693@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 18 05:01:27 2020 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 1jPdjT-000M4U-MJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Apr 2020 05:01:27 +0200 Original-Received: from localhost ([::1]:54248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPdjS-0000DJ-Ls for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Apr 2020 23:01:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46458) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPdjF-0008VY-Nw for bug-gnu-emacs@gnu.org; Fri, 17 Apr 2020 23:01:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPdj8-0004CC-0p for bug-gnu-emacs@gnu.org; Fri, 17 Apr 2020 23:01:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58594) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jPdj4-00049f-Gn for bug-gnu-emacs@gnu.org; Fri, 17 Apr 2020 23:01:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jPdj4-0002Pt-DK for bug-gnu-emacs@gnu.org; Fri, 17 Apr 2020 23:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Andrus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Apr 2020 03:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40693 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.15871788139214 (code B ref -1); Sat, 18 Apr 2020 03:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Apr 2020 03:00:13 +0000 Original-Received: from localhost ([127.0.0.1]:41907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jPdiH-0002OY-1f for submit@debbugs.gnu.org; Fri, 17 Apr 2020 23:00:13 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:40768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jPdiF-0002OM-6t for submit@debbugs.gnu.org; Fri, 17 Apr 2020 23:00:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45185) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPdi9-00087U-FU for bug-gnu-emacs@gnu.org; Fri, 17 Apr 2020 23:00:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPdi4-0001lR-Uo for bug-gnu-emacs@gnu.org; Fri, 17 Apr 2020 23:00:05 -0400 Original-Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]:35174) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jPdi3-0001iK-OG for bug-gnu-emacs@gnu.org; Fri, 17 Apr 2020 23:00:00 -0400 Original-Received: by mail-io1-xd36.google.com with SMTP id w20so4670187iob.2 for ; Fri, 17 Apr 2020 19:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=w8kvDL0CtZ2YCmPBWjQtM4vVYrdk/O4HMKeS1HsZnJ4=; b=HdZbpNKFJ9Oqcz81jphMX5YQ83/7Rs520MwbHY/TSIV3Gte2d7LpbGOL+0IRmaeN0z aDiRoIXWBZGEu6QVGtYTQytMMOdTAScw4I/zsOFRnbELXEptJr5ZBeAlJT9HCP/mtjjB 6UspsPt6BXV2zimXsz6i/98XfI94TpsWRS0CpRaDrU3eKmNxdeOfx57l2+kdNGaamUQ3 WhdOym6u/jOrHvaeJF+3/4iy+UKur3FbgGblydfASia9yjS5YYsR3eqUViTf0VYOJXGE JavcL+1Fa+xkTgw4dzjYieRVDpPfb8rNIfWJ50qWEa/89a4aPWRV8QsCJGejJ9IPPQwX jQNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=w8kvDL0CtZ2YCmPBWjQtM4vVYrdk/O4HMKeS1HsZnJ4=; b=UM7jPpF6HFN0LYYJ2bi5EtvS8qCppxjSeW6X7COV5jjHTW27foDXcmDKQn3fs4vvlw eT/Tg1KEJ4kx40dScT9TbKM06Pbc/JuQYyFsIoqBh+pIrD/Wjkv64SReYtLcAAuYmf0l 4shTTTK4qqtN/LoE0NYN+pDApzwY+Xwb1GHUK3q64fqXFr5QBm4+fwMKWa5vxgJFXECE uje7dOVUhkDLhD5DvDQvEoFuANcLYIEogTsa3S9bk23Rg3YGO6DCZOfflrjP9LZc/bWw zXgjU1zxw1+8friizai6V4vRg8Q+iWnBFIGOa46nsdeh6o8gatvGrcTJgJAKmILkMurm Qzyg== X-Gm-Message-State: AGi0PuZbLqhVEyFw72Dn+ecp0D+q67Z0K23u9j/DZQoocZeonf2n8C2n RAP0kgbXTK7/sPRhHDe4+jKbrcD+UEU= X-Google-Smtp-Source: APiQypJTpyG+Y1p3LVDSravZKk9BhDV1+aq41ny1NFcFWLjFfxZcsi0tdUXMsNR+pkz3lajo8UGTRw== X-Received: by 2002:a5d:9c46:: with SMTP id 6mr6155267iof.146.1587178796798; Fri, 17 Apr 2020 19:59:56 -0700 (PDT) Original-Received: from [192.150.23.4] (67-2-50-168.slkc.qwest.net. [67.2.50.168]) by smtp.gmail.com with ESMTPSA id k22sm1968714iot.32.2020.04.17.19.59.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2020 19:59:56 -0700 (PDT) X-Mailer: Apple Mail (2.3445.104.14) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:178547 Archived-At: I recently filed #40692 = (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D40692) about a problem = I was having with magit forge using creating the wrong title because an = alist created in a function contained a single constant at the end and = it was being changed every time. I still find it surprising that a = back-quoted list would behave that way, but I suspect it will be = considered desired, or at least expected behavior. I was able to track it down to the actual function that was causing the = change: json-encode-alist when json-encoding-object-sort-predicate is = set. I have it set, and indeed it's extremely useful to view JSON that = in a meaningful order. I don't think that anyone would expect that = encoding json would change the underlying data, so I think = json-encode-alist should be changed to make a copy to avoid this = situation. (require 'json) (defun fun-withdraw (amount) (json-encode-alist `((tamount . , amount) (const . some-constant)))) (fun-withdraw 12) ;; Run this a few times and nothing will change (setq json-encoding-object-sort-predicate #'string<) (fun-withdraw 12) ;; Now it will change every time It's late now, but if I have some time in the next few days, I may = submit a patch since it seems like a simple enough change. -Ivan In GNU Emacs 28.0.50 (build 18, x86_64-apple-darwin18.7.0, NS = appkit-1671.60 Version 10.14.6 (Build 18G4032)) of 2020-04-10 built on iandrus-macOS Repository revision: 965390ca5f206c6358014574fe5140ba40850391 Repository branch: master Windowing system distributor 'Apple', version 10.3.1671 System Description: Mac OS X 10.14.6 Configured using: 'configure = PKG_CONFIG_PATH=3D/opt/X11/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgcon= fig --with-sound=3Dyes --with-ns --with-modules --with-file-notification=3Dyes= --enable-gcc-warnings=3Dwarn-only --with-xpm --with-jpeg --with-tiff --with-gif --with-png --with-rsvg --with-xml2 --with-imagemagick --with-json --with-xft --with-libotf --with-gnutls=3Dno --with-makeinfo --with-libgmp' Configured features: RSVG IMAGEMAGICK GLIB NOTIFY KQUEUE ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS XIM NS MODULES THREADS JSON PDUMPER GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Features: (mailalias mailclient shadow emacsbug sendmail calc-bin calc-yank gap-smie gap-mode gap-process sage-shell-mode deferred cursor-sensor ess-r-mode ess-r-flymake ess-r-xref ess-trns ess-r-package ess-r-completion ess-roxy ess-r-syntax ess-rd ess-s-lang ess-help ess-mode ess-inf ess-tracebug ess ess-utils ess-custom disass calc-vec calccomp calc-aent all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons buttercup-compat cider-find cider-scratch apropos array jsonrpc jupyter-org-extensions jupyter-rest-api jupyter-org-client jupyter-repl jupyter-kernel-manager jupyter-channel jupyter-widget-client websocket simple-httpd jupyter-kernelspec jupyter-env jupyter-client jupyter-comm-layer jupyter-messages hmac-def jupyter-mime jupyter-base lsp-html lsp-mode em-glob bindat treemacs org-inlinetask gnus-art mm-uu mml2015 mm-view mml-smime smime dig ol-bibtex nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win esh-mode doc-view bibtex ob-octave eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util ebnf2ps ps-print ps-print-loaddefs ps-def lpr cider cider-debug cider-inspector cider-browse-ns cider-mode cider-completion cider-profile cider-eval cider-repl-history cider-repl cider-resolve cider-test cider-overlays cider-stacktrace cider-doc cider-browse-spec cider-clojuredocs cider-popup cider-eldoc cider-client cider-common cider-util cider-connection sesman-browser nrepl-client queue nrepl-dict cider-compat sesman clojure-mode parseedn parseclj-parser parseclj-lex a ob-clojure calc-store calc-trail org-attach finder perl6-repl pkg-info epl leaf treemacs-compatibility treemacs-mode treemacs-bookmarks hydra lv thunk treemacs-interface treemacs-extensions treemacs-persistence treemacs-mouse-interface treemacs-tag-follow-mode treemacs-filewatch-mode treemacs-tags treemacs-visuals treemacs-fringe-indicator pulse treemacs-faces treemacs-follow-mode treemacs-rendering treemacs-async treemacs-icons treemacs-themes treemacs-workspaces treemacs-scope treemacs-dom treemacs-core-utils treemacs-macros treemacs-customization ace-window pfuture inline term ehelp mail-extr compare-w axle vcursor texnfo-upd texinfo mc-mark-more rnc-mode goto-last-change mc-separate-operations align info-colors elisp-depmap-exec elisp-depmap-graph elisp-depmap-parse elisp-depmap-secondhelp xwwp-follow-link xwwp xwidget async-await iter2 promise promise-rejection-tracking promise-finally promise-done promise-es6-extensions promise-core autoload tar-mode arc-mode archive-mode lisp-mnt php-mode etags fileloop xref cc-langs php-face php php-project projectile ibuf-ext ibuffer ibuffer-loaddefs cmake-mode writeroom-mode visual-fill-column mixed-pitch vc-annotate poly-markdown dockerfile-mode forge-list forge-commands forge-semi forge-bitbucket buck forge-gogs gogs forge-gitea gtea forge-gitlab glab forge-github ghub-graphql treepy gsexp ghub let-alist forge-notify forge-revnote forge-pullreq forge-issue forge-topic forge-post forge-repo forge forge-core forge-db closql emacsql-sqlite emacsql emacsql-compiler snout-mode mhtml-mode css-mode eww mm-url gnus nnheader url-queue shr svg find-file whitespace make-mode magit-imenu git-rebase log-view novice vc-svn vc-cvs project deadgrep spinner lua-mode timezone mm-archive plantuml-mode gnuplot-gui gnuplot python markdown-mode edit-indirect conf-mode yaml-mode json-mode json-reformat json-snatcher js sql view dabbrev inflections mc-edit-lines multiple-cursors-core sort calc-arith calc-misc calc-math macros rot13 disp-table cperl-mode hippie-exp org-forms cl-print calc-alg calc-menu calc-ext calc calc-loaddefs calc-macs artist picture reporter rect ffap skeleton tabify cal-move org-datetree org-capture sh-script org-duration cal-julian lunar solar cal-dst cal-iso face-remap perl6-mode perl6-imenu perl6-indent smie perl6-font-lock char-fold misearch multi-isearch cap-words superword subword two-column executable bug-reference magit-extras magit-bookmark magit-submodule magit-obsolete magit-popup 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 magit-diff smerge-mode diff magit-core magit-autorevert magit-margin magit-transient magit-process magit-mode git-commit transient magit-git magit-section magit-utils writegood-mode log-edit message rfc822 mml mml-sec gnus-util rmail rmail-loaddefs mm-decode mm-bodies mailabbrev gmm-utils mailheader pcvs-util with-editor async-bytecomp async vc vc-dispatcher add-log ido-completing-read+ memoize cus-edit minibuf-eldef gvol-light-theme elide-head highlight-tail hl-sexp highlight-symbol adafruit-wisdom org-eldoc reveal epa-file epa epg epg-config request mail-utils flyspell ispell poly-org polymode derived poly-lock polymode-base polymode-weave polymode-export polymode-compat polymode-methods polymode-core polymode-classes eieio-custom color org-archive eieio-opt speedbar dframe tls gnutls network-stream url-http url-gw nsm rmc puny url-cache url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf dad-joke time semantic/idle semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/db eieio-base semantic/format ezimage semantic/tag-ls semantic/find semantic/ctxt org-drill persist org-id org-tempo tempo org-protocol org-mouse org-habit org-ctags ob-latex ob-gnuplot ob-plantuml ob-js vc-git diff-mode rng-xsd xsd-regexp rng-cmpct hideshow rng-nxml rng-valid nxml-mode nxml-outln nxml-rap sgml-mode dom perl6-detect which-func paren semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet saveplace msb mb-depth icomplete gud hl-line autorevert filenotify cus-start cus-load helpful imenu trace edebug f dash-functional help-fns radix-tree elisp-refs loop avy autoinsert cl-extra yasnippet find-file-in-repository smex ido flycheck-clang-analyzer flycheck rtags popup repeat docker-tramp kubernetes-tramp tramp-cache tramp-okta tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time iso8601 ls-lisp asm-mode info-look cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs bookmark text-property-search beacon fold ripgrep wgrep grep literal-string ox-pandoc ht ox-org ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox org-element avl-tree generator org-wc idle-org-agenda org-mac-link org-mobile org-agenda diary-lib diary-loaddefs org-crypt ob-obxml oberon-shell-mode ob-shell shell ob-python org-clock orgtbl-ascii-plot org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete org-list org-faces org-entities time-date noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs sage jka-compr xml preview prv-emacs tex-buf latex latex-flymake flymake-proc flymake compile comint ansi-color ring warnings thingatpt tex-ispell tex-style tex crm edit-server elnode dired+ image-dired image-mode exif format-spec image-file dired-x dired-aux dired dired-loaddefs db web time-stamp s url-util mailcap mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr fakir dotassoc kv noflet cl-indent dash ert ewoc debug backtrace help-mode find-func savehist desktop frameset drag-stuff recentf tree-widget wid-edit browse-kill-ring delsel backtr keyfreq uptimes pp server assoc advice windmove finder-inf package-x tab-line pcase easy-mmode cl rx tex-site info edmacro kmacro 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/ns-win ns-win ucs-normalize mule-util term/common-win 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 kqueue cocoa ns multi-tty make-network-process emacs)