Hi: I want to complete email with alias instead of name, when I write a mail in gnus.
I'm using a tmp solution now, however it is nearly imposssible to be included into master, so I have to rebase this patch every pull, I want to find a better solution, Coule someone can help me ? #+begin_example ,----[ 0001-org-contacts.el-stupid-solutions-which-can-complete-.patch ] | From 27b896a813203bad7c55dece6bc37cd2eeff0f40 Mon Sep 17 00:00:00 2001 | From: Feng Shu <tuma...@gmail.com> | Date: Thu, 11 Apr 2013 21:12:38 +0800 | Subject: [PATCH] org-contacts.el, stupid solutions which can complete email | address using alias in message-mode | | * contrib/lisp/org-contacts.el (org-contacts-complete-name): Add alias varible | --- | contrib/lisp/org-contacts.el | 4 +++- | 1 个文件被修改,插入 3 行(+),删除 1 行(-) | | diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el | index 7b0b603..999bd5d 100644 | --- a/contrib/lisp/org-contacts.el | +++ b/contrib/lisp/org-contacts.el | @@ -488,11 +488,13 @@ A group FOO is composed of contacts with the tag FOO." | for email-list = (org-contacts-split-property (or | (cdr (assoc-string org-contacts-email-property | (caddr contact))) "")) | + for alias = (cdr (assoc-string org-contacts-alias-property (caddr contact))) | ;; If the user has email addresses… | if email-list | ;; … append a list of USER <EMAIL>. | nconc (loop for email in email-list | - collect (org-contacts-format-email contact-name (org-contacts-strip-link email))))) | + collect (org-contacts-format-email (if alias | + (concat contact-name "(" alias ")") contact-name) (org-contacts-strip-link email))))) | (completion-list (org-contacts-all-completions-prefix | string | (org-uniquify completion-list)))) | -- | 1.7.10.4 | `---- #+end_example --