From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: patch for org-contacts to ignore <<>> when completing Date: Tue, 01 Jan 2013 04:06:35 +0100 Message-ID: <87vcbh1u10.wl%n142857@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TpsBd-0006zE-Gf for emacs-orgmode@gnu.org; Mon, 31 Dec 2012 22:06:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TpsBc-0007Wr-HO for emacs-orgmode@gnu.org; Mon, 31 Dec 2012 22:06:41 -0500 Received: from mail-wi0-f179.google.com ([209.85.212.179]:51289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TpsBc-0007Wl-A5 for emacs-orgmode@gnu.org; Mon, 31 Dec 2012 22:06:40 -0500 Received: by mail-wi0-f179.google.com with SMTP id o1so7295144wic.0 for ; Mon, 31 Dec 2012 19:06:39 -0800 (PST) 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: org-mode Mailinglist Hi, I send a patch which allows org-complete to complete if you do =E2=80= =9EJ o h n TAB=E2=80=9C even if your contact was written as <<>> (now= you would have to type < < < J TAB). It can be extended to remove emphasis, strongs, etc. if someone needs it. Thanks diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 7e3cbb7..0173f1d 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -388,12 +388,17 @@ This function should be called from `gnus-article-pre= pare-hook'." (org-completing-read prompt (org-contacts-filter) predicate t initial-input hist def inherit= -input-method)) =20 +(defun org-contacts-format-name (name) + "Format a person name to remove radio marks." + (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)) =20 (defun org-contacts-check-mail-address (mail)