unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Barry Margolin <barmar@alum.mit.edu>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to replace string for a block?
Date: Wed, 27 May 2009 15:44:03 +0000	[thread overview]
Message-ID: <20090527154403.GB984@muc.de> (raw)
In-Reply-To: <barmar-4D4751.08511227052009@mara100-84.onlink.net>

Hi, Barry!

On Wed, May 27, 2009 at 08:51:12AM -0400, Barry Margolin wrote:
> In article <mailman.7904.1243427777.31690.help-gnu-emacs@gnu.org>,
>  Alan Mackenzie <acm@muc.de> wrote:

> > transient-mark-mode is an ill thought out conflation of several
> > logically unrelated features, some of which have names which can only
> > have been thought up when their namers were smoking something
> > soothing, complicated to use, and utterly at variance with Emacs's
> > ethos of elegant simplicity and keeping out of the user's way.

> > Some people seem to like it, though.  ;-)

> I've been an Emacs user for almost 30 years.  For at least half that
> time transient-mark-mode didn't even exist, and after it was added (for
> the benefit of converts from PC word processors, I believe) I resisted
> enabling it for a long time, it seemed like sacrilege.  But I finally
> gave in a couple of years ago when I started using Emacs in GUI mode
> heavily at work, and I'm happy I did.  I particularly like when
> commands automatically operate on either the buffer or region depending
> on whether it's enabled.  I installed shell-command.el, which makes
> shell-command-on-region do this automagically.

I could probably cope with transient-mark-mode if had been systematically
thought out and its entities called unconfusing things.  The mark ISN'T
transient - once created, it exists until the buffer is killed.  The mark
and the region are never active - they aren't the sort of things that
ever actively DO anything, they never become agents.  "Receptive" would
have been a better word than "active", even if not very good.  This
confusion has given rise to bewildering names like
`mark-even-if-inactive', which is short for "mark is active even if it's
inactive".

The whole topic is such a cesspit of confusion and sloppy thinking, that
I decline to sully myself by even touching it.  t-m-m conflates three
logically unrelated things: (i) highlighting the region; (ii) "narrowing"
the effect of certain commands to the region; (iii) enabling/disabling
certain commands which work on the region (like C-w).  I can see the
benefit of (i) (though I dislike it strongly), and I suppose (ii) might
be handy, though given that C-x n n is so simple, I'm not exacly sure
what for.  As for (iii) - well, I don't need some fascist telling me when
I can delete my region, thank you very much!  That's actually what
`mark-even-if-inactive' means - it would be more accurately called
`region-commands-never-disabled'.  As to why (i) and (ii) aren't
available separately, I suppose lack of clear thinking in the hacker who
created it is the most plausible explanation.

The classical mark was so elegantly simple (it can be described in a
single concise sentence), yet also subtle and economical, the newbie
could grasp it in a few minutes of concentrated thinking.  Which of us
didn't get a "Eureka moment" on seeing how all the various uses of the
mark complemented eachother and jelled so well together?  All that is now
lost.  The imposition of transient mark mode on the newbie burdens him
with a random ragbag of complexity, and I have no good answer to the
anticipated newbie question "what do I have to go through all this stuff
for?".

Still, you like it.  :-)  Would you fancy fixing the documentation for
all this?  The Emacs manual page "The Mark and the Region" decends into
the "if you don't know what I mean by 'widget' you must be an idiot"
style of documentation.  It doesn't have a @dfn{active}.  (I can think of
a good reason. ;-)  It's also unsettling that it says that the text in a
region vanishes when you do something ("The region persists only until
you use it.", where @dfn{region} is THE TEXT between point and mark).
There are probably more confusing things in it.

> Barry Margolin, barmar@alum.mit.edu

-- 
Alan Mackenzie (Nuremberg, Germany).




  reply	other threads:[~2009-05-27 15:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 20:22 How to replace string for a block? Wu, Kejia
2009-05-26 20:38 ` Lennart Borgman
2009-05-26 20:44   ` Drew Adams
     [not found]   ` <mailman.7863.1243370655.31690.help-gnu-emacs@gnu.org>
2009-05-27  8:56     ` Pascal J. Bourguignon
2009-05-27 12:36       ` Alan Mackenzie
     [not found]       ` <mailman.7904.1243427777.31690.help-gnu-emacs@gnu.org>
2009-05-27 12:51         ` Barry Margolin
2009-05-27 15:44           ` Alan Mackenzie [this message]
2009-05-27 17:37             ` Andreas Röhler
2009-05-27 17:26           ` Vagn Johansen
2009-05-28  1:03             ` Barry Margolin
     [not found]           ` <mailman.7922.1243439002.31690.help-gnu-emacs@gnu.org>
2009-05-28  0:55             ` Transient mark mode (was Re: How to replace string for a block?) Barry Margolin
2009-05-27 13:35       ` How to replace string for a block? Drew Adams
2009-05-26 21:56 ` Wu, Kejia

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=20090527154403.GB984@muc.de \
    --to=acm@muc.de \
    --cc=barmar@alum.mit.edu \
    --cc=help-gnu-emacs@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.
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).