From: "Drew Adams" <drew.adams@oracle.com>
To: "'David De La Harpe Golden'" <david@harpegolden.net>
Cc: emacs-devel@gnu.org
Subject: RE: how to test whether region is active during a mouse event?
Date: Sun, 2 Aug 2009 15:32:11 -0700 [thread overview]
Message-ID: <9F61EE6C95DF490CBF8F82BDA876EC08@us.oracle.com> (raw)
In-Reply-To: <4A760F98.8090904@harpegolden.net>
> > Also good to know, I guess. What was the bug (in practical,
> > use-case terms) that this is intended to fix?
>
> select-active-regions was winding up setting incorrect selections in
> some mouse interactions like the ones you were doing. It
> "snapshots" the last active region's contents when the mark
> deactivates so that it can persist as-is after the mark is
> deactivated. Without the reordering, it was getting the wrong
> string sometimes but not always (in a pattern that of course
> retrospectively makes sense, but at the time, man...)
OK, thanks for the explanation, David.
FWIW -
I never heard of `select-active-regions'. That option is not documented in the
Emacs manual or the Elisp manual. And the doc string does not, I'm afraid, help
me understand what it is for or what it does.
Doc string:
"If non-nil, an active region automatically becomes the window selection."
I have no idea what the "window-selection" is. And that term is not even used
anywhere else in the same file that defines it (simple.el). Is it
described/defined anywhere?
Also, user option `select-active-regions' is not used anywhere in the Lisp code,
except for a single occurrence in the definition of function `set-mark'. And
although the option modifies the behavior of `set-mark', it is not mentioned in
the doc (e.g. doc string) for `set-mark'.
To me, this lack of explanation/description is a doc bug, but if you like, take
it as a friendly suggestion:
This is a user option. If you really expect users to understand and use it, then
a little more guidance would help. As it is, (a) I haven't a clue, and (b) I
never would have heard of this if you hadn't referred to it, in passing, in the
context of a bug fix.
The only way to understand what this does is to grep the source code and
discover that it serves as a guard, to prevent (if nil) setting the X-Window
selection. At least that much should be said. If you say "X-Window selection",
at least a user will have something to look up, if it's not clear. "window
selection" is much less helpful.
HTH.
next prev parent reply other threads:[~2009-08-02 22:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-02 18:55 how to test whether region is active during a mouse event? Drew Adams
2009-08-02 19:00 ` Drew Adams
2009-08-02 20:31 ` David De La Harpe Golden
2009-08-02 20:50 ` Drew Adams
2009-08-02 22:13 ` David De La Harpe Golden
2009-08-02 22:32 ` Drew Adams [this message]
2009-08-03 0:13 ` David De La Harpe Golden
2009-08-06 15:47 ` Stefan Monnier
2009-08-06 16:16 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9F61EE6C95DF490CBF8F82BDA876EC08@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=david@harpegolden.net \
--cc=emacs-devel@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.