emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "N. Raghavendra" <raghu@hri.res.in>
To: emacs-orgmode@gnu.org
Subject: Org-contacts and Gnus
Date: Sun, 21 Jul 2013 16:18:12 +0530	[thread overview]
Message-ID: <87siz8xk7n.fsf@griffin.dhcp1.hri> (raw)

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/

                 reply	other threads:[~2013-07-21 10:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87siz8xk7n.fsf@griffin.dhcp1.hri \
    --to=raghu@hri.res.in \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).