From: "Drew Adams" <drew.adams@oracle.com>
To: 14228@debbugs.gnu.org
Subject: bug#14228: 24.3.50; doc of `event-start': nonsensical, incomplete, inconsistent
Date: Thu, 18 Apr 2013 10:14:03 -0700 [thread overview]
Message-ID: <2B7219AEF4554855BC07241B6C6A6B6B@us.oracle.com> (raw)
This pertains to `event-start' and `event-end' (and perhaps to more).
1. The doc string and (elisp) `Accessing Mouse' do not agree. The
former says that arg EVENT can be a "key press event". The latter
limits it to mouse events ("the data in a mouse button or motion
event").
2. The doc string of `event-start' specifies the form of EVENT as being
either (WINDOW POS (0.0) 0) or (WINDOW AREA-OR-POS (X . Y) TIMESTAMP
OBJECT POS (COL . ROW) IMAGE (DX . DY) (WIDTH . HEIGHT)).
But *none* of those terms are described. What is POS? IMAGE? OBJECT?
etc. Incomprehensible.
3. In particular, the doc string says that if EVENT is a key press event
then the value returned by `event-start' has the form (WINDOW POS (0.0)
0). What is POS?
Anyway, looking at the code and experimenting, it does NOT seem that
`event-start' always returns the form (WINDOW POS (0.0) 0). I sometimes
see a form like this, for instance: (#<window 03FC1840 on foobar> 132
(231 . 24) 0 nil 132 (33 . 2) nil (0 . 0) (7 . 12)) (which is what is
returned by `posn-at-point').
But it is more important that nothing is said about what POS is. At
least it should be said that it is the value of `point' in the current
buffer when the key was pressed, since that seems to always be the case
(?).
4. (elisp) `Accessing Mouse' is incomplete. It does not even mention
key-press events. Well, of course this is a node about `Accessing
Mouse'. But in that case the functions that accept key-press events are
documented in the wrong node, since they are not limited to mouse
access/events.
It is true that `Accessing Mouse' refers to node `Click Events' for the
form of the return value. But that description has the same problem wrt
key-press events.
When, for Emacs 22, you extended these functions to handle key-press
events, the doc should have been updated properly. Instead, the Emacs
21 doc was taken as is, with only a "key press" thrown in here and
there.
Not clear, consistent, and complete.
In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
of 2013-04-15 on ODIEONE
Bzr revision: 112292
agustin.martin@hispalinux.es-20130415100014-3vaie95fyec9wk37
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.7) --no-opt --enable-checking --cflags
-IC:/Devel/emacs/build/include --ldflags -LC:/Devel/emacs/build/lib'
next reply other threads:[~2013-04-18 17:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-18 17:14 Drew Adams [this message]
2014-02-08 11:52 ` bug#14228: 24.3.50; doc of `event-start': nonsensical, incomplete, inconsistent Lars Ingebrigtsen
2014-02-08 14:32 ` Eli Zaretskii
2014-02-09 1:56 ` Lars Ingebrigtsen
2014-02-09 3:45 ` Eli Zaretskii
2014-02-10 21:55 ` Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2B7219AEF4554855BC07241B6C6A6B6B@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=14228@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).