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: Mon, 04 Mar 2019 09:16:46 -0800 Message-ID: <871s3mh85d.fsf@ericabrahamsen.net> References: <87wolhr5k6.fsf@web.de> <87y35xdu4w.fsf@web.de> <87mumcdu7f.fsf@web.de> <875zsyhakx.fsf@ericabrahamsen.net> <87fts2h9we.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="32673"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 34708@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 04 18:17:11 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 1h0rDC-0008QY-OV for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Mar 2019 18:17:10 +0100 Original-Received: from localhost ([127.0.0.1]:57792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0rDB-0005XZ-NF for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Mar 2019 12:17:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0rD5-0005XS-NC for bug-gnu-emacs@gnu.org; Mon, 04 Mar 2019 12:17:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0rD4-0000sU-Ta for bug-gnu-emacs@gnu.org; Mon, 04 Mar 2019 12:17:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46596) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h0rD4-0000qp-HD for bug-gnu-emacs@gnu.org; Mon, 04 Mar 2019 12:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h0rD4-000166-4W for bug-gnu-emacs@gnu.org; Mon, 04 Mar 2019 12:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Mar 2019 17:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34708 X-GNU-PR-Package: emacs Original-Received: via spool by 34708-submit@debbugs.gnu.org id=B34708.15517198154202 (code B ref 34708); Mon, 04 Mar 2019 17:17:02 +0000 Original-Received: (at 34708) by debbugs.gnu.org; 4 Mar 2019 17:16:55 +0000 Original-Received: from localhost ([127.0.0.1]:60140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0rCx-00015i-FO for submit@debbugs.gnu.org; Mon, 04 Mar 2019 12:16:55 -0500 Original-Received: from ericabrahamsen.net ([52.70.2.18]:37210 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0rCv-00015T-Md for 34708@debbugs.gnu.org; Mon, 04 Mar 2019 12:16:54 -0500 Original-Received: from localhost (97-126-72-117.tukw.qwest.net [97.126.72.117]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 88646FA035; Mon, 4 Mar 2019 17:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ericabrahamsen.net; s=mail; t=1551719807; bh=wAngsfubmE5k+QqtiEmC0GNuAToDS0p6t6RluNVvuVE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=U5JveavitcTIKUW27DfDquHHXlaj6QICsy4+wtd1Ug246P20SznCvPG/qg5tD6YS5 6b82YcoRMyxMFQQvPTFa9yeHVCraHpKcYmljKPx9+ryLiIofXm5QltgiiXxgT6iy+y 4aRWmVLxHMaT5S+AWy4It8xXfwPuvZwKSE1s1lG8= In-Reply-To: <87fts2h9we.fsf@web.de> (Michael Heerdegen's message of "Mon, 04 Mar 2019 17:38:57 +0100") 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:156035 Archived-At: On 03/04/19 17:38 PM, Michael Heerdegen wrote: > Eric Abrahamsen writes: > >> I think it would be nice to have an example that shows both a common >> use-case (as an accumulator), and how to use REMOVE. I started off with >> the accumulator part: >> >> (let (word word-freq) >> (while (setq word (pop word-list)) >> (cl-incf (alist-get word word-freq 0 #'equal) 1))) >> >> But so far haven't come up with a non-contrived way to work REMOVE in >> there... > > And I guess you didn't really want to specify a function as REMOVE arg, > right? Don't you think it's confusing enough already? :) Though maybe there could be a second example showing "advanced topics in REMOVE". While we're here, you mentioned up-thread that REMOVE isn't intuitive if you don't understand what the DEFAULT arg is doing. Obviously I don't understand that: would you elaborate? Thanks, Eric