diff options
author | Daniel Clemente <n142857@gmail.com> | 2013-01-02 10:22:25 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-01-02 10:22:25 +0100 |
commit | d8ad57d4f73e8e6c81c1cc4527aa01d19631dd82 (patch) | |
tree | 13ec942af8cd9e624b6bf472796e5e50d0793596 | |
parent | a5842680712ed626d47b049f1809f67e98c1de31 (diff) | |
download | org-mode-d8ad57d4f73e8e6c81c1cc4527aa01d19631dd82.tar.gz |
org-contacts.el (org-contacts-format-name): New function
* org-contacts.el (org-contacts-format-name): New function.
(org-contacts-format-email): Use the new function.
TINYCHANGE
-rw-r--r-- | contrib/lisp/org-contacts.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index a567a9b..8a8140c 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -388,12 +388,17 @@ This function should be called from `gnus-article-prepare-hook'." (org-completing-read prompt (org-contacts-filter) predicate t initial-input hist def inherit-input-method)) +(defun org-contacts-format-name (name) + "Trim any local formatting to get a bare name." + ;; Remove radio targets characters + (replace-regexp-in-string org-radio-target-regexp "\\1" name)) + (defun org-contacts-format-email (name email) "Format a mail address." (unless email (error "`email' cannot be nul")) (if name - (concat name " <" email ">") + (concat (org-contacts-format-name name) " <" email ">") email)) (defun org-contacts-check-mail-address (mail) |