From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: newbie elisp question Date: Thu, 08 Sep 2005 22:40:31 GMT Organization: EarthLink Inc. -- http://www.EarthLink.net Message-ID: References: <87k6hsdwdf.fsf@thalassa.informatimago.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1126219719 23649 80.91.229.2 (8 Sep 2005 22:48:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Sep 2005 22:48:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 09 00:48:38 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EDVAd-00065y-Cc for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Sep 2005 00:47:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EDVAc-0007zE-Tx for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Sep 2005 18:47:02 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!0847253b!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 71 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Original-NNTP-Posting-Host: 4.159.165.119 Original-X-Complaints-To: abuse@earthlink.net Original-X-Trace: newsread3.news.atl.earthlink.net 1126219231 4.159.165.119 (Thu, 08 Sep 2005 15:40:31 PDT) Original-NNTP-Posting-Date: Thu, 08 Sep 2005 15:40:31 PDT Original-Xref: shelby.stanford.edu gnu.emacs.help:133793 Original-To: help-gnu-emacs@gnu.org 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:29340 Archived-At: "Pascal Bourguignon" wrote in message news:87k6hsdwdf.fsf@thalassa.informatimago.com... > "B. T. Raven" writes: > > [...] > > (defun goto-vowel > > "Skip to next vowel after point." > > (interactive) > > (while (not (vowelp (char-after))) (forward-char)) > > ) > > [...] > > What am I not understanding here? > > Drew answered why. > > I'll add that you could use looking-at: > > (defun goto-vowel () > "Skip to next vowel after point." > (interactive) > (while (not (looking-at "[aeiouy]") (forward-char))) Why the quotes? Is this acceptable reg-exp syntax? > > More over, only in iso-8859-1 there are a lot of other vowels: > > ÀÁÂÃÄÅÆÈÉÊËÌÍÎÏÒÓÔÕÖØÙÚÛÜÝàáâãäåæèéêëìíîïòóôõöøùúûüýÿ > > (and what about semi-vowels like y? In some languages it's considered > a plain vowel). > > > > > One would hope to be able to use the character categories and match \C1 as in: > > (while (looking-at "\\C1") (forward-char)) > > unfortunately, in the default category table, the consonant/vowel > attribute is not set for ASCII characters. You'd have to build a > correct category table. Which sounds like it might not be the right job for a newbie who could commit such a boner as leaving the parentheses off after a defun definition. Anyway, thanks, Drew and Pascal. I didn't even know about the looking-at function but I guess I'll use it now instead even though I don't need the power of regular expressions for my application. I did include 'y' as a vowel in my defconst, which is what I wanted here. Btw, supplying the missing parens after the defun uncovers another error: bad type passed to memq. Calling forward-char before the loop seems to fix this, I know not why. I don't need any of the common European diacriticals but I do use macroned vowels (y excepted, since it doesn't exist in any of the more prepossessing fonts, as far as I know. The macroned vowels (Latin 4) require that the file be saved as a utf-8 since there are sometimes Greek and Hebrew characters in the same file. Which leads to my final question: Has anyone here successfully copypasted from a utf-8 buffer to another Windows application that supports Unicode? My emacs is a w32 build (21.3) and I can only accomplish the transfer of arbitrary unicode strings by saving to a file as utf-8, opening or inserting the file (encoded text) with Open Office, and then copypasting from there. Any ideas? Thanks again, Ed