From: Mathias Dahl <brakjoller@gmail.com>
Subject: Re: email extraction in emacs
Date: Fri, 01 Dec 2006 13:20:20 +0100 [thread overview]
Message-ID: <uslfzbyez.fsf@gmail.com> (raw)
In-Reply-To: a5fdb$456fdba9$49fa63f$2771@DIALUPUSA.NET
"B. T. Raven" <ecinmn@alcisp.com> writes:
>> (defun blah ()
>> (let (adresses)
>> (while (search-forward-regexp "\\(REGEXP-MATCHING-EMAILS\\)" nil t)
>> (setq addresses (append adresses (list (match-string 1)))))
>> adresses)
>>
> This sort of works interactively, that is it finds most of them. Blah is
> missing a final parenthesis and I don't understand if addresses with 2 d's
> is outside the scope of the let or not. Anyway, it just returns a list of
> nils even if some email addresses are below the point of invocation in
> *scratch.
Yes, there were typos in the code. There should be only one variable,
`addresses'.
> \b[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]\{2,4\}\b
>
> Maybe all of the backslashes have to be doubled.
If they are in a string, yes.
next prev parent reply other threads:[~2006-12-01 12:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 16:53 email extraction in emacs a
2006-11-29 17:45 ` Leo
2006-11-29 17:49 ` Peter Dyballa
2006-11-30 13:01 ` Mathias Dahl
2006-12-01 7:37 ` B. T. Raven
2006-12-01 12:20 ` Mathias Dahl [this message]
2006-11-30 19:54 ` martin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uslfzbyez.fsf@gmail.com \
--to=brakjoller@gmail.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.