From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#25461: Missing doc strings for "," and ",@". Date: Wed, 18 Jan 2017 19:28:48 +0000 Message-ID: <20170118192848.GA4108@acm.fritz.box> References: <20170116212257.GA4747@acm.fritz.box> <3w1sw11nwn.fsf@fencepost.gnu.org> <20170117195627.GA4169@acm.fritz.box> <87k29t5sqp.fsf@linux-m68k.org> <20170117204119.GC4169@acm.fritz.box> <87h94xdtvn.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1484767819 25750 195.159.176.226 (18 Jan 2017 19:30:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Jan 2017 19:30:19 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: Andreas Schwab , 25461@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 18 20:30:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTvvs-0005pC-BB for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jan 2017 20:30:08 +0100 Original-Received: from localhost ([::1]:43857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTvvx-00056r-2C for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jan 2017 14:30:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTvvr-00056B-GY for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2017 14:30:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTvvm-0005Pn-GU for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2017 14:30:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36806) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cTvvm-0005Pj-Dx for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2017 14:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cTvvm-0003ou-5Z for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2017 14:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jan 2017 19:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25461 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25461-submit@debbugs.gnu.org id=B25461.148476775014593 (code B ref 25461); Wed, 18 Jan 2017 19:30:02 +0000 Original-Received: (at 25461) by debbugs.gnu.org; 18 Jan 2017 19:29:10 +0000 Original-Received: from localhost ([127.0.0.1]:35005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTvuv-0003nF-Dt for submit@debbugs.gnu.org; Wed, 18 Jan 2017 14:29:10 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:53325 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cTvus-0003n5-Jg for 25461@debbugs.gnu.org; Wed, 18 Jan 2017 14:29:07 -0500 Original-Received: (qmail 86176 invoked by uid 3782); 18 Jan 2017 19:29:03 -0000 Original-Received: from acm.muc.de (p548C6FB5.dip0.t-ipconnect.de [84.140.111.181]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 18 Jan 2017 20:29:03 +0100 Original-Received: (qmail 5346 invoked by uid 1000); 18 Jan 2017 19:28:48 -0000 Content-Disposition: inline In-Reply-To: <87h94xdtvn.fsf@web.de> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.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: 208.118.235.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:128214 Archived-At: Hello, Michael. On Wed, Jan 18, 2017 at 02:44:28AM +0100, Michael Heerdegen wrote: > Alan Mackenzie writes: > > I don't expect the typical novice Elisp hacker cares about such nice > > distinctions. She can get a doc string for `, so why not one for , or > > ,@? > ' and #' also "don't have a docstring". That ` "has a docstring" is > just coincidence - because the reader transforms > `expr > to > (` expr) > and the symbol ` has an associated symbol-function. I'm sure that's true. But ' is not really difficult enough to need a doc string (IMAO). Well, it didn't used to be, before it became (ab)used by pcase. #' could certainly do with one, I think. But in my patch (which I expect to post within a few minutes of this post), I have created a mechanism by which other reader macros can have doc strings added. > FWIW when I first saw `, , and ,@, it looked strange enough to me to > open the manual, because the syntax seemed so unusual that I believed > that I missed an essential part of knowledge about Elisp. At least this > is what I think happened... Yes, but unless you're a genius, you probably had to look at the manual several times before you internalised the meaning of , and ,@, with a fair bit of practice in between. During that practice, you might well have found opening the manual to have been a hassle which you could have avoided, had there been doc strings at the time. > But I agree that some people might try C-h f on any of these, and we > would not all die if we would show something useful in this case. We > could just say that C-f explains symbol functions and "reader macros" > and the thing would still be consistent. Or, not say anything at all - just do it. C-h f after all does explain named functions. That it also explains a couple of reader macros as a bonus hardly needs going on about. > OTOH, I think that saying anything about `pcase' there would be a bad > idea. I disagree. I was confused fairly badly for a long time when pcase appeared (without announcement, IIRC) and purloined the reader macros which, up till then, had had single definite functionalities. I assume other people were and will be confused by pcase usages, so it will do no harm to draw people's attention towards them. Anyhow, I've included a sentence about pcase at the end of the proposed doc string for ,. I don't think pcase uses ,@, or at least I haven't seen any such use of it. > Michael. -- Alan Mackenzie (Nuremberg, Germany).