all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: 6591@debbugs.gnu.org, 'Richard Stallman' <rms@gnu.org>
Subject: bug#6591: 24.0.50; incorrect doc for `catch'
Date: Sun, 11 Jul 2010 08:33:34 -0700	[thread overview]
Message-ID: <231065DA146544BC8F04D09E33D823A5@us.oracle.com> (raw)
In-Reply-To: <83sk3qv922.fsf@gnu.org>

> > 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.
> 
> Using FORM... is okay, but will need more extensive changes, so I'd
> rather not do it.  I'd like to simply remove the dots after BODY, and
> explain in the text that BODY can consist of one or more forms.

AND that list of forms is SPLICED IN.  That's the important part that needs to
be made clear if you take your approach.

IOW, reading what you just wrote, a reader will assume that BODY might be (A B
C) when what you meant was A B C.  E.g. this is not valid: (catch 'foo ((setq a
b) (terpri) (set-buffer z))).  But it follows your description fine: "BODY can
consist of one or more forms".

We will agree to disagree on this one.

IMO, readers will not be helped, and doc maintenance will be increased in the
long run, by doing what you suggest.  There is a mismatch between what someone
sees in the syntax description, (catch TAG BODY), and what the surrounding text
needs to say in order to explain that syntax.

A user sees TAG and BODY directly, and naturally supposes that each is a
placeholder and the kind of thing substitutable for each placeholder is the same
or similar.

The text needs (at *each* occurrence of this phenomenon) to explain that this is
not the case: TAG is replaceable by a sexp, BODY is replaceable by a list of
sexps, but the list is spliced in.

It's easy enough to say that in `(A B C)' A is a placeholder for a function
symbol, B for an integer and C for any sexp (or whatever) - the types of the
placeholders are straightforward.  It is not so easy to explain that BODY in
(catch TAG BODY) is a list of sexps but that list has no surrounding parens etc.

It's your call, but in the long run what you propose will lead to more complex,
confusing doc and increased doc maintenance.  That will help neither reader nor
writer.

> Does anyone see any reason why keeping the dots in BODY... will have
> some didactical importance?  Richard? Stefan? Yidong?







  parent reply	other threads:[~2010-07-11 15:33 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-09 15:52 bug#6591: 24.0.50; incorrect doc for `catch' Drew Adams
2010-07-09 17:48 ` Eli Zaretskii
2010-07-09 19:36   ` Drew Adams
2010-07-10  7:48     ` Eli Zaretskii
2010-07-10 14:14       ` Drew Adams
2010-07-10 14:38         ` Eli Zaretskii
2010-07-10 15:44           ` Drew Adams
2010-07-10 15:55             ` Eli Zaretskii
2010-07-11  4:21               ` Drew Adams
2010-07-11  6:15                 ` Eli Zaretskii
2010-07-11  8:14                   ` Štěpán Němec
2010-07-11  9:22                     ` Eli Zaretskii
2010-07-11 10:59                       ` Štěpán Němec
2010-07-11 13:23                         ` Eli Zaretskii
2010-07-11 13:44                           ` Štěpán Němec
2010-07-11 14:00                             ` Eli Zaretskii
2010-07-11 15:26                               ` Andreas Schwab
2010-07-11 15:33                                 ` Drew Adams
2010-07-11 17:22                                 ` Eli Zaretskii
     [not found]                               ` <mailman.11.1278862210.6344.bug-gnu-emacs@gnu.org>
2010-07-11 22:36                                 ` Tim X
     [not found]                           ` <mailman.2.1278856813.6344.bug-gnu-emacs@gnu.org>
2010-07-11 22:34                             ` Tim X
2010-12-08 15:52                               ` Drew Adams
2010-12-20 12:25                                 ` Chong Yidong
2010-07-11 15:33                   ` Drew Adams [this message]
2010-07-11 17:25                     ` Eli Zaretskii
2010-07-11 16:33                   ` Chong Yidong
2010-07-11 16:52                     ` Drew Adams
2010-07-11 17:13                       ` Chong Yidong
2010-07-11 17:58                         ` Drew Adams
2010-07-11 18:14                       ` Andreas Schwab
2010-07-11 19:10                         ` Drew Adams
2010-07-11 19:40                           ` Andreas Schwab
2010-07-11 20:07                             ` Drew Adams
2010-07-11 21:22                               ` Andreas Schwab
2010-07-11 21:42                                 ` Chong Yidong
2010-07-11 21:44                                 ` Drew Adams
2010-07-12  8:43                                   ` Andreas Schwab
2010-07-12 14:56                                     ` Drew Adams
2010-07-12 15:26                                       ` Andreas Schwab
2010-07-12 16:01                                         ` Drew Adams
2010-07-12 16:11                                           ` Andreas Schwab
2010-07-12 16:31                                             ` Drew Adams
2010-07-12 16:36                                               ` Andreas Schwab
2010-07-12 16:50                                                 ` Drew Adams
2010-07-12 18:14                                                   ` Andreas Schwab
2010-07-12 18:35                                                     ` Drew Adams
2010-07-12 18:41                                                       ` Andreas Schwab
2010-07-12 18:49                                                         ` Drew Adams
2010-07-12 17:02                                           ` Eli Zaretskii
2010-07-12 18:30                                             ` Drew Adams
2010-07-10  5:44 ` MON KEY

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=231065DA146544BC8F04D09E33D823A5@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=6591@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.