all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivan Andrus <darthandrus@gmail.com>
To: 40692@debbugs.gnu.org
Subject: bug#40692: 28.0.50; Constant list modified inside  function
Date: Fri, 17 Apr 2020 21:05:31 -0600	[thread overview]
Message-ID: <A4646238-FFD3-4D65-A412-F78A12D0ACE3@gmail.com> (raw)
In-Reply-To: <57990C74-5CA1-42E6-83EC-7F6858AFD0E7@gmail.com>

On Apr 17, 2020, at 5:45 PM, Ivan Andrus <darthandrus@gmail.com> wrote:
> 
> I believe this is the root cause of a bug in magit/forge https://github.com/magit/forge/issues/267 in which all subsequent pull requests created have the same name.  The maintainer of magit/forge (tarsius) was unable to reproduce that bug, so I tried my hand at creating a minimal test case, and I was able to get it down to this.
> 
> Now, I understand reference semantics of lists in general, but it seems like this should be different.  If this behavior is intentional, what's the best way to for creation of a new list every time so that functions using the alist don't have to worry about not changing the list?

I tracked down the function doing the actual changing: json-encode-alist.  I filed https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40693   

I still find the behavior here confusing, but I expect it will be considered expected behavior.

-Ivan




  reply	other threads:[~2020-04-18  3:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 23:45 bug#40692: 28.0.50; Constant list modified inside function Ivan Andrus
2020-04-18  3:05 ` Ivan Andrus [this message]
2020-04-18  9:18 ` Štěpán Němec
2020-04-18 22:49   ` Michael Heerdegen
2020-04-19  7:08     ` Štěpán Němec
2021-08-29 22:18       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A4646238-FFD3-4D65-A412-F78A12D0ACE3@gmail.com \
    --to=darthandrus@gmail.com \
    --cc=40692@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.