From: Reiner Steib <reinersteib+gmane@imap.cc>
To: Ted Zlatanov <teodor.zlatanov@divine.com>
Cc: ding@gnus.org
Subject: Wrappers for gnus-extract-address-components (was: [...] gnus-util.el)
Date: Wed, 07 May 2008 20:08:49 +0200 [thread overview]
Message-ID: <v9skwut2a6.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <E1Jtlls-0003wE-00@quimby.gnus.org> (Ted Zlatanov's message of "Wed, 07 May 2008 17:41:32 +0200")
On Wed, May 07 2008, Ted Zlatanov on ding-patches:
> * gnus-util.el (gnus-extract-address-component-name)
> (gnus-extract-address-component-email): Convenience functions around
> `gnus-extract-address-components'.
I doubt that we need these wrappers. Just using `car' and `cadr' is
sufficiently convenient for me.
> +(defun gnus-extract-address-component-name (from)
> + "Extract name from a From header.
> +Uses `gnus-extract-address-components'."
> + (nth 0 (gnus-extract-address-components from)))
> +
> +(defun gnus-extract-address-component-email (from)
> + "Extract e-mail address from a From header.
> +Uses `gnus-extract-address-components'."
> + (nth 1 (gnus-extract-address-components from)))
When introducing such wrapper, we might use (funcall
gnus-extract-address-components ...) instead.
And the names should be something more simple like `...-extract-name'
and `...-extract-address'. As they should be usable in `message.el'
as well, we should put them in `gmm-utils.el' to avoid code like this:
(funcall (if (boundp gnus-extract-address-components)
gnus-extract-address-components
'mail-extract-address-components)
from)
Or, `gnus-extract-address-components' could use an optional argument,
which can have the values 'name or 'address.
Opinions?
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
next parent reply other threads:[~2008-05-07 18:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1Jtlls-0003wE-00@quimby.gnus.org>
2008-05-07 18:08 ` Reiner Steib [this message]
2008-05-07 19:04 ` Wrappers for gnus-extract-address-components Ted Zlatanov
2008-05-07 22:17 ` Mail address in the commit lists (was: Wrappers for gnus-extract-address-components) Reiner Steib
2008-05-07 22:19 ` Reiner Steib
2008-05-08 12:46 ` Mail address in the commit lists Ted Zlatanov
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=v9skwut2a6.fsf@marauder.physik.uni-ulm.de \
--to=reinersteib+gmane@imap.cc \
--cc=ding@gnus.org \
--cc=reiner.steib@gmx.de \
--cc=teodor.zlatanov@divine.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 NNTP newsgroup(s).