From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Markert Subject: [PATCH 3/3] Adjust wl-contact functions to overall conventions. Date: Fri, 6 May 2011 11:24:30 +0200 Message-ID: References: <327169f6ecc0679c1e7394740e8baa6cde860bf9.1304676142.git.markert.michael@googlemail.com> Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIHvh-0006nK-HK for emacs-orgmode@gnu.org; Fri, 06 May 2011 06:06:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QIHvg-0002lH-Lk for emacs-orgmode@gnu.org; Fri, 06 May 2011 06:06:37 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:45366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIHvg-0002lA-Gg for emacs-orgmode@gnu.org; Fri, 06 May 2011 06:06:36 -0400 Received: by bwz17 with SMTP id 17so3222466bwz.0 for ; Fri, 06 May 2011 03:06:35 -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 | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 60eb542..ff4374d 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -403,7 +403,7 @@ This adds `org-contacts-gnus-check-mail-address' and (add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-check-mail-address) (add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-store-last-mail)) -(defun wl-get-from-header-content () +(defun org-contacts-wl-get-from-header-content () "Retrieve the content of the `From' header of an email. Works from wl-summary-mode and mime-view-mode - that is while viewing email. Depends on Wanderlust been loaded." @@ -429,16 +429,18 @@ See `org-contacts-wl-get-from-header-content' for limitations." (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)) - return-value - "%^{Name}"))) + "Try to return the contact name for a template from wl. +If not found return RETURN-VALUE or something that would ask the user." + (or (car (org-contacts-wl-get-name-email)) + return-value + "%^{Name}")) (defun org-contacts-template-wl-email (&optional return-value) - (let ((from (wl-get-from-header-content))) - (or (and from (wl-address-header-extract-address from)) - return-value - (concat "%^{" org-contacts-email-property "}p")))) + "Try to return the contact email for a template from wl. +If not found return RETURN-VALUE or something that would ask the user." + (or (cadr (org-contacts-wl-get-name-email)) + return-value + (concat "%^{" org-contacts-email-property "}p"))) (defun org-contacts-view-send-email (&optional ask) "Send email to the contact at point. -- 1.7.4.4