From: Michael Markert <markert.michael@googlemail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH 3/3] Adjust wl-contact functions to overall conventions.
Date: Fri, 6 May 2011 11:24:30 +0200 [thread overview]
Message-ID: <f3d1eb8d328a0d2d00b94cfb7813fb41bed787a8.1304676142.git.markert.michael@googlemail.com> (raw)
In-Reply-To: <327169f6ecc0679c1e7394740e8baa6cde860bf9.1304676142.git.markert.michael@googlemail.com>
---
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
prev parent 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 ` [PATCH 2/3] Add name-email function for to unificate template interface Michael Markert
2011-05-06 9:24 ` Michael Markert [this message]
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=f3d1eb8d328a0d2d00b94cfb7813fb41bed787a8.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).