From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21501: new Emacs functions for capitalizing text intelligently Date: Sun, 20 Sep 2015 09:46:42 +0300 Message-ID: <83eghtpoz1.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1442731643 2458 80.91.229.3 (20 Sep 2015 06:47:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Sep 2015 06:47:23 +0000 (UTC) Cc: 21501@debbugs.gnu.org To: Zachary Kanfer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 20 08:47:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ZdYP0-0007If-IC for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Sep 2015 08:47:10 +0200 Original-Received: from localhost ([::1]:50291 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdYOz-0000Wf-TI for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Sep 2015 02:47:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdYOw-0000WM-Mj for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 02:47:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdYOt-0006sj-Fn for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 02:47:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdYOt-0006sf-Cr for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 02:47:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZdYOs-0006F7-9r for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 02:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Sep 2015 06:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21501 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21501-submit@debbugs.gnu.org id=B21501.144273160023969 (code B ref 21501); Sun, 20 Sep 2015 06:47:02 +0000 Original-Received: (at 21501) by debbugs.gnu.org; 20 Sep 2015 06:46:40 +0000 Original-Received: from localhost ([127.0.0.1]:38046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZdYOV-0006EW-Lc for submit@debbugs.gnu.org; Sun, 20 Sep 2015 02:46:39 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:32940) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZdYOT-0006EN-D2 for 21501@debbugs.gnu.org; Sun, 20 Sep 2015 02:46:38 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NUY00A00QQHKE00@a-mtaout22.012.net.il> for 21501@debbugs.gnu.org; Sun, 20 Sep 2015 09:46:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUY00A92QTN9P70@a-mtaout22.012.net.il>; Sun, 20 Sep 2015 09:46:35 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106715 Archived-At: > From: Zachary Kanfer > Date: Sun, 20 Sep 2015 02:13:39 -0400 > Cc: 21501@debbugs.gnu.org > > Here's a changed patch. Thanks. Allow me a couple of minor comments. > I'm in favor of changing M-u, M-l, and M-c to the new commands; I think it's > much improved behavior. The only time a user would have to do more work to > perform a capitalization action is if they've selected a region, but want to > act only on the next word. I would bet that's rare, and even so, the user only > has to press C-g before the capitalization. So if we're ok changing default > commands, I think changing M-u, M-l, and M-c is a win. For us to be able to bind M-u etc. to these new commands, they need to support the prefix argument to upcase-word etc. The way you wrote these new commands, that feature will be lost. > +;;; Functions relating to capitalization that Do What I Mean > +(defun upcase-dwim () > + "Call the upcase command you want (Do What I Mean). > +If the region is active, call `upcase-region'. Otherwise call > +`upcase-word'." Every doc string should state the effect of the function/variable in its first line, because some Help commands (like 'apropos') show only the first line. The above doc string (and the others in your patch) don't do that; the effect is only clear if one reads the rest of the doc string. I suggest to change the doc strings like this: Upcase words in the region, if active; otherwise upcase word at point. If the region is active, this function calls `upcase-region'. Otherwise it calls `upcase-word'.