More Emacs fun: Composing mail to everyone with notes
| bbdb, emacs(defun sacha/compose-mail-to-everyone (&optional subject) (mapc (lambda (rec) (setq rec (car rec)) (when (bbdb-record-net rec) (bbdb-send-mail rec subject) (save-excursion (message-goto-signature) (forward-line -2) (insert "\n---- NOTES ---\n" (bbdb-record-notes rec) "\n")))) bbdb-records)) (defun sacha/gnus-delete-notes () (goto-char (point-min)) (when (re-search-forward "^--- NOTES ---" nil t) (goto-char (match-beginning 0)) (message-kill-to-signature))) (add-hook 'message-send-hook 'sacha/gnus-delete-notes)
You can comment with Disqus or you can e-mail me at sacha@sachachua.com.