From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Andrea Vettorello" Newsgroups: gmane.emacs.help Subject: Re: Capitalize letter after brace Date: Wed, 15 Oct 2008 07:28:16 +0200 Message-ID: <7d5440240810142228x4350a155t8af02cc70ad68117@mail.gmail.com> References: <87vdvuh2mv.fsf@rosslaird.info> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1224048549 30376 80.91.229.12 (15 Oct 2008 05:29:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2008 05:29:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 15 07:30:09 2008 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 1KpyxT-0008Pw-Kf for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Oct 2008 07:30:07 +0200 Original-Received: from localhost ([127.0.0.1]:39329 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpywO-0003dr-Uy for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Oct 2008 01:29:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kpyvk-0003Yh-Bs for help-gnu-emacs@gnu.org; Wed, 15 Oct 2008 01:28:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kpyvi-0003YA-Kh for help-gnu-emacs@gnu.org; Wed, 15 Oct 2008 01:28:19 -0400 Original-Received: from [199.232.76.173] (port=58913 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kpyvi-0003Y4-9c for help-gnu-emacs@gnu.org; Wed, 15 Oct 2008 01:28:18 -0400 Original-Received: from fk-out-0910.google.com ([209.85.128.191]:41936) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kpyvi-00054j-Ge for help-gnu-emacs@gnu.org; Wed, 15 Oct 2008 01:28:18 -0400 Original-Received: by fk-out-0910.google.com with SMTP id 18so2583784fkq.10 for ; Tue, 14 Oct 2008 22:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=F3ABVqME/eab65xS1Uj5QjcyhnB/pqsZNsgVWlcD8bE=; b=vbshzfnlkXaLzo4jwunT5MkXKExpRFuvokcdSWiNF803+HTD+60BwaAdWHuaSGgAPO wZH2MEGW0TJd63asyu3TQm3/QDC5Qi2Dq6rrRsx3UMadxrqZMJ/Od1uOkCEFDwSuWU0g YzsxxYGGXKZB9uRXXyJV3YDIA1mUw4D6oQAOc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=DjTV/gfm91g06h27A+0EbyOvyugm0S35YJXoe9YLe9yKvM+ztuJ1TTQA2qywHFjJq/ ex9Pl+Aldtegbf6T9lnYDxq+LNuJNi3dSJ4iqNyJdiMTs/xq2EIV6O4fXmqB+vaySzV9 Wq4Q/7ozOGUEccdxCs9teVogZsys6bdRoHKSo= Original-Received: by 10.187.195.7 with SMTP id x7mr55563fap.46.1224048496550; Tue, 14 Oct 2008 22:28:16 -0700 (PDT) Original-Received: by 10.187.158.14 with HTTP; Tue, 14 Oct 2008 22:28:16 -0700 (PDT) In-Reply-To: <87vdvuh2mv.fsf@rosslaird.info> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:58791 Archived-At: On Wed, Oct 15, 2008 at 7:02 AM, Ross A. Laird wrote: > This is the type of thing that would take me a day to figure out on my > own (though, probably, I could eventually figure it out), but most > readers of this group can probably throw me a line in a few seconds: > > I have some index entries in my tex file that are capitalized > \index{Capitalized} and others that are not \index{not}. I want to make > all entries consistently capitalized. This means a search for the first > character after the opening index brace and a change of its case. What's > the magic formula (please...). > Not tested, probably needs some escaping (I'm not sure if the opening brace should be escaped), anyway something like: M-x replace-regexp Enter Replace regexp: index{\(w\) Enter with: index{\,(capitalize \1) Enter The above should capitalize the first word after every "index{" in your tex file. -- Andrea