<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>sacha chua :: enterprise 2.0 consultant, storyteller, geek &#187; lisp</title>
	<atom:link href="http://sachachua.com/wp/category/lisp/feed/" rel="self" type="application/rss+xml" />
	<link>http://sachachua.com/wp</link>
	<description>I help people connect through blogs, wikis, other Web 2.0 tools. I'm also writing a book about Emacs.</description>
	<pubDate>Thu, 04 Sep 2008 17:24:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>More Emacs fun: Composing mail to everyone with notes</title>
		<link>http://sachachua.com/wp/2006/09/01/more-emacs-fun-composing-mail-to-everyone-with-notes/</link>
		<comments>http://sachachua.com/wp/2006/09/01/more-emacs-fun-composing-mail-to-everyone-with-notes/#comments</comments>
		<pubDate>Fri, 01 Sep 2006 16:24:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[bbdb]]></category>

		<category><![CDATA[emacs]]></category>

		<category><![CDATA[gnus]]></category>

		<category><![CDATA[hack]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[pimpmyemacs]]></category>

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.09.01.php#anchor-4</guid>
		<description><![CDATA[<pre class="example">
(defun sacha/compose-mail-to-everyone (&#038;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)
</pre>

<p>On Technorati: <a href="http://www.technorati.com/tag/emacs" rel="tag">emacs</a>, <a href="http://www.technorati.com/tag/lisp" rel="tag">lisp</a>, <a href="http://www.technorati.com/tag/hack" rel="tag">hack</a>, <a href="http://www.technorati.com/tag/gnus" rel="tag">gnus</a>, <a href="http://www.technorati.com/tag/bbdb" rel="tag">bbdb</a>, <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a></p>
]]></description>
			<content:encoded><![CDATA[<pre class="example">
(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)
</pre>

<p>On Technorati: <a href="http://www.technorati.com/tag/emacs" rel="tag">emacs</a>, <a href="http://www.technorati.com/tag/lisp" rel="tag">lisp</a>, <a href="http://www.technorati.com/tag/hack" rel="tag">hack</a>, <a href="http://www.technorati.com/tag/gnus" rel="tag">gnus</a>, <a href="http://www.technorati.com/tag/bbdb" rel="tag">bbdb</a>, <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/09/01/more-emacs-fun-composing-mail-to-everyone-with-notes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Emacs: Keep track of messages sent</title>
		<link>http://sachachua.com/wp/2006/09/01/emacs-keep-track-of-messages-sent/</link>
		<comments>http://sachachua.com/wp/2006/09/01/emacs-keep-track-of-messages-sent/#comments</comments>
		<pubDate>Fri, 01 Sep 2006 16:06:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[bbdb]]></category>

		<category><![CDATA[emacs]]></category>

		<category><![CDATA[hack]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[pimpmyemacs]]></category>

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.09.01.php#anchor-2</guid>
		<description><![CDATA[<p>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.</p>

<pre class="example">
(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)
</pre>

<p>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.</p>

<p>On Technorati: <a href="http://www.technorati.com/tag/emacs" rel="tag">emacs</a>, <a href="http://www.technorati.com/tag/lisp" rel="tag">lisp</a>, <a href="http://www.technorati.com/tag/bbdb" rel="tag">bbdb</a>, <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a>, <a href="http://www.technorati.com/tag/hack" rel="tag">hack</a></p>

<p><a href="/mnt/media/sacha/notebook/emacs/dotgnus.el">/mnt/media/sacha/notebook/emacs/dotgnus.el</a></p>
]]></description>
			<content:encoded><![CDATA[<p>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.</p>

<pre class="example">
(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)
</pre>

<p>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.</p>

<p>On Technorati: <a href="http://www.technorati.com/tag/emacs" rel="tag">emacs</a>, <a href="http://www.technorati.com/tag/lisp" rel="tag">lisp</a>, <a href="http://www.technorati.com/tag/bbdb" rel="tag">bbdb</a>, <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a>, <a href="http://www.technorati.com/tag/hack" rel="tag">hack</a></p>

<p><a href="/mnt/media/sacha/notebook/emacs/dotgnus.el">/mnt/media/sacha/notebook/emacs/dotgnus.el</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/09/01/emacs-keep-track-of-messages-sent/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
