From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Horacio Suarez Newsgroups: gmane.emacs.help Subject: RE: search for any two consecutive uppercase characters Date: Thu, 13 Aug 2009 14:13:48 +0000 Message-ID: References: <87fxbw3bfh.fsf@galatea.local> <4a84058c$0$303$14726298@news.sunsite.dk> <7c63cramic.fsf@pbourguignon.anevia.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_9fa8365e-4f3c-4fc9-bd3c-bbc2e74323dc_" X-Trace: ger.gmane.org 1250175862 15737 80.91.229.12 (13 Aug 2009 15:04:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Aug 2009 15:04:22 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 13 17:04:11 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 1MbbqN-0006Vz-7r for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Aug 2009 17:04:10 +0200 Original-Received: from localhost ([127.0.0.1]:50017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbbqJ-0005sc-M3 for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Aug 2009 11:03:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mbb6r-0001XO-Vt for help-gnu-emacs@gnu.org; Thu, 13 Aug 2009 10:16:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mbb6n-0001VV-8D for help-gnu-emacs@gnu.org; Thu, 13 Aug 2009 10:16:53 -0400 Original-Received: from [199.232.76.173] (port=43195 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mbb6n-0001VQ-1V for help-gnu-emacs@gnu.org; Thu, 13 Aug 2009 10:16:49 -0400 Original-Received: from snt0-omc4-s27.snt0.hotmail.com ([65.55.90.230]:4268) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mbb6l-0007QE-Lm for help-gnu-emacs@gnu.org; Thu, 13 Aug 2009 10:16:47 -0400 Original-Received: from SNT114-W62 ([65.55.90.199]) by snt0-omc4-s27.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 13 Aug 2009 07:13:49 -0700 X-Originating-IP: [190.244.190.92] Importance: Normal In-Reply-To: <7c63cramic.fsf@pbourguignon.anevia.com> X-OriginalArrivalTime: 13 Aug 2009 14:13:49.0003 (UTC) FILETIME=[470CC1B0:01CA1C20] X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ 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:67122 Archived-At: --_9fa8365e-4f3c-4fc9-bd3c-bbc2e74323dc_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello: Thankyou very much for yours answers. Please excuse my ignorance but I dont know exactly how tu use the code. I paste it in my .emacs file. To use I type M-x "capitalize-uppercase-words= " then appears a mesage: "The mark is not set now=2C so there is no region". What shoul I do? Thanks again -------------------- Horacio Suarez > From: pjb@informatimago.com > Date: Thu=2C 13 Aug 2009 15:09:31 +0200 > To: help-gnu-emacs@gnu.org > Subject: Re: search for any two consecutive uppercase characters >=20 > "Colin S. Miller" writes: >=20 > > Pascal J. Bourguignon wrote: > >> Horacio Suarez writes: > >> > >>> Hello all: > >>> > >>> Is there a way to search for any two consecutive uppercase characters= ? In example "P=C9REZ" or > >>> "GONZ=C1LEZ" > >> > >> Yes=2C this is difficult=2C because of the accented letters. There is= no > >> [:upper:] in emacs regular expressions. It might be possible to build > >> a syntax table or something to identify uppercase letters including > >> accented ones=2C but AFAIK=2C there's nothing built in. The simpliest > >> would be to prepare a regular expression explicitely listing all the > >> characters you'd want=2C something like: > >> > >> "\\<[A-Z=C0=C1=C2=C3=C4=C5=C6=C7=C8=C9=CA=CB=CC=CD=CE=CF=D0= =D1=D2=D3=D4=D5=D6=D8=D9=DA=DB=DC=DD=DE]+\\>" > >> > > Isn't > > C-u C-s (aka isearch-forward-regexp) > > [A-Z=C0=C1=C2=C3=C4=C5=C6=C7=C8=C9=CA=CB=CC=CD=CE=CF=D0=D1=D2=D3=D4=D5= =D6=D8=D9=DA=DB=DC=DD=DE]\{2=2C\} > > better? >=20 > FSVO "better". >=20 > > here \{2=2C\} > > means two (or more) of the preceding expression. >=20 > They don't mean the same. > My expression means: words containing only uppercase letters. > Your expression means: any occurence of two or more consecutive uppercase= letters. >=20 > Is 0x42AB a word? (I'd say no=2C it's a number in C syntax for hexadec= imal). > Is NeXTstep a word? (Yes=2C but it's not all uppercase). >=20 >=20 > --=20 > __Pascal Bourguignon__ _________________________________________________________________ With Windows Live=2C you can organize=2C edit=2C and share your photos. http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gall= ery-edit.aspx= --_9fa8365e-4f3c-4fc9-bd3c-bbc2e74323dc_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello:

Thankyou very much for yours answers.

Please excuse my= ignorance but I dont know exactly how tu use the code.

I paste it i= n my .emacs file. To use I type M-x "capitalize-uppercase-words"

the= n appears a mesage: "The mark is not set now=2C so there is no region".
=
What shoul I do?

Thanks again

--------------------
Hor= acio Suarez




>=3B From: pjb@informatimago.com
>=3B= Date: Thu=2C 13 Aug 2009 15:09:31 +0200
>=3B To: help-gnu-emacs@gnu.o= rg
>=3B Subject: Re: search for any two consecutive uppercase characte= rs
>=3B
>=3B "Colin S. Miller" <=3Bno-spam-thank-you@csmiller.= demon.co.uk>=3B writes:
>=3B
>=3B >=3B Pascal J. Bourguignon= wrote:
>=3B >=3B>=3B Horacio Suarez <=3Bhoraciosuarez@hotmail.c= om>=3B writes:
>=3B >=3B>=3B
>=3B >=3B>=3B>=3B Hello = all:
>=3B >=3B>=3B>=3B
>=3B >=3B>=3B>=3B Is there a w= ay to search for any two consecutive uppercase characters? In example "P=C9= REZ" or
>=3B >=3B>=3B>=3B "GONZ=C1LEZ"
>=3B >=3B>=3B>=3B >=3B>=3B Yes=2C this is difficult=2C because of the accented le= tters. There is no
>=3B >=3B>=3B [:upper:] in emacs regular expre= ssions. It might be possible to build
>=3B >=3B>=3B a syntax tabl= e or something to identify uppercase letters including
>=3B >=3B>= =3B accented ones=2C but AFAIK=2C there's nothing built in. The simpliest<= br>>=3B >=3B>=3B would be to prepare a regular expression explicitely= listing all the
>=3B >=3B>=3B characters you'd want=2C something = like:
>=3B >=3B>=3B
>=3B >=3B>=3B "\\<=3B[A-Z= =C0=C1=C2=C3=C4=C5=C6=C7=C8=C9=CA=CB=CC=CD=CE=CF=D0=D1=D2=D3=D4=D5=D6=D8=D9= =DA=DB=DC=DD=DE]+\\>=3B"
>=3B >=3B>=3B
>=3B >=3B Isn't>=3B >=3B C-u C-s (aka isearch-forward-regexp)
>=3B >=3B [A-Z= =C0=C1=C2=C3=C4=C5=C6=C7=C8=C9=CA=CB=CC=CD=CE=CF=D0=D1=D2=D3=D4=D5=D6=D8=D9= =DA=DB=DC=DD=DE]\{2=2C\}
>=3B >=3B better?
>=3B
>=3B FSVO= "better".
>=3B
>=3B >=3B here \{2=2C\}
>=3B >=3B means= two (or more) of the preceding expression.
>=3B
>=3B They don't= mean the same.
>=3B My expression means: words containing only upperc= ase letters.
>=3B Your expression means: any occurence of two or more = consecutive uppercase letters.
>=3B
>=3B Is 0x42AB a word? (I= 'd say no=2C it's a number in C syntax for hexadecimal).
>=3B Is NeXTs= tep a word? (Yes=2C but it's not all uppercase).
>=3B
>=3B
= >=3B --
>=3B __Pascal Bourguignon__


With Windows Liv= e=2C you can organize=2C edit=2C and share your photos. = --_9fa8365e-4f3c-4fc9-bd3c-bbc2e74323dc_--