I use radio headers in my contacts data base, like: * <<<Alice>>> * <<<Bob>>> (Alice's brother)
org-contacts was presenting the names with <<< before, so you needed to type <<< to match them. I attach a patch to remove this particular formatting before presenting the completions; in this way you can match them by Al or B Removing bold/italic/underline/pre is harder. If there is any better function to remove formatting, please use it. -- Daniel ---------------------------------------------------------------------------------------------------------------------- diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 74d68dc..156fa66 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -375,12 +375,18 @@ 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) + "Remove some formatting marks from contact name" + (replace-regexp-in-string org-radio-target-regexp "\\1" name) + ; TODO also remove emphasis (org-emphasis-alist) +) + (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)