From mboxrd@z Thu Jan 1 00:00:00 1970 From: Feng Shu Subject: [Need a feature] complete email with alias in gnus Date: Thu, 30 May 2013 15:44:46 +0800 Message-ID: <878v2wkj2p.fsf@news.tumashu-localhost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhxYj-0001Z8-Ik for emacs-orgmode@gnu.org; Thu, 30 May 2013 03:46:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhxYb-0006Ju-4Z for emacs-orgmode@gnu.org; Thu, 30 May 2013 03:46:05 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:34516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhxYa-0006Jc-MW for emacs-orgmode@gnu.org; Thu, 30 May 2013 03:45:56 -0400 Received: by mail-pd0-f173.google.com with SMTP id v14so9005807pde.4 for ; Thu, 30 May 2013 00:45:55 -0700 (PDT) Received: from tumashu ([110.97.82.72]) by mx.google.com with ESMTPSA id eq4sm1662885pad.16.2013.05.30.00.45.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 00:45:54 -0700 (PDT) Received: from feng by news.tumashu-localhost.org with local (Exim 4.80) (envelope-from ) id 1UhxXS-0001N3-Eb for emacs-orgmode@gnu.org; Thu, 30 May 2013 15:44:46 +0800 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: orgmode 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 inclu= ded 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 | Date: Thu, 11 Apr 2013 21:12:38 +0800 | Subject: [PATCH] org-contacts.el, stupid solutions which can complete em= ail | address using alias in message-mode |=20 | * contrib/lisp/org-contacts.el (org-contacts-complete-name): Add alias va= rible | --- | contrib/lisp/org-contacts.el | 4 +++- | 1 =E4=B8=AA=E6=96=87=E4=BB=B6=E8=A2=AB=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=8F= =92=E5=85=A5 3 =E8=A1=8C(+)=EF=BC=8C=E5=88=A0=E9=99=A4 1 =E8=A1=8C(-) |=20 | 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 FO= O." | for email-list =3D (org-contacts-split-property (or | (cdr (assoc-string org-contacts-email-property | (caddr contact))) "")) | + for alias =3D (cdr (assoc-string org-contacts-alias-property (caddr co= ntact))) | ;; If the user has email addresses=E2=80=A6 | if email-list | ;; =E2=80=A6 append a list of USER . | nconc (loop for email in email-list | - collect (org-contacts-format-email contact-name (org-contacts-str= ip-link email))))) | + collect (org-contacts-format-email (if alias | + (concat contact-name "(" alias ")") contact-name) (org-conta= cts-strip-link email))))) | (completion-list (org-contacts-all-completions-prefix | string | (org-uniquify completion-list)))) | --=20 | 1.7.10.4 |=20 `---- #+end_example --=20