[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-contacts-rebased 010b2ec 029/118: org-contacts.el (or
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/org-contacts-rebased 010b2ec 029/118: org-contacts.el (org-contacts-format-name): New function |
Date: |
Fri, 12 Nov 2021 15:36:58 -0500 (EST) |
branch: scratch/org-contacts-rebased
commit 010b2ec38aedcca8b527baca890461c6cc1c3aff
Author: Daniel Clemente <n142857@gmail.com>
Commit: Bastien Guerry <bzg@altern.org>
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
---
org-contacts.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/org-contacts.el b/org-contacts.el
index a567a9b..8a8140c 100644
--- a/org-contacts.el
+++ b/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)
- [elpa] scratch/org-contacts-rebased c0f4677 024/118: contrib/lisp/org-contacts.el: Require 'org-agenda., (continued)
- [elpa] scratch/org-contacts-rebased c0f4677 024/118: contrib/lisp/org-contacts.el: Require 'org-agenda., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 6b235b4 044/118: contrib/lisp/*el: Fix license information and add "This file is not part...", Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 66e23e6 008/118: org-contacts: added VCard 3.0 exporter and ADDRESS field, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased e585be0 009/118: org-contacts: added org-contacts-show-map (requires google-maps-el), Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 6c12101 010/118: org-contacts: Use `with-current-buffer' instead of `save-excursion'+`with-current-buffer'., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 7cae69f 011/118: org-contacts: Require cl on compilation., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased ef5cb24 016/118: Copyright year fixes for contrib/., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 5f1806a 012/118: org-contacts: fix errors when Gnus or ERC are not loaded, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 531d67a 014/118: Fix Emacs 24 compatibility issue with Emacs 24, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 2b1a75a 030/118: Improve `completion-at-point' for `org-contacts.el' in mail, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 010b2ec 029/118: org-contacts.el (org-contacts-format-name): New function,
Stefan Monnier <=
- [elpa] scratch/org-contacts-rebased 8bf8565 027/118: Update copyright years., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 72d2caf 022/118: add a missing require for gnus-util, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased c297cb0 020/118: Merge branch 'maint', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased ea8cbe4 013/118: Fix copyright years for elisp files in core and contrib., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 15f35f7 040/118: orgcontacts.el: Fix `date' being broken in `org-contacts-anniversaries'., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 8b85530 037/118: org-contacts.el: Let the users decide if they want to use `org-contacts' to complete mail addresses, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 884d61f 042/118: Fix typo., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 48ca58b 033/118: Do not complete when it's not necessary, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 2e77024 017/118: Copyright year fixes for contrib/., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 99994ed 039/118: contrib/lisp/org-contacts.el (org-contacts-complete-name): Prevent an error when there is no completion available, Stefan Monnier, 2021/11/12