all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: 9452@debbugs.gnu.org
Subject: bug#9452: 24.0.50; doc string of `constrain-to-field'
Date: Tue, 6 Sep 2011 11:51:59 -0700	[thread overview]
Message-ID: <1A73BA9F32054BCDABC84307BE3C8494@us.oracle.com> (raw)

1. The doc for this, and for all things concerning fields, is quite
complex - not simple to read.  Dunno whether it could be made simpler
and still be complete and correct.  It seems clear, but you must read it
carefully, and probably more than once.
 
2. The elisp manual's description of `constrain-to-field' is better than
the doc string's.  In particular, the fact that a nil NEW-POS has the
side effect of (possibly) moving point is clearer.  The manual says:
 
 "If NEW-POS is `nil', then `constrain-to-field'...moves point to the
  resulting position as well as returning it."
 
(The English is not really correct, however: It should say "moves"..."
and returns", not "moves"...and "returning".)
 
The doc string is not as clear about point moving.  It says:
 
 "If NEW-POS is nil, then the current point is used instead, and set to
  the constrained position if that is different."
 
We do not "set" point, for one thing.  And the passive voice ("is used",
"is set to") waters meaning down here.
 
But the real problem is that users reading this might not catch the fact
that _point is moved_.  Use language similar to the manual's: "moves" is
an active verb and makes clear that there is a side effect of (possibly)
moving point.
 
Even in the manual this important difference in behavior when NEW-POS is
nil is not so noticeable.  We should emphasize to users that null
NEW-POS means point might move.  This is an important use case for
`constrain-to-field', and it almost gets lost in the verbiage about the
args.
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-09-05 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt'
 






             reply	other threads:[~2011-09-06 18:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-06 18:51 Drew Adams [this message]
2012-03-11 16:28 ` bug#9452: 24.0.50; doc string of `constrain-to-field' Chong Yidong

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=1A73BA9F32054BCDABC84307BE3C8494@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=9452@debbugs.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.