From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: acm@muc.de, cyd@stupidchicken.com,
Stefan Monnier <monnier@iro.umontreal.ca>,
emacs-devel@gnu.org
Subject: Re: Documentation of transient-mark-mode is sloppy, wrong, and confused.
Date: Fri, 29 May 2009 18:55:29 +0900 [thread overview]
Message-ID: <871vq8cjxq.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <83zlcwqp89.fsf@gnu.org>
Eli Zaretskii writes:
> > > email. Sorry for the poor wording - it's late and I'm tired.
> >
> > I would find this fairly confusing
>
> So would I. If you read this text carefully, it actually says
> something like "the region is active when Emacs marks it as active."
> That's hardly a definition of what "active" is.
Read a little more carefully. It also explains how the behavior of
Emacs changes when the mark is active. That *is* a definition of
"active". ACM did say he was tired, but he's rarely *that* tired.
How about
In Emacs, the region is the substring of buffer text between point
and mark. If the mark is not set, then there is no region.
(Point always exists, and the mark is normally set early in the
life of a buffer, and is moved, not unset, thereafter.) Some
commands operate on this region, copying it, killing it, deleting
it, or transforming it. [Insert list here if you like.]
In transient mark mode, the region may be active or inactive.
This is implemented as an internal flag which is set implicitly by
commands which highlight the region (for example, "shifted motion
commands"). The flag's value is accessed with `region-active-p'.
In transient mark mode, commands that operate on the region
require it to be active, or they signal an error. That is, when
transient mark mode is on, we say the region is @def{active} when
region commands are effective. Otherwise, we say the region is
@def{not active}.
When transient mark mode is off, the region is never highlighted,
and commands that operate on the region will error only in the
case that the mark is unset in that buffer, and the region does
not exist. We also say the region is @def{not active} whenever
transient mark mode is off.
As a sort of abuse of terminology, it is often said that "the mark
is active" (resp. "not active"), when what is meant is "the region
is active" (resp. "not active"). "Inactive" may be used as a
synonym for "not active".
I'm probably missing or wrong on some details, but as an outline
something like the above should do.
IMO, a large part of the problem here is confusing the mark with the
region. If the mark is set, you can always do `(goto-char (mark))' or
M-x pop-mark, etc. The mark is *not* transient. The region is. But
I guess it's too late to fix that.
I swear on a stack of Bibles that the above text was written by me, my
employer has no clue or claim on it, and I hereby contribute it to
XEmacs (and veto its application since we don't have transient mark
mode, thank Jamie!) But it's now the FSF's; do with it what you will,
my papers for XEmacs are on file.
next prev parent reply other threads:[~2009-05-29 9:55 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 12:29 Documentation of transient-mark-mode is sloppy, wrong, and confused Alan Mackenzie
2009-05-28 16:54 ` Chong Yidong
2009-05-28 20:15 ` Alan Mackenzie
2009-05-28 20:48 ` Chong Yidong
2009-05-28 23:03 ` Alan Mackenzie
2009-05-28 23:53 ` Davis Herring
2009-05-29 11:01 ` Alan Mackenzie
2009-05-29 0:21 ` Chong Yidong
2009-05-29 1:55 ` Stefan Monnier
2009-05-29 4:30 ` Kevin Rodgers
2009-05-29 5:47 ` Andreas Roehler
2009-05-29 8:25 ` Stephen J. Turnbull
2009-05-29 8:58 ` Alan Mackenzie
2009-06-01 2:34 ` Stephen J. Turnbull
2009-06-01 9:40 ` Lennart Borgman
2009-06-02 6:23 ` Andreas Roehler
2009-06-02 11:50 ` Stephen J. Turnbull
2009-05-29 8:37 ` Eli Zaretskii
2009-05-29 9:27 ` Alan Mackenzie
2009-05-29 10:11 ` Eli Zaretskii
2009-05-29 13:13 ` Alan Mackenzie
2009-05-29 14:19 ` Stefan Monnier
2009-05-29 16:40 ` Drew Adams
2009-05-29 22:20 ` Alan Mackenzie
2009-05-30 0:11 ` Drew Adams
2009-05-29 9:55 ` Stephen J. Turnbull [this message]
2009-05-29 10:14 ` Eli Zaretskii
2009-06-01 2:09 ` Stephen J. Turnbull
2009-05-29 10:45 ` Andreas Roehler
2009-05-29 8:38 ` Eli Zaretskii
2009-05-29 9:35 ` Alan Mackenzie
2009-05-29 9:48 ` Eli Zaretskii
2009-05-29 13:17 ` Alan Mackenzie
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=871vq8cjxq.fsf@uwakimon.sk.tsukuba.ac.jp \
--to=stephen@xemacs.org \
--cc=acm@muc.de \
--cc=cyd@stupidchicken.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.