From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Markert Subject: [PATCH 2/3] Add name-email function for to unificate template interface. Date: Fri, 6 May 2011 10:58:40 +0200 Message-ID: <674fa3dafc08017619a67884239e4f84977c86ec.1304676142.git.markert.michael@googlemail.com> References: <327169f6ecc0679c1e7394740e8baa6cde860bf9.1304676142.git.markert.michael@googlemail.com> Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIHvX-0006UP-Bw for emacs-orgmode@gnu.org; Fri, 06 May 2011 06:06:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QIHvW-0002jl-JS for emacs-orgmode@gnu.org; Fri, 06 May 2011 06:06:27 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:37563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIHvW-0002gg-9m for emacs-orgmode@gnu.org; Fri, 06 May 2011 06:06:26 -0400 Received: by mail-fx0-f41.google.com with SMTP id 18so2700550fxm.0 for ; Fri, 06 May 2011 03:06:26 -0700 (PDT) In-Reply-To: <327169f6ecc0679c1e7394740e8baa6cde860bf9.1304676142.git.markert.michael@googlemail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --- 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