From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#6591: 24.0.50; incorrect doc for `catch' Date: Sat, 10 Jul 2010 21:21:04 -0700 Message-ID: <38AC360676154EFF8DF9F35945B6EFAE@us.oracle.com> References: <831vbcbl7n.fsf@gnu.org> <5500EFEE9A854408ABF0FE400497FE2D@us.oracle.com> <83tyo7aiay.fsf@gnu.org> <83mxtz9zbn.fsf@gnu.org> <3ACAED77613643B7B2FC0207DDE11F11@us.oracle.com> <83y6djuyah.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1278822617 19350 80.91.229.12 (11 Jul 2010 04:30:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 11 Jul 2010 04:30:17 +0000 (UTC) Cc: 6591@debbugs.gnu.org To: "'Eli Zaretskii'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 11 06:30:16 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OXoBC-0005jP-Vr for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Jul 2010 06:30:15 +0200 Original-Received: from localhost ([127.0.0.1]:35647 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OXoBC-00025Y-8z for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Jul 2010 00:30:14 -0400 Original-Received: from [140.186.70.92] (port=36920 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OXoB4-00025L-PL for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2010 00:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OXoB3-0008Ta-G0 for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2010 00:30:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60513) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXoB3-0008TV-Ee for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2010 00:30:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OXo3G-0006Ne-AM; Sun, 11 Jul 2010 00:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Jul 2010 04:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6591 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6591-submit@debbugs.gnu.org id=B6591.127882210924517 (code B ref 6591); Sun, 11 Jul 2010 04:22:02 +0000 Original-Received: (at 6591) by debbugs.gnu.org; 11 Jul 2010 04:21:49 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXo32-0006NO-9z for submit@debbugs.gnu.org; Sun, 11 Jul 2010 00:21:48 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXo2z-0006N7-1V for 6591@debbugs.gnu.org; Sun, 11 Jul 2010 00:21:46 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o6B4LgkX032092 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 11 Jul 2010 04:21:43 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o6B1RBIk004388; Sun, 11 Jul 2010 04:21:41 GMT Original-Received: from abhmt016.oracle.com by acsmt353.oracle.com with ESMTP id 395146601278822063; Sat, 10 Jul 2010 21:21:03 -0700 Original-Received: from dradamslap1 (/141.144.160.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 10 Jul 2010 21:21:02 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <83y6djuyah.fsf@gnu.org> Thread-Index: AcsgSJY1hV2Fg0yoSgy6D29KVdAyRQAYzRCQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.4C3946D6.0071:SCFMA4539814,ss=1,fgs=0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 11 Jul 2010 00:22:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38359 Archived-At: > I was thinking of modifying the docs to say `catch TAG BODY' and > explaining in the text that BODY can be one or more forms. > > The problem with the period is that it could be misunderstood to mean > that a period must be present in the catch form at this point, which > is false. I agree that the (A . B) notation is probably not the best one to use for this kind of thing. I just mentioned it to point out (a) that that is what is involved in the notation you are using and your interpretation of it: splicing, and (b) we do in fact use (A . B) notation at some places in our doc (but more for Lisp lists regarded as data structures, not lists regarded as sexps to be evaled). The syntax for something like (catch TAG . BODY) is commonly written not that way but the way the Common Lisp doc writes it: not in terms of BODY but in terms of what can follow TAG: zero or more forms (sexps). As I said, they write the syntax this way: (catch TAG {FORM}*) In the Oracle docs (FWIW) we use a form of BNF. We would write it this way: (catch TAG FORM...) The ellipsis indicates that a FORM can be repeated any number of times, including zero times. How does that differ from the Emacs (catch TAG BODY...)? It doesn't! Which is why I wrote this bug report. It is the text that accompanied that syntax description that didn't fit with it. Using BODY instead of FORM, and then speaking as if "body" referred not to an arbitrary individual sexp that can be repeated but collectively to everything that follows TAG is, IMO, inconsistent/misleading. But your reply indicated that you viewed `BODY...' collectively as the "body" (not BODY as the "body"), so `BODY...' for you (Emacs) is a kind of splice notation. You objected to my interpretation of the syntax description as indicating repetitions of BODY, and my complaint that what was repeated was not a "body". You made it clear that there was only one "body", corresponding to only one `BODY...' (which is not a repetition of BODY). I agreed that your way of looking at it is OK, but in that case, the `BODY...' syntax needs to be defined for readers. And since it looks just like the more common syntax description where X... means repetitions of X, some readers are bound to be confused. That's were we left the discussion. If you now say that you are open to looking for another syntax to use, then I would return to my initial suggestion (but I won't argue that it is the only good approach): use `...' to mean repetitions of whatever it follows, in this case a sexp, and thus write (catch TAG FORM...). Introducing a grouping syntax operator (e.g. braces: {}), so the scope of the ellipsis can be controlled - e.g. (A B {C D}... E...) meaning that C D repeats and E repeats. Anyway, I think we understand each other now and I don't want to annoy you about this anymore. I'll be glad to give feedback on whatever you propose or come up with, if you want. Otherwise, I leave it up to you to decide what should be done. I've already said that I think things are a bit unclear to readers as they stand now (even if they are not incorrect), so I hope that something clearer is used. But I won't push it. Thanks for considering this.