From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: Help with upcasing words first char Date: Sat, 22 Aug 2009 11:15:18 -0700 (PDT) Organization: http://groups.google.com Message-ID: <738bf58e-6938-445c-98ca-51c3abc6ae58@l35g2000pra.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1250977900 18270 80.91.229.12 (22 Aug 2009 21:51:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Aug 2009 21:51:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 22 23:51:33 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MeyUn-0002CN-EP for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Aug 2009 23:51:33 +0200 Original-Received: from localhost ([127.0.0.1]:34702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeyUm-0006XJ-Lq for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Aug 2009 17:51:32 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!l35g2000pra.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: 76.102.12.87 Original-X-Trace: posting.google.com 1250964919 6916 127.0.0.1 (22 Aug 2009 18:15:19 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 22 Aug 2009 18:15:19 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l35g2000pra.googlegroups.com; posting-host=76.102.12.87; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.39 Safari/530.5, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:172268 X-Mailman-Approved-At: Sat, 22 Aug 2009 17:48:32 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67434 Archived-At: On Aug 22, 8:46 am, Harry Putnam wrote: > I need to do a pile of editing that involves: > > Removing a space between words and upcasing the first letter of the > next word like: > > Some example > to > SomeExample > > I went thru M-x apropos > > But didn't find a likely candidate ... or at least none appeared to be > the right thing for what I want. > > So far I've been > > Ctrl To get to the space between words > Ctrl-d Ctrl-d To remove the space and the leading lowercase char of > the next word > > Shift to replace with uppercase > > Then back to Ctrl > > Where can I save some keyboard strokes? you can easily do it with query-replace-regexp. the regexp you should use is: =E2=80=9C \([[:lower:]]\)=E2=80=9D and the replacement is =E2=80=9C\,(upcase \1)=E2=80=9D some detail here: =E2=80=A2 Text Pattern Matching in Emacs http://xahlee.org/emacs/emacs_regex.html =E2=80=A2 Find and Replace with Emacs http://xahlee.org/emacs/emacs_find_replace.html Xah =E2=88=91 http://xahlee.org/ =E2=98=84