emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Markert <markert.michael@googlemail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH 2/3] Add name-email function for to unificate template interface.
Date: Fri, 6 May 2011 10:58:40 +0200	[thread overview]
Message-ID: <674fa3dafc08017619a67884239e4f84977c86ec.1304676142.git.markert.michael@googlemail.com> (raw)
In-Reply-To: <327169f6ecc0679c1e7394740e8baa6cde860bf9.1304676142.git.markert.michael@googlemail.com>

---
 contrib/lisp/org-contacts.el |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index f0cf131..60eb542 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -420,6 +420,14 @@ Depends on Wanderlust been loaded."
                                           (std11-fetch-field "From")
                                         (widen))))))
 
+(defun org-contacts-wl-get-name-email ()
+  "Get name and email address from wanderlust email.
+See `org-contacts-wl-get-from-header-content' for limitations."
+  (let ((from (wl-get-from-header-content)))
+    (when from
+      (cons (wl-address-header-extract-realname from)
+	    (wl-address-header-extract-address from)))))
+
 (defun org-contacts-template-wl-name (&optional return-value)
   (let ((from (wl-get-from-header-content)))
     (or (and from (wl-address-header-extract-realname from))
-- 
1.7.4.4

  reply	other threads:[~2011-05-06 10:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06  8:43 [PATCH 1/3] Add docstring for `wl-get-from-header-content' Michael Markert
2011-05-06  8:58 ` Michael Markert [this message]
2011-05-06  9:24 ` [PATCH 3/3] Adjust wl-contact functions to overall conventions Michael Markert

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=674fa3dafc08017619a67884239e4f84977c86ec.1304676142.git.markert.michael@googlemail.com \
    --to=markert.michael@googlemail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).