From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: Re: M-= Date: Fri, 27 Jul 2012 12:59:52 +0200 Message-ID: <20498.29864.4168.252416@a1i15.kph.uni-mainz.de> References: <20494.21864.117259.772610@a1i15.kph.uni-mainz.de> <87obn13l3e.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1343386822 4384 80.91.229.3 (27 Jul 2012 11:00:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 Jul 2012 11:00:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 27 13:00:22 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SuiHO-0006Z4-Bv for ged-emacs-devel@m.gmane.org; Fri, 27 Jul 2012 13:00:22 +0200 Original-Received: from localhost ([::1]:46798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuiHN-0007pt-KV for ged-emacs-devel@m.gmane.org; Fri, 27 Jul 2012 07:00:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuiHD-0007ph-Di for emacs-devel@gnu.org; Fri, 27 Jul 2012 07:00:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuiH3-0007zb-38 for emacs-devel@gnu.org; Fri, 27 Jul 2012 07:00:11 -0400 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:46671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuiH2-0007yx-QP; Fri, 27 Jul 2012 07:00:01 -0400 Original-Received: from a1i15.kph.uni-mainz.de (a1i15.kph.uni-mainz.de [134.93.134.92]) by a1iwww1.kph.uni-mainz.de (8.14.4/8.13.4) with ESMTP id q6RAxqj6021865; Fri, 27 Jul 2012 12:59:52 +0200 Original-Received: from a1i15.kph.uni-mainz.de (localhost [127.0.0.1]) by a1i15.kph.uni-mainz.de (8.14.5/8.14.2) with ESMTP id q6RAxqBC023883; Fri, 27 Jul 2012 12:59:52 +0200 Original-Received: (from ulm@localhost) by a1i15.kph.uni-mainz.de (8.14.5/8.14.5/Submit) id q6RAxqsV023881; Fri, 27 Jul 2012 12:59:52 +0200 In-Reply-To: <87obn13l3e.fsf@gnu.org> X-Mailer: VM 8.2.0b under 23.4.2 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.93.134.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151916 Archived-At: >>>>> On Fri, 27 Jul 2012, Chong Yidong wrote: > Ulrich Mueller 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