Headlines for Friday:
- More Emacs fun: Composing mail to everyone with notes (52 words)
- More Emacs coolness: List of contacts (158 words)
- Emacs: Keep track of messages sent (169 words)
- The great laptop ad campaign (76 words)
|A||X||Get all the networking people into my database|
|A||X||Blog about laptop ads|
|B||X||Greet Sam Watkins happy birthday : E-Mail from Sam Watkins|
|B||X||Plane : E-Mail from Mama|
|C||C||Follow up with |
BarCampEarthToronto was a blast, and so was my laptop ad campaign.
It's about time that we stopped advertising just Apple or Dell. ;) Do something creative with your laptop cover! Double-sided tape peels off quite cleanly, so go do something funky with it! =)
Because a Big Brother Database of my contacts isn't complete if I don't keep track of what e-mail I sent them and when I sent it, this bit of Emacs Lisp code adds Gnus subjects to the BBDB records of the people to whom I sent e-mail.
(defun sacha/gnus-add-subject-to-bbdb-record () "Add datestamped subject note for each person this message has been sent to." (let* ((subject (concat (planner-today) ": E-mail: " (message-fetch-field "Subject") "\n")) (bbdb-get-addresses-headers (list (assoc 'recipients bbdb-get-addresses-headers))) records) (setq records (bbdb-update-records (bbdb-get-addresses nil gnus-ignored-from-addresses 'gnus-fetch-field) nil nil)) (mapc (lambda (rec) (bbdb-record-set-notes rec (concat subject (bbdb-record-notes rec)))) records))) (add-hook 'message-send-hook 'sacha/gnus-add-subject-to-bbdb-record)
It should be really easy to set up Gnus to expand some kind of !followup macro into a TODO item in my planner and an "I hope to hear from you by ....". Ridiculously easy with Emacs Lisp and an insanely customizable editor, but I might not have enough battery life. I've got 28 minutes, and then I'm off PC for a while.
This bit of Emacs Lisp code produces a Planner-ready list of the contacts displayed in the BBDB window.
(defun sacha/planner-bbdb-annotation-from-bbdb (&optional record) "If called from a bbdb buffer, return an annotation. Suitable for use in `planner-annotation-functions'." (when (or record (eq major-mode 'bbdb-mode)) (setq record (if record (car record) (bbdb-current-record))) (or (bbdb-record-getprop record 'plan) ;; From a BBDB entry with a plan page; use that. Yay! (planner-make-link (concat "bbdb://" (planner-replace-regexp-in-string " " "." (bbdb-record-name record))) (bbdb-record-name record))))) (defalias 'planner-bbdb-annotation-from-bbdb 'sacha/planner-bbdb-annotation-from-bbdb) (defun sacha/yank-planner-bbdb-list () "Copy the list of people displayed in the buffer." (interactive) (kill-new (mapconcat 'sacha/planner-bbdb-annotation-from-bbdb bbdb-records ", ")) (sacha/planner-bbdb-annotation-from-bbdb rec))
It allows me to say, for example, that I met 23 people yesterday: Bruce, Daniel Charles, Shane D'Costa, Emily, Greg A. Fitz, Clara Fong, Jay Goldman, Harvey, Kai Fai Ho, Iris, KC, Charles McCulloch, Jamie McQuay, Joshua Meles, Naomi, Helen Overland, Wayne Penney, Simon Rowland, San, Colin Smillie, Solomon, Le Quan Truong, Perry Wong
(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)
- E-mail to Sacha Chua
- E-mail to Erwin Oliva
- E-mail to Mama
- E-mail to luis_suarez
I'd love to hear about any questions, comments, suggestions or links that you might have. Your comments will not be posted on this website immediately, but will be e-mailed to me first. You can use this form to get in touch with me, or e-mail me at email@example.com .