From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Miguel V. S. Frasson" Newsgroups: gmane.emacs.bugs Subject: bug#34708: alist-get has unclear documentation Date: Sat, 2 Mar 2019 16:51:25 -0300 Message-ID: References: <87wolhr5k6.fsf@web.de> <87y35xdu4w.fsf@web.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d2044c058321d94e" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="189172"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34708@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 02 20:52:15 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 1h0Ag9-000n3P-Ig for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Mar 2019 20:52:13 +0100 Original-Received: from localhost ([127.0.0.1]:58197 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0Ag8-00048X-IB for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Mar 2019 14:52:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0Ag2-00048P-KQ for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2019 14:52:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0Ag1-0007xS-JL for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2019 14:52:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44340) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h0Ag0-0007vA-4k for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2019 14:52:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h0Afy-0002Ah-3z for bug-gnu-emacs@gnu.org; Sat, 02 Mar 2019 14:52:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Miguel V. S. Frasson" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Mar 2019 19:52: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.15515563048323 (code B ref 34708); Sat, 02 Mar 2019 19:52:02 +0000 Original-Received: (at 34708) by debbugs.gnu.org; 2 Mar 2019 19:51:44 +0000 Original-Received: from localhost ([127.0.0.1]:57884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0Aff-0002AB-G9 for submit@debbugs.gnu.org; Sat, 02 Mar 2019 14:51:43 -0500 Original-Received: from mail-it1-f170.google.com ([209.85.166.170]:40302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0Afd-00029y-4J for 34708@debbugs.gnu.org; Sat, 02 Mar 2019 14:51:41 -0500 Original-Received: by mail-it1-f170.google.com with SMTP id l139so2001615ita.5 for <34708@debbugs.gnu.org>; Sat, 02 Mar 2019 11:51:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=txksbu9bNDcuIsx0VgCYZN69FcvrvgRJYK6x4VNpxzc=; b=H6eoqtJTLmHx2unu7ctT88VFPd+QXlb7RfNvrdjdv4edQLav8mbIjiJAeFIjaXi/gl dWT32fc383ZtfZNm+GY9bwO1Na4QYG+RUac1vWPJpooqlmzK8J+3275jk4beuTGAaSRw 0aSS1jFNABDKHk0XcgrRfOOUalBkCsrKQPbef9eO6idB36ocTyvuFl7CIM8PSiMVS8z4 56LJVR1DJOXpdaCwlfDYCjEWZ7BWMjtAa/tjNA0+plIUo17jF/UUQeo3bHq4E5LmgByJ 1kcDVTfS3VnePuZYpMd5MC2jd7UTAaFDGGBPwDhTIWQKV3vAdVRuYalJsP7gznay2DKZ J0Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=txksbu9bNDcuIsx0VgCYZN69FcvrvgRJYK6x4VNpxzc=; b=i6VBMnt4CeXfflaSuR2b0oRX9g+Zo34KR1O+zRM54nuBpUhOYW0VDQ6iYYBLveQtS9 w3X6je8vcLGXxKGBF7aj2Q1cuSOVht6jLJQdBZqZV8fV+c6rMCALwy8GdsghhnpW7Wr0 WIiWy/7DEfCzGhKVLcH79QBVa8fjYrXyjH+1d4sljBo0HeEcg1S6/x8Jfoibxi9RtjR3 Kxf+qeQkur4md+51CDl0T50IUGhbSC3JDjzhqeOjFymZvj16NbuZ5Ku++ZCby2+fjD1W jgXATr3M6GJDzyESYn/L1sNzUHuDTUBgtYCE5iz/zBVTqujZHZ9053FLqb43xJ6Di2Px 3Zxg== X-Gm-Message-State: APjAAAWL/tCUjRfZKFFLkiPuke3nb3Mms4VIUVy+sRC489TwppN3sN2v BXzCvx1OK9IvDNXfigH6S0jxsJTGG3e9sYOxj0o= X-Google-Smtp-Source: APXvYqw/6LRY1/01ah0uPZ+BoH6KP075Vv7FkesjSyb59m0MsnQz4LpPx2PkMURdRKBUdCooY9wSbF0b2P7qm02IMIM= X-Received: by 2002:a24:4e0f:: with SMTP id r15mr6831734ita.163.1551556295130; Sat, 02 Mar 2019 11:51:35 -0800 (PST) In-Reply-To: <87y35xdu4w.fsf@web.de> 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:155971 Archived-At: --000000000000d2044c058321d94e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Thanks for the explanation. Now it is clear. I use alists a lot. I will use it better. Miguel Em s=C3=A1b, 2 de mar de 2019 15:10, Michael Heerdegen escreveu: > "Miguel V. S. Frasson" writes: > > > I can't imagine how to *set* anything with alist-get. It seams to me > > that it just use the value of ALIST for look up, so talk about > > generalized variables is meaningless to me here. > > You use it like this: say variable V is bound to an alist, then you can > do (setf (alist-get key V) value). After that, (alist-get key V) will > evaluate to VALUE, so you have "set" that place. In the general case, V > can also be a generalized variable, e.g. (car SOMETHING-ELSE). > > To replace the word "this" with something better is not so easy. We > could write "The name of this function can be used to build expressions > that can be used as a generalized variable", but I doubt it will make > things clearer for somebody not familiar with the concept of generalized > variables. Using this function name to build place expressions is not > different from using other function names that allow to be used for > generalized variables. > > I would rather go with an example, which I think is justified because > using this function name in place expressions is the canonical way to > modify alists and people need to use it (there is no `alist-put') no > matter if they are familiar with generalized variables. > > Michael. > > > --000000000000d2044c058321d94e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

Thanks for the explanation. Now it is clear. I use alists a = lot. I will use it better.=C2=A0

Miguel=C2=A0

<= br>



=
Em s=C3=A1= b, 2 de mar de 2019 15:10, Michael Heerdegen <michael_heerdegen@we= b.de> escreveu:
"Miguel= V. S. Frasson" <mvsfrasson@gmail.com> writes:<= br>
> I can't imagine how to *set* anything with alist-get. It seams to = me
> that it just use the value of ALIST for look up, so talk about
> generalized variables is meaningless to me here.

You use it like this: say variable V is bound to an alist, then you can
do (setf (alist-get key V) value).=C2=A0 After that, (alist-get key V) will=
evaluate to VALUE, so you have "set" that place.=C2=A0 In the gen= eral case, V
can also be a generalized variable, e.g. (car SOMETHING-ELSE).

To replace the word "this" with something better is not so easy.= =C2=A0 We
could write "The name of this function can be used to build expression= s
that can be used as a generalized variable", but I doubt it will make<= br> things clearer for somebody not familiar with the concept of generalized variables.=C2=A0 Using this function name to build place expressions is not=
different from using other function names that allow to be used for
generalized variables.

I would rather go with an example, which I think is justified because
using this function name in place expressions is the canonical way to
modify alists and people need to use it (there is no `alist-put') no matter if they are familiar with generalized variables.

Michael.


--000000000000d2044c058321d94e--