From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Document 'alist-get'. Date: Tue, 19 Jan 2016 09:59:23 -0800 Message-ID: References: <20160116143238.27391.97533@vcs.savannah.gnu.org> <8737ttx5dm.fsf@web.de> <83oachbgz0.fsf@gnu.org> Reply-To: John Wiegley NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453226398 21227 80.91.229.3 (19 Jan 2016 17:59:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Jan 2016 17:59:58 +0000 (UTC) Cc: Michael Heerdegen , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 19 18:59:51 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aLaZI-00067D-3G for ged-emacs-devel@m.gmane.org; Tue, 19 Jan 2016 18:59:48 +0100 Original-Received: from localhost ([::1]:38637 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLaZH-0002xx-NQ for ged-emacs-devel@m.gmane.org; Tue, 19 Jan 2016 12:59:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLaZ4-0002xs-GT for emacs-devel@gnu.org; Tue, 19 Jan 2016 12:59:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLaZ3-0006Yi-A4 for emacs-devel@gnu.org; Tue, 19 Jan 2016 12:59:34 -0500 Original-Received: from mail-pf0-x22c.google.com ([2607:f8b0:400e:c00::22c]:33598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLaYz-0006YB-25; Tue, 19 Jan 2016 12:59:29 -0500 Original-Received: by mail-pf0-x22c.google.com with SMTP id e65so179568371pfe.0; Tue, 19 Jan 2016 09:59:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:reply-to:mail-followup-to:mime-version:content-type; bh=NRn5vX+Y/uruo11BRdXRs+8MMQpg0NaWqWruOVoELe0=; b=wrLHqFlH58je7k6eX3ntra5JRX9FKA5s6RThZyefRrAfDrbUZr1yccTc+gMyDGiED6 u3IgVQpFlU3HpdXmw0slqaDi63MtGS2myMuKMBMfRcHEMRergbaHCEO3SDTLvbiBHEof oZopW43UBpEeWlIImLV2h9mA6VJluc/b0lDE4gRZeeOXX3MDaRqrAvttJHBf7Fkhsr8P GOJdYQ1aPDjSQWlX2NDH0sf2caq++aUwYOzAQvzFfopFujY2ebN/llKBMCQOgi79eYbM eqLzZ9u1R3bGRqgwoV7uFeQS9ceOYcpxS7urzaR/wGtQpZ+B60zq2B5MqQ4aViebNENu xniw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:reply-to:mail-followup-to:mime-version :content-type; bh=NRn5vX+Y/uruo11BRdXRs+8MMQpg0NaWqWruOVoELe0=; b=YKqAnDbR5eHCQsJwilrdgCRFmOL4JKNHIzoqqG01vrzr5M5ihmheTQi27uyCQ7NTAT I5lwZtqmtyzmDK9wMQOBk2q4qXf7AlPLlRvak4ko7EYcsapIjEztwgS3dEVD0cE6TNlb vopnKXspTvtgjyA7ZGPOk8yfDdbg+DyGiOGwbwd1qv0cU9kxd2yw0DHsk7hpffH/6vet 966o9J6O5pG3LqtuyNb6SBS4LmbQ/MHvcBJdaQrNVqNSx+saUQHFVU7P5FuuJwKtlCKP Ec1A3vOeqmKXkLeWgxHKH30gGo1BQ0BfF1FZKKPSZYSXp5k0I3wCQcZCLIdAIYdXx4sN aoQQ== X-Gm-Message-State: ALoCoQlOxjvrot60Gk6mHho0mIspadMP3dyPbUjn3RgcHE3OzuiGZCEnijfKYheb1xzlXOZl96EGxS1ESceVtlr8/bvziI72fQ== X-Received: by 10.98.67.212 with SMTP id l81mr46027609pfi.90.1453226367997; Tue, 19 Jan 2016 09:59:27 -0800 (PST) Original-Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id 69sm42956299pfn.43.2016.01.19.09.59.26 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 19 Jan 2016 09:59:26 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id 9D70D124F80DC; Tue, 19 Jan 2016 09:59:25 -0800 (PST) In-Reply-To: <83oachbgz0.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 19 Jan 2016 19:45:55 +0200") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) Mail-Followup-To: Eli Zaretskii , Michael Heerdegen , emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198374 Archived-At: >>>>> Eli Zaretskii writes: >> > +@defun alist-get key value &optional default >> >> Should we add that it is also a valid place expression ("setf'able")? Or >> to the docstring? That fact doesn't seem to be discoverable at all now. > I don't know -- should we? I didn't find any other function for which we say > something like that, so saw no reason to single this one out. Did I miss > something? > In any case, if it's so important to mention that, why doesn't the > function's doc string make a point of doing so? Or maybe I didn't understand > the doc string (do you?). alist-get is extremely welcome, I'm quite tired of writing (cdr (assq ...)). The fact that it is a setf "place" is also quite wonderful. But where to document that fact so people find it... `setf' is applicable in many scenarios, which people familiar with setf mainly know -- since I imagine not many people use setf who are not from the CL world. We could start adding something like this at the bottom of such functions: Invocations of this function may be used as a place expression to `setf'. That is, if we wish to encourage `setf' use. The other possibility is to add documentation to the Elisp manual where it describes `setf', and list all the functions that may be used by it. I have a feeling that would reach your intended audience better than extending the docstring for `alist-get'. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2