From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: CamelHump word movement in Emacs Date: Thu, 19 Nov 2009 12:05:27 +0100 Message-ID: <87y6m2ixl4.fsf@thinkpad.tsdh.de> References: <873a4akikh.fsf@thinkpad.tsdh.de> <87skcaevsk.fsf@mandingo.thematica.it> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258628761 24672 80.91.229.12 (19 Nov 2009 11:06:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 11:06:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Giuseppe Scrivano Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 19 12:05:54 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NB4pi-0002fL-OY for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2009 12:05:51 +0100 Original-Received: from localhost ([127.0.0.1]:36790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NB4ph-0004qH-LB for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2009 06:05:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NB4pY-0004oW-5r for emacs-devel@gnu.org; Thu, 19 Nov 2009 06:05:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NB4pS-0004jQ-2d for emacs-devel@gnu.org; Thu, 19 Nov 2009 06:05:38 -0500 Original-Received: from [199.232.76.173] (port=60716 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NB4pR-0004jA-PR for emacs-devel@gnu.org; Thu, 19 Nov 2009 06:05:33 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:9554) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NB4pO-0004gb-NZ; Thu, 19 Nov 2009 06:05:30 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 33FCF78A2133; Thu, 19 Nov 2009 12:05:30 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26554-04; Thu, 19 Nov 2009 12:05:27 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad.tsdh.de (wlan-83.uni-koblenz.de [141.26.93.83]) by deliver.uni-koblenz.de (Postfix) with ESMTP id AFB227894B63; Thu, 19 Nov 2009 12:05:27 +0100 (CET) Mail-Copies-To: never Mail-Followup-To: Giuseppe Scrivano , emacs-devel@gnu.org In-Reply-To: <87skcaevsk.fsf@mandingo.thematica.it> (Giuseppe Scrivano's message of "Thu, 19 Nov 2009 09:57:47 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117243 Archived-At: Giuseppe Scrivano writes: Hi Giuseppe, > have you considered "c-subword-mode"? Nope, I didn't know it till now, but it does exactly what I want. I think this feature is generally useful and has nothing to do with C, so I propose to rename it (and its commands and the file) to `subword-mode' or `camelcase-mode'. Also, it would be nice to have it as a global minor mode, too. Any objections? If not, I'd volunteer to do that. Bye, Tassilo > Tassilo Horn writes: > >> Hi all, >> >> in many editors for "modern" programming languages like Java or C#, the >> normal word movement commands also stop on CamelHumps. This is very >> convenient, because nowadays the convention for identifiers names more >> and more turns to using camelCaseNaming. >> >> Here's an example: >> >> int foo_bar_baz() {} >> >> With the usual forward/backward-word commands, point always stops at the >> _ (when moving forward) or the first char of the component word (when >> moving backward). I really like that behavior. >> >> Unfortunately, it doesn't work if the function uses camelCase naming. >> >> int fooBarBaz() {} >> >> Here, forward/backward-word jump over the complete identifier. What I >> would really like to have, was that those commands move point to the >> capital letters (the 2 Bs), too. >> >> IMO, that would be the right thing to do, because camelCase is nearly >> never used for something else than separating words. >> >> What do you think? >> >> Bye, >> Tassilo