From mboxrd@z Thu Jan 1 00:00:00 1970 From: "N. Raghavendra" Subject: Org-contacts and Gnus Date: Sun, 21 Jul 2013 16:18:12 +0530 Message-ID: <87siz8xk7n.fsf@griffin.dhcp1.hri> Reply-To: "N. Raghavendra" Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0rIM-0003JO-Kj for emacs-orgmode@gnu.org; Sun, 21 Jul 2013 06:55:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0rI9-0002RW-5f for emacs-orgmode@gnu.org; Sun, 21 Jul 2013 06:55:18 -0400 Received: from plane.gmane.org ([80.91.229.3]:43661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0rI8-0002PN-VZ for emacs-orgmode@gnu.org; Sun, 21 Jul 2013 06:55:05 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V0rI7-00043f-E6 for emacs-orgmode@gnu.org; Sun, 21 Jul 2013 12:55:03 +0200 Received: from 220.227.103.136 ([220.227.103.136]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Jul 2013 12:55:03 +0200 Received: from raghu by 220.227.103.136 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Jul 2013 12:55:03 +0200 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: emacs-orgmode@gnu.org I've started using Org contacts, and find it very useful, especially as an address book for Gnus. I had to make some modifications to make the library function as I wanted. I am posting them here just in case they are of interest to others. 1. Put quotes around names with periods in email addresses. (defadvice org-contacts-format-name (after my-quote-name activate) "Put quotes around display names with periods in email addresses. This is required by RFC 822, but not by RFC 2822 (see the discussion on obs-phrase in the latter). This advice takes a conservative approach." (when (memq ?. (string-to-list ad-return-value)) (setq ad-return-value (format "\"%s\"" ad-return-value)))) 2. Don't add links from contacts to last-read messages unless asked. (defvar my-contacts-link-last-mail nil "If non-nil, store last-read-mail links in Org contacts.") (defadvice org-contacts-gnus-store-last-mail (around my-contacts-link-last-mail-ad activate) "Link to last-read mail in contacts per `my-contacts-link-last-mail'." (when my-contacts-link-last-mail ad-do-it)) 3. I was surprised to find that the lib was making an HTTP request each time I did "M-x org-contacts". This fixed it: ;; Don't fetch "avatar" icons of contacts from the Web. (setq org-contacts-icon-use-gravatar nil) I wonder if it is a good idea to make (1) and (2) the default behaviour. Thanks and best regards, Raghavendra. -- N. Raghavendra , http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/