emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-contacts and Gnus
@ 2013-07-21 10:48 N. Raghavendra
  0 siblings, 0 replies; only message in thread
From: N. Raghavendra @ 2013-07-21 10:48 UTC (permalink / raw)
  To: emacs-orgmode

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 <raghu@hri.res.in>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-21 10:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-21 10:48 Org-contacts and Gnus N. Raghavendra

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).