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
This commit is contained in:
parent
dcd8af90c9
commit
010b2ec38a
1 changed files with 6 additions and 1 deletions
|
@ -388,12 +388,17 @@ This function should be called from `gnus-article-prepare-hook'."
|
||||||
(org-completing-read
|
(org-completing-read
|
||||||
prompt (org-contacts-filter) predicate t initial-input hist def inherit-input-method))
|
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)
|
(defun org-contacts-format-email (name email)
|
||||||
"Format a mail address."
|
"Format a mail address."
|
||||||
(unless email
|
(unless email
|
||||||
(error "`email' cannot be nul"))
|
(error "`email' cannot be nul"))
|
||||||
(if name
|
(if name
|
||||||
(concat name " <" email ">")
|
(concat (org-contacts-format-name name) " <" email ">")
|
||||||
email))
|
email))
|
||||||
|
|
||||||
(defun org-contacts-check-mail-address (mail)
|
(defun org-contacts-check-mail-address (mail)
|
||||||
|
|
Loading…
Reference in a new issue