From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Rethinking count-words-region Date: Sat, 08 Oct 2011 23:04:06 +0300 Organization: JURTA Message-ID: <87r52nw7cx.fsf@mail.jurta.org> References: <87vcs0q05l.fsf@stupidchicken.com> <87d3e75st9.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1318106125 375 80.91.229.12 (8 Oct 2011 20:35:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 8 Oct 2011 20:35:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 08 22:35:21 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RCdc6-0002kU-4Z for ged-emacs-devel@m.gmane.org; Sat, 08 Oct 2011 22:35:18 +0200 Original-Received: from localhost ([::1]:59541 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCdc5-0005D9-JN for ged-emacs-devel@m.gmane.org; Sat, 08 Oct 2011 16:35:17 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCdc3-0005D1-Kj for emacs-devel@gnu.org; Sat, 08 Oct 2011 16:35:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCdc2-0000jS-Sb for emacs-devel@gnu.org; Sat, 08 Oct 2011 16:35:15 -0400 Original-Received: from smarty.dreamhost.com ([208.113.175.8]:59251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCdc2-0000jO-Ib for emacs-devel@gnu.org; Sat, 08 Oct 2011 16:35:14 -0400 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 66B386E80AA; Sat, 8 Oct 2011 13:35:13 -0700 (PDT) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 7CF65451C52D; Sat, 8 Oct 2011 13:35:12 -0700 (PDT) In-Reply-To: <87d3e75st9.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 08 Oct 2011 12:52:50 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.113.175.8 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:144763 Archived-At: > The previous count-words-region behavior is assigned to a new > `count-words' command, which acts on the region if use-region-p and on > the buffer otherwise. One problem: when I type `M-=', it fails with: Debugger entered--Lisp error: (mark-inactive) call-interactively(count-words-region nil nil) That's because I customized `mark-even-if-inactive' to `nil' (to avoid its dangerous behavior when it's non-nil). Maybe `count-words-region' should take care of this case? Better yet to bind `M-=' to a new command with a general name like suggested `count-stats' that will take care of different region activation cases and report all possible counts.