emacs-devel
[Top][All Lists]
Advanced

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

Re: M-=


From: Ulrich Mueller
Subject: Re: M-=
Date: Fri, 27 Jul 2012 12:59:52 +0200

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

> Ulrich Mueller <address@hidden> 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 via email to

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