From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#34708: alist-get has unclear documentation Date: Tue, 05 Mar 2019 14:50:33 -0800 Message-ID: <87h8chey12.fsf@ericabrahamsen.net> References: <87wolhr5k6.fsf@web.de> <87y35xdu4w.fsf@web.de> <87mumcdu7f.fsf@web.de> <875zsyhakx.fsf@ericabrahamsen.net> <87fts2h9we.fsf@web.de> <871s3mh85d.fsf@ericabrahamsen.net> <874l8iebyz.fsf@web.de> <878sxui7bo.fsf@ericabrahamsen.net> <87va0xcxco.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="59608"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 34708@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 05 23:51:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1Iu8-000FLZ-33 for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Mar 2019 23:51:20 +0100 Original-Received: from localhost ([127.0.0.1]:50386 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1Iu3-00082E-Nw for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Mar 2019 17:51:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1Itq-00081K-UO for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 17:51:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1Itq-00022A-4F for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 17:51:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48266) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1Itp-00021t-Vp for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 17:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h1Itp-0004df-Ok for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 17:51:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Mar 2019 22:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34708 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.155182625817821 (code B ref -1); Tue, 05 Mar 2019 22:51:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Mar 2019 22:50:58 +0000 Original-Received: from localhost ([127.0.0.1]:33577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1Itm-0004dN-2x for submit@debbugs.gnu.org; Tue, 05 Mar 2019 17:50:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1Itk-0004dB-OA for submit@debbugs.gnu.org; Tue, 05 Mar 2019 17:50:57 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:45302) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h1Itf-0001oz-FK for submit@debbugs.gnu.org; Tue, 05 Mar 2019 17:50:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1Itb-0007sT-Tg for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 17:50:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1Ita-0001k9-OE for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 17:50:47 -0500 Original-Received: from [195.159.176.226] (port=40972 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h1ItY-0001fz-T7 for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 17:50:45 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1h1ItT-000Eat-LS for bug-gnu-emacs@gnu.org; Tue, 05 Mar 2019 23:50:39 +0100 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:OmEI4ISIfc6dAAiz0SLpzDHKrKY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156078 Archived-At: Michael Heerdegen writes: > Eric Abrahamsen writes: > >> Thanks for spelling all this out! I guess my confusion is the >> interaction of REMOVE with DEFAULT. Why does REMOVE only do anything >> if the value being set is equal to the DEFAULT? If they are not equal, >> REMOVE is ignored, and the value is set. How does that make sense? > > If you do (setf GV V) with some place expression GV and some value V, > you expect that afterwards GV evaluates to V. > > If (setf (alist-get key alist nil 'remove) t) would remove the > association of KEY, > > (alist-get key alist nil 'remove) > > or > > (alist-get key alist nil) > > would not eval to nil, although you have set the place to t. > > With other words: removing elements from an alist is something that > doesn't fit 100% to place expressions, so the syntax and semantics you > get are not 100% straightforward. Not super sexy, but consistent. Okay, I guess that makes sense, thanks. But we still need some more examples in the docstring!