all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: Chong Yidong <cyd@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: M-=
Date: Fri, 27 Jul 2012 12:59:52 +0200	[thread overview]
Message-ID: <20498.29864.4168.252416@a1i15.kph.uni-mainz.de> (raw)
In-Reply-To: <87obn13l3e.fsf@gnu.org>

>>>>> On Fri, 27 Jul 2012, Chong Yidong wrote:

> Ulrich Mueller <ulm@gentoo.org> writes:
>> I've noticed that M-= is no longer operating on the region but on the
>> whole buffer (i.e. it is bound to count-words instead of
>> count-words-region).
>> 
>> The old behaviour was established for decades and I found it much more
>> useful. Can we please have it back?

> I made the change because it seemed like a fairly straightforward
> improvement, but if the old behavior is generally preferred or the
> change is found to be too disruptive, we can certainly revert it.

> The rule of thumb is that when transient mark mode is enabled, commands
> that are bound to convenient keys ought to act on the region if it is
> active, and some other convenient unit of text otherwise.  Examples of
> this behavior are M-; and M-$.  There are exceptions: C-w and M-w always
> act on the region, because yanking the whole buffer is a relatively rare
> operation, and has annoying results if you accidentally trigger it.

C-x C-u is another example that unconditionally acts on the region.
(Please don't change this!)

> Counting words seems like it should fall in the former category
> (together with M-; and M-$) rather than the latter (with C-w and M-w).
> But maybe you can explain otherwise?

I certainly use M-= on the region much more often than on the whole
buffer. With transient-mark-mode switched off, I now find it rather
painful. Especially combinations like M-h M-= (i.e., mark-paragraph
followed by count-words-region) no longer work.

Also M-= was bound to count-lines-region (or later count-words-region)
since Emacs 18 at least. OTOH, during all that time there wasn't any
key that did this operation for the whole buffer. From that I conclude
that it wasn't missed, otherwise a key binding would have been added.

> Another possibility is to keep M-= for count-words-region and assign
> another convenient key to count-words.  The obvious candidate is C-=,
> but unfortunately it is not typable on text terminals.

I wouldn't mind that. But how about M-+ ?

Ulrich



  reply	other threads:[~2012-07-27 10:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24  7:57 M-= Ulrich Mueller
2012-07-24  9:37 ` M-= Tassilo Horn
2012-07-24 10:13   ` M-= Ulrich Mueller
2012-07-24 10:28     ` M-= Tassilo Horn
2012-07-27  4:05 ` M-= Chong Yidong
2012-07-27 10:59   ` Ulrich Mueller [this message]
2012-07-27 14:57     ` M-= Tassilo Horn
2012-07-27 16:24       ` M-= Ulrich Mueller
2012-07-27 17:32         ` M-= Tassilo Horn
2012-07-29  3:33     ` M-= Chong Yidong
2012-07-27 17:30   ` M-= James Cloos
2012-07-27 19:02     ` M-= Andreas Röhler
  -- strict thread matches above, loose matches on Subject: below --
2012-07-24  9:03 M-= Dmitry Gutov
2012-07-24  9:24 ` M-= Ulrich Mueller
2003-04-04 22:57 M-[ greg jednaszewski
2003-04-04 23:59 ` M-[ Barry Margolin
2003-04-07 17:40   ` M-[ Peter Lee
2003-04-07 18:14   ` M-[ Kevin Rodgers

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=20498.29864.4168.252416@a1i15.kph.uni-mainz.de \
    --to=ulm@gentoo.org \
    --cc=cyd@gnu.org \
    --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.