From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Zachary Kanfer Newsgroups: gmane.emacs.bugs Subject: bug#21501: new Emacs functions for capitalizing text intelligently Date: Sun, 20 Sep 2015 02:13:39 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=089e0158b258a4d8c7052027ab78 X-Trace: ger.gmane.org 1442729723 10182 80.91.229.3 (20 Sep 2015 06:15:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Sep 2015 06:15:23 +0000 (UTC) Cc: 21501@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 20 08:15:14 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 1ZdXu5-00027L-Rr for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Sep 2015 08:15:14 +0200 Original-Received: from localhost ([::1]:50198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdXu5-0005uh-6m for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Sep 2015 02:15:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdXtz-0005sk-KE for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 02:15:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdXtw-0000tx-DP for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 02:15:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdXtw-0000td-8l for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 02:15:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZdXtv-0005Wx-Pa for bug-gnu-emacs@gnu.org; Sun, 20 Sep 2015 02:15:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Zachary Kanfer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Sep 2015 06:15:03 +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.144272964321175 (code B ref 21501); Sun, 20 Sep 2015 06:15:03 +0000 Original-Received: (at 21501) by debbugs.gnu.org; 20 Sep 2015 06:14:03 +0000 Original-Received: from localhost ([127.0.0.1]:38042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZdXsw-0005VS-By for submit@debbugs.gnu.org; Sun, 20 Sep 2015 02:14:03 -0400 Original-Received: from mail-ob0-f172.google.com ([209.85.214.172]:36249) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZdXst-0005Uw-P8 for 21501@debbugs.gnu.org; Sun, 20 Sep 2015 02:14:00 -0400 Original-Received: by obbmp4 with SMTP id mp4so28808546obb.3 for <21501@debbugs.gnu.org>; Sat, 19 Sep 2015 23:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Ww8Iy5RRkgJI5fbBiFb6TVyOkyU34UJaKGw4IeXnR5I=; b=yLtUhaIgrYNnLyh1MXydhAdMr/I+k1U7ClWjiVpB6dELBW7e8eO/T1imOFEAd9pSHV D6zf8I3Ag4YsyeOk+9xc2THF+Ew4tPgxqVpPETGe3Hx9KKO2xmaUxaOpjDAlPJZVLxVq 8z8derM0UVWlXJTJEcoTm6Q55Bg2i7DKsAbF7N6ip73HUHluHlSVv1rYuY0luL0eni3C DwaVchfiz3Qvp5Zt+vU+/CuNpctahzyxGNpugpiBfnwVo2F9pCEFj6wajCiQzR5sM+3s R0gSxrd8at7onbXRbOdzLc1/Wh5IGA7sTFBIgZubxEAFtr9IE4EqaOFP6afaRGB7JOAI uCBQ== X-Received: by 10.182.247.99 with SMTP id yd3mr7944608obc.37.1442729639024; Sat, 19 Sep 2015 23:13:59 -0700 (PDT) Original-Received: by 10.76.170.164 with HTTP; Sat, 19 Sep 2015 23:13:39 -0700 (PDT) In-Reply-To: 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:106714 Archived-At: --089e0158b258a4d8c7052027ab78 Content-Type: multipart/alternative; boundary=089e0158b258a4d8bf052027ab76 --089e0158b258a4d8bf052027ab76 Content-Type: text/plain; charset=UTF-8 Here's a changed patch. The first line is the first line of the changelog entry without "simple.el"; it doesn't fit. 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. On Sat, Sep 19, 2015 at 4:27 PM, Stefan Monnier wrote: > > I'm submitting some additional -dwim functions to that change the > > capitalization of text the way the user probably wants. > > Looks OK to me. > > > Changelog entry: > > * simple.el: Add functions for capitalizing text intelligently. > > (capitalize-dwim): New function. > > (upcase-dwim): New function. > > (downcase-dwim): New function. > > Thanks. Please add that to the commit message. More specifically, use > the first line above as the first line of the commit message, and add > > (capitalize-dwim, upcase-dwim, downcase-dwim): New functions. > > at the end. > > I'm tempted to bind M-u, M-l, and M-c to those new commands. > > WDYT? > > > Stefan > --089e0158b258a4d8bf052027ab76 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Here's a changed patch. The first line is the fir= st line of the changelog entry without "simple.el"; it doesn'= t fit.

I'm in favor of changing M-u, M-l, and M-c to the n= ew 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= 9;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 cap= italization. So if we're ok changing default commands, I think changing= M-u, M-l, and M-c is a win.

On Sat, Sep 19, 2015 at 4:27 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> I'm submitting some additional -dwim functions to that c= hange the
> capitalization of text the way the user probably wants.

Looks OK to me.

> Changelog entry:
> * simple.el: Add functions for capitalizing text intelligently.
> (capitalize-dwim): New function.
> (upcase-dwim): New function.
> (downcase-dwim): New function.

Thanks.=C2=A0 Please add that to the commit message.=C2=A0 More specificall= y, use
the first line above as the first line of the commit message, and add

=C2=A0 =C2=A0(capitalize-dwim, upcase-dwim, downcase-dwim): New functions.<= br>
at the end.

I'm tempted to bind M-u, M-l, and M-c to those new commands.

WDYT?


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--089e0158b258a4d8bf052027ab76-- --089e0158b258a4d8c7052027ab78 Content-Type: text/x-patch; charset=US-ASCII; name="0002-Add-functions-for-capitalizing-text-intelligently.patch" Content-Disposition: attachment; filename="0002-Add-functions-for-capitalizing-text-intelligently.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ies3pgpy0 RnJvbSA3MGNjNzVjM2U2ZWUyZWIzYzc1ZDA2MmNlZDU5NTBjYTM2Y2IyN2QyIE1vbiBTZXAgM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