From: "B. T. Raven" <ecinmn@peoplepc.com>
Subject: Re: newbie elisp question
Date: Thu, 08 Sep 2005 22:40:31 GMT [thread overview]
Message-ID: <z53Ue.9515$FW1.8169@newsread3.news.atl.earthlink.net> (raw)
In-Reply-To: 87k6hsdwdf.fsf@thalassa.informatimago.com
"Pascal Bourguignon" <spam@mouse-potato.com> wrote in message
news:87k6hsdwdf.fsf@thalassa.informatimago.com...
> "B. T. Raven" <ecinmn@peoplepc.com> 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
next prev parent reply other threads:[~2005-09-08 22:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-08 1:59 newbie elisp question B. T. Raven
2005-09-08 2:20 ` Drew Adams
2005-09-08 4:19 ` Pascal Bourguignon
2005-09-08 22:40 ` B. T. Raven [this message]
2005-09-09 0:08 ` Pascal Bourguignon
2005-09-09 16:28 ` B. T. Raven
2005-09-09 17:32 ` Pascal Bourguignon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='z53Ue.9515$FW1.8169@newsread3.news.atl.earthlink.net' \
--to=ecinmn@peoplepc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).