[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enabling Transient Mark Mode by default

From: Jason Earl
Subject: Re: Enabling Transient Mark Mode by default
Date: Wed, 20 Feb 2008 17:42:23 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

David Kastrup <address@hidden> writes:

> Jason Earl <address@hidden> writes:
>> Yes, I agree that transient-mark-mode works somewhat differently than
>> most text editors.  However, without transient-mark-mode Emacs is
>> *remarkably* different than other editors.  More importantly,
>> transient-mark-mode helps give the newbie clues as to how setting the
>> region works in Emacs.  Think of it as training wheels for region
>> marking.
>> Without those visual clues it is easy for even the experienced Emacs
>> user to forget where the mark is.  Of course, the experienced Emacs
>> user has read the manual and knows about C-x C-x and friends.
> You don't need to read the manual.  The tutorial is sufficient as are
> the help sheets.  And without learning at least some basics, Emacs is
> not going to be fun.
>> The newbie, on the other hand, doesn't have a clue about these
>> keystrokes.  As far as they are concerned Emacs is simply too
>> old-fashioned to do something sensible like highlight the region they
>> are marking.  To make matters worse the new user is in for a surprise
>> when they try to actually use the "invisible" region that they are
>> trying to mark because, as you point out, it is likely to work
>> differently than they expect.  At least with transient-mark-mode Emacs
>> gives the user some visual clues that can help the new user figure out
>> what just happened to their text.
> Sorry, but you miss the fact that the highlighted region is _active_
> whereas the non-highlighted region is _inactive_.  And _active_ region
> changes the meaning of lots of commands, making them operate on the
> region instead of their normal range.  An _inactive_ region defined
> with mark and point does not have such an effect.  It merely sets mark
> somewhere but assigns no special meaning to the region.  Only commands
> explicitly working on the region between mark and point are ever
> affected.

Even an inactive region has meaning (C-w proves it).  What it doesn't
have is some sort of visible clue as to where it is.  That makes the
mark a useful bookmark for experts who have read the manual (the
TUTORIAL doesn't mention C-x C-x and friends) and useless and confusing
to anyone else.  The TUTORIAL mentions the mark one time, but it
certainly doesn't talk about potential uses for it other than cutting
regions of text.

For the new user the mark doesn't exist.  Unless, of course, they turn
on transient-mark-mode, then, when the region is active the user can see
where the mark and point happen to be.

> So transient-mark-mode does something quite different from merely
> highlighting the region.  It changes its meaning.

Yes, it changes the meaning in a way that even people that don't like
transient-mark-mode seem to like.  That's why commands behave
differently with active regions.  Or are you suggesting this feature
should go away?

A new user that highlights a region using transient-mark-mode and then
does M-x query-replace to replace some text isn't going to be surprised
that only text in the highlighted region is affected.  Or if they are
surprised they are likely to be excited by the fact that they can search
and replace in a subset of a file easily.  After all, you can always
make the region inactive and run the command again.

I know that when I stumbled across that functionality that I thought it
was pretty cool.

The whole point of marking a region is that you are going to do
something to that region.

The real tragedy is that, without transient-mark-mode, new users won't
even know that they can run commands on a region of the text because
they won't learn about making a region active unless they stumble
accross the part of the manual that talks about The Mark and the Region.
Even if you do stumble upon that section it doesn't tell you that making
the region active changes the way many commands work.

Like I mentioned before, I personally found out about this particular
feature by accident.  I assume that most of the people here found out
about the feature by reading Emacs Lisp source code.  That's fine if you
are an Emacs Lisp developer.  It's not so fine for the rest of us.

If Emacs were some sort of text adventure (and I suppose that it is)
then this sort of discovery would be worth quite a few points.
Personally, I am glad that someone has decided that the default going
forward is to give newcomers a clue by turning on transient-mark-mode
and showing people (by default) the cool things that can be done with
active regions.

Yes, transient-mark-mode screws up the bookmarking features of inactive
regions and marks (well, actually it just highlights the region, but why
get technical).

>> Marking regions in Emacs *should* be different than how it is done in
>> other editors because the way Emacs marks regions is better :).
>> However, it is not likely to *seem* better to the uninitiated if they
>> have a hard time telling what parts of the text comprise the region.
> But the highlighting of tmm does more than show mark and point.

Yes, it makes marking the region actually useful for a whole pile of
commands at the expense of making the mark less useful as a bookmark.

It's likely that I am missing some other magical use of the invisible
mark, I just started using it today.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]