<?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; pimpmyemacs</title>
	<atom:link href="http://sachachua.com/wp/category/pimpmyemacs/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>Sat, 06 Sep 2008 03:47:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Eshell redirection</title>
		<link>http://sachachua.com/wp/2007/10/21/eshell-redirection/</link>
		<comments>http://sachachua.com/wp/2007/10/21/eshell-redirection/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 21:17:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2007.10.21.php#anchor-2</guid>
		<description><![CDATA[<p>Mike Mattie has this awesome Emacs tip for
Eshell: redirecting to buffers and Lisp symbols!</p>

<p>To overwrite buffer "foo":</p>

<pre class="example">ls > #<buffer foo></pre>

<p>To append to buffer "foo":</p>

<pre class="example">ls >> #<buffer foo></pre>

<p>To insert at point in buffer "foo":</p>

<pre class="example">ls >>> #<buffer foo></pre>

<p>To redirect to a Lisp symbol:</p>

<pre class="example">ls >#'some-variable</pre>

<p>I had no idea Emacs could do that. Cool!</p>

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

<p>E-Mail from Mike Mattie</p>

<p>Random Emacs symbol: ps-extend-face-list - Function: Extend face in ALIST-SYM.</p>
]]></description>
			<content:encoded><![CDATA[<p>Mike Mattie has this awesome Emacs tip for
Eshell: redirecting to buffers and Lisp symbols!</p>

<p>To overwrite buffer "foo":</p>

<pre class="example">ls > #<buffer foo></pre>

<p>To append to buffer "foo":</p>

<pre class="example">ls >> #<buffer foo></pre>

<p>To insert at point in buffer "foo":</p>

<pre class="example">ls >>> #<buffer foo></pre>

<p>To redirect to a Lisp symbol:</p>

<pre class="example">ls >#'some-variable</pre>

<p>I had no idea Emacs could do that. Cool!</p>

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

<p>E-Mail from Mike Mattie</p>

<p>Random Emacs symbol: ps-extend-face-list - Function: Extend face in ALIST-SYM.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2007/10/21/eshell-redirection/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Emacs</title>
		<link>http://sachachua.com/wp/2007/09/11/emacs/</link>
		<comments>http://sachachua.com/wp/2007/09/11/emacs/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 16:06:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[pimpmyemacs]]></category>

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2007.09.11.php#anchor-2</guid>
		<description><![CDATA[<p>Terrific comic from UserFriendly about <a href="http://ars.userfriendly.org/cartoons/?id=20070910">my favorite text editor</a>.</p>

<p>I might take sick leave too! ;)</p>

<p>Random Emacs symbol: general-holidays - Variable: General holidays.  Default value is for the United States.</p>

<p>Sent by Stephen Perelgut</p>

<p>On Technorati: <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Terrific comic from UserFriendly about <a href="http://ars.userfriendly.org/cartoons/?id=20070910">my favorite text editor</a>.</p>

<p>I might take sick leave too! ;)</p>

<p>Random Emacs symbol: general-holidays - Variable: General holidays.  Default value is for the United States.</p>

<p>Sent by Stephen Perelgut</p>

<p>On Technorati: <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2007/09/11/emacs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Highrise HQ</title>
		<link>http://sachachua.com/wp/2007/09/11/highrise-hq/</link>
		<comments>http://sachachua.com/wp/2007/09/11/highrise-hq/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 13:00:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2007.09.11.php#anchor-1</guid>
		<description><![CDATA[<p>I took a look at <a href="http://www.highrisehq.com/">Highrise HQ</a> following a recommendation by Winston Damarillo. It's a web-based contact relationship manager (CRM) by 37signals, so it's all pretty and Web 2.0-y.</p>

<p>Looking further, I'm surprised at how much my hand-hacked Emacs-based CRM can do:</p>

<dl>
<dt><strong>Review a colleagueÃƒÂ¢Ã‚Â€Ã‚Â™s notes before calling her contact at the printer</strong></dt>
<dd>I do this with BBDB. Not only that, but my system automatically inserts notes into any e-mail I compose to that person.</dd>
<dt><strong>See all the follow-ups scheduled for this week</strong></dt>
<dd>Got that with Planner</dd>
<dt><strong>Set a reminder to write your client a thank-you note next Friday</strong></dt>
<dd>Ditto with Planner</dd>
<dt><strong>Keep all important emails from a customer together on one page</strong></dt>
<dd>I suppose I could do that with mail search. There must be a better way, though...</dd>
<dt><strong>Schedule a follow-up sales call with a lead in 30 days</strong></dt>
<dd>Gotcha.</dd>
<dt><strong>Review all communications with your investors</strong></dt>
<dd>I haven't figured out how to do this one yet. Mail folders help. Maybe I can hook up BBDB with my mail search engine...</dd>
<dt><strong>Build a list of all the designers your company has hired in the past</strong></dt>
<dd>Can do this with tags. In fact, I can build a list of people who are tagged with A but not B and whom I've talked to in the last year... =)</dd>
<dt><strong>Enter notes from a call with a potential client</strong></dt>
<dd>Gotcha.</dd>
<dt><strong>Enter contact info for people you met at the conference this week</strong></dt>
<dd>Gotcha.</dd>
<dt><strong>Generate a list of contractors you worked with last year</strong></dt>
<dd>Gotcha.</dd>
<dt><strong>See all the people your company knows at The New York Times</strong></dt>
<dd>Regexp search, easy enough.</dd>
</dl>

<p>Highrise: you can share your notes with other people. I don't need that yet, and I don't think I'll need it any time soon.</p>

<p>Emacs: I can use it offline. That totally rocks. Also, I can do lots
of complicated batch operations, such as composing form letters that
include conditional text, randomized text, and personalized
signatures. I can add arbitrary data fields and write code to do all
sorts of things. I don't need Firefox or a mouse.</p>

<p>You know, if I just figured out how to translate my setup to the Web,
I'd make a killing. ;)</p>

<p>I'm going to steal the idea of a pretty view, and I'm going to make it
easier to see all the tasks associated with a person instead of
relying on my daily view. I also need to make it easier to mark
something as for-followup. Hmmm... But yeah, not too bad, not too
bad...</p>

<p>On Technorati: <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a></p>

<p>Random Emacs symbol: gnus-server-opened - Function: Check whether a connection to GNUS-COMMAND-METHOD has been opened. - Face: Face used for displaying OPENED servers</p>
]]></description>
			<content:encoded><![CDATA[<p>I took a look at <a href="http://www.highrisehq.com/">Highrise HQ</a> following a recommendation by Winston Damarillo. It's a web-based contact relationship manager (CRM) by 37signals, so it's all pretty and Web 2.0-y.</p>

<p>Looking further, I'm surprised at how much my hand-hacked Emacs-based CRM can do:</p>

<dl>
<dt><strong>Review a colleagueÃƒÂ¢Ã‚Â€Ã‚Â™s notes before calling her contact at the printer</strong></dt>
<dd>I do this with BBDB. Not only that, but my system automatically inserts notes into any e-mail I compose to that person.</dd>
<dt><strong>See all the follow-ups scheduled for this week</strong></dt>
<dd>Got that with Planner</dd>
<dt><strong>Set a reminder to write your client a thank-you note next Friday</strong></dt>
<dd>Ditto with Planner</dd>
<dt><strong>Keep all important emails from a customer together on one page</strong></dt>
<dd>I suppose I could do that with mail search. There must be a better way, though...</dd>
<dt><strong>Schedule a follow-up sales call with a lead in 30 days</strong></dt>
<dd>Gotcha.</dd>
<dt><strong>Review all communications with your investors</strong></dt>
<dd>I haven't figured out how to do this one yet. Mail folders help. Maybe I can hook up BBDB with my mail search engine...</dd>
<dt><strong>Build a list of all the designers your company has hired in the past</strong></dt>
<dd>Can do this with tags. In fact, I can build a list of people who are tagged with A but not B and whom I've talked to in the last year... =)</dd>
<dt><strong>Enter notes from a call with a potential client</strong></dt>
<dd>Gotcha.</dd>
<dt><strong>Enter contact info for people you met at the conference this week</strong></dt>
<dd>Gotcha.</dd>
<dt><strong>Generate a list of contractors you worked with last year</strong></dt>
<dd>Gotcha.</dd>
<dt><strong>See all the people your company knows at The New York Times</strong></dt>
<dd>Regexp search, easy enough.</dd>
</dl>

<p>Highrise: you can share your notes with other people. I don't need that yet, and I don't think I'll need it any time soon.</p>

<p>Emacs: I can use it offline. That totally rocks. Also, I can do lots
of complicated batch operations, such as composing form letters that
include conditional text, randomized text, and personalized
signatures. I can add arbitrary data fields and write code to do all
sorts of things. I don't need Firefox or a mouse.</p>

<p>You know, if I just figured out how to translate my setup to the Web,
I'd make a killing. ;)</p>

<p>I'm going to steal the idea of a pretty view, and I'm going to make it
easier to see all the tasks associated with a person instead of
relying on my daily view. I also need to make it easier to mark
something as for-followup. Hmmm... But yeah, not too bad, not too
bad...</p>

<p>On Technorati: <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a></p>

<p>Random Emacs symbol: gnus-server-opened - Function: Check whether a connection to GNUS-COMMAND-METHOD has been opened. - Face: Face used for displaying OPENED servers</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2007/09/11/highrise-hq/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Emacs tidbit: DVI and LaTeX interaction</title>
		<link>http://sachachua.com/wp/2007/07/15/emacs-tidbit-dvi-and-latex-interaction/</link>
		<comments>http://sachachua.com/wp/2007/07/15/emacs-tidbit-dvi-and-latex-interaction/#comments</comments>
		<pubDate>Mon, 16 Jul 2007 04:05:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2007.07.16.php#anchor-1</guid>
		<description><![CDATA[<p>Skimming the help.gnu.emacs newsgroup can turn up all sorts of amazing
tidbits. For example, I occasionally write papers using the LaTeX
markup language for scientific documents. This allows me to produce
professional-quality typeset papers, particularly when equations are
involved. (I used that *so* many times in university!)</p>

<p>I just found out that you can click on the typeset document (the DVI)
and jump to the source code. Here's what David wrote on help.gnu.emacs:</p>

<blockquote>
That's easy. This feature is called forward and inverse search. It's
explained in the AucTeX manual. If you use auctex just hit C-c C-t C-s
(I don't know if this also works within the build-in tex mode). This
enables the TeX-source-specials. With the source-specials on, Emacs
will start xdvi with further options. xdvi will start displaying the
page where the point is set in Emacs (forward search). When you click
any line in xdvi simultaneously pressing Ctrl you return to Emacs with
the point on the corresponding paragraph. This works also with other
dvi viewers, but you have to configure them to use emacs server for
inverse search.
</blockquote>

<p>Wow.</p>

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

<p>Random Emacs symbol: default-fringes-outside-margins - Variable: Default value of `fringes-outside-margins' for buffers that don't override it.</p>
]]></description>
			<content:encoded><![CDATA[<p>Skimming the help.gnu.emacs newsgroup can turn up all sorts of amazing
tidbits. For example, I occasionally write papers using the LaTeX
markup language for scientific documents. This allows me to produce
professional-quality typeset papers, particularly when equations are
involved. (I used that *so* many times in university!)</p>

<p>I just found out that you can click on the typeset document (the DVI)
and jump to the source code. Here's what David wrote on help.gnu.emacs:</p>

<blockquote>
That's easy. This feature is called forward and inverse search. It's
explained in the AucTeX manual. If you use auctex just hit C-c C-t C-s
(I don't know if this also works within the build-in tex mode). This
enables the TeX-source-specials. With the source-specials on, Emacs
will start xdvi with further options. xdvi will start displaying the
page where the point is set in Emacs (forward search). When you click
any line in xdvi simultaneously pressing Ctrl you return to Emacs with
the point on the corresponding paragraph. This works also with other
dvi viewers, but you have to configure them to use emacs server for
inverse search.
</blockquote>

<p>Wow.</p>

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

<p>Random Emacs symbol: default-fringes-outside-margins - Variable: Default value of `fringes-outside-margins' for buffers that don't override it.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2007/07/15/emacs-tidbit-dvi-and-latex-interaction/feed/</wfw:commentRss>
		</item>
		<item>
		<title>BBDB: Print birthdates</title>
		<link>http://sachachua.com/wp/2007/01/15/bbdb-print-birthdates/</link>
		<comments>http://sachachua.com/wp/2007/01/15/bbdb-print-birthdates/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 00:30:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[bbdb]]></category>

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

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

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2007.01.15.php#anchor-2</guid>
		<description><![CDATA[<p>This snippet goes through all the records in my Big Brother Database,
prints out birthdate and a link to the record, and then sorts the
results.</p>

<pre class="example">
(defun sacha/bbdb-insert-birthdates ()
  "Insert a list of birthdates, sorted by month.
For best effect, dates should be of the form yyyy.mm.dd."
  (insert
   (with-temp-buffer
     (mapcar
      (lambda (rec)
        (when (bbdb-record-getprop rec 'birthdate)
          (insert
           (if (string-match "..\\...$" (bbdb-record-getprop rec 'birthdate))
               (match-string 0 (bbdb-record-getprop rec 'birthdate))
             (bbdb-record-getprop rec 'birthdate))
           " &#124; "
           (planner-make-link
            (concat "bbdb://"
                    (planner-replace-regexp-in-string
                     " " "." (bbdb-record-name rec)))
            (bbdb-record-name rec))
           "\n")))
      (bbdb-records))
     (sort-lines nil (point-min) (point-max))
     (buffer-string)))
  nil)
</pre>

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

<p>Random Emacs symbol: find-tag-noselect - Command: Find tag (in current tags table) whose name contains TAGNAME.</p>
]]></description>
			<content:encoded><![CDATA[<p>This snippet goes through all the records in my Big Brother Database,
prints out birthdate and a link to the record, and then sorts the
results.</p>

<pre class="example">
(defun sacha/bbdb-insert-birthdates ()
  "Insert a list of birthdates, sorted by month.
For best effect, dates should be of the form yyyy.mm.dd."
  (insert
   (with-temp-buffer
     (mapcar
      (lambda (rec)
        (when (bbdb-record-getprop rec 'birthdate)
          (insert
           (if (string-match "..\\...$" (bbdb-record-getprop rec 'birthdate))
               (match-string 0 (bbdb-record-getprop rec 'birthdate))
             (bbdb-record-getprop rec 'birthdate))
           " | "
           (planner-make-link
            (concat "bbdb://"
                    (planner-replace-regexp-in-string
                     " " "." (bbdb-record-name rec)))
            (bbdb-record-name rec))
           "\n")))
      (bbdb-records))
     (sort-lines nil (point-min) (point-max))
     (buffer-string)))
  nil)
</pre>

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

<p>Random Emacs symbol: find-tag-noselect - Command: Find tag (in current tags table) whose name contains TAGNAME.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2007/01/15/bbdb-print-birthdates/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A year in review: Emacs</title>
		<link>http://sachachua.com/wp/2006/12/26/a-year-in-review-emacs/</link>
		<comments>http://sachachua.com/wp/2006/12/26/a-year-in-review-emacs/#comments</comments>
		<pubDate>Tue, 26 Dec 2006 17:55:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.12.26.php#anchor-6</guid>
		<description><![CDATA[<p>Over the last five months, I've added all sorts of code to my Emacs to
make it a contact relationship management system that fills the
salespeople I know with envy. =)</p>

<ol>
<li><a href="http://sachachua.com/notebook/wiki/2006.07.20.php#anchor-1">2006.07.20#1: Emacs BBDB magic: Greeting people with nicknames</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.07.24.php#anchor-1">2006.07.24#1: Emacs: Automating the insertion of text</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.08.10.php#anchor-3">2006.08.10#3: Sharing the link love</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.08.30.php#anchor-3">2006.08.30#3: My Big Brother Database and social networking sites</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.01.php#anchor-2">2006.09.01#2: Emacs: Keep track of messages sent</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.01.php#anchor-3">2006.09.01#3: More Emacs coolness: List of contacts</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.01.php#anchor-4">2006.09.01#4: More Emacs fun: Composing mail to everyone with notes</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.02.php#anchor-1">2006.09.02#1: More Emacs goodness: Refresh your memory when you e-mail using notes from BBDB</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.15.php#anchor-2">2006.09.15#2: Emacs: Changing the font size on the fly</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.15.php#anchor-3">2006.09.15#3: Emacs clinic at the Linux Caffe</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.28.php#anchor-2">2006.09.28#2: Emacs + LinkedIn: Another totally idiosyncratic bit of code</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.28.php#anchor-3">2006.09.28#3: Emacs: Show only people whom I haven't pinged since...</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.28.php#anchor-4">2006.09.28#4: Emacs: BBDB rapid serial visualization</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.28.php#anchor-5">2006.09.28#5: Emacs: Animation in presentations</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.29.php#anchor-2">2006.09.29#2: Emacs BBDB: Filtering tags with the power of lambda expressions</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.29.php#anchor-8">2006.09.29#8: Emacs BBDB: Prioritize exact matches</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.02.php#anchor-10">2006.10.02#10: Crazy idea for Emacs: Random Emacs taglines</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.02.php#anchor-11">2006.10.02#11: Crazy Emacs: Personalized signatures with random taglines</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.04.php#anchor-1">2006.10.04#1: Developing a better sense of time</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.04.php#anchor-2">2006.10.04#2: Emacs Gnus hack: Prioritize based on the number of recipients</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.11.php#anchor-4">2006.10.11#4: Emacs: Hideshow</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.12.php#anchor-3">2006.10.12#3: Emacs: Quick way to collect references</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.12.php#anchor-4">2006.10.12#4: Emacs and a British voice</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.23.php#anchor-1">2006.10.23#1: Excited about my DemoCamp presentation!</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.27.php#anchor-4">2006.10.27#4: Keeping track of the age of messages</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.11.02.php#anchor-2">2006.11.02#2: Contact report</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.12.12.php#anchor-2">2006.12.12#2: Personal contact relationship management</a></li>
</ol>

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

<p>Random Emacs symbol: browse-url-firefox-arguments - Variable: *A list of strings to pass to Firefox as arguments.</p>
]]></description>
			<content:encoded><![CDATA[<p>Over the last five months, I've added all sorts of code to my Emacs to
make it a contact relationship management system that fills the
salespeople I know with envy. =)</p>

<ol>
<li><a href="http://sachachua.com/notebook/wiki/2006.07.20.php#anchor-1">2006.07.20#1: Emacs BBDB magic: Greeting people with nicknames</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.07.24.php#anchor-1">2006.07.24#1: Emacs: Automating the insertion of text</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.08.10.php#anchor-3">2006.08.10#3: Sharing the link love</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.08.30.php#anchor-3">2006.08.30#3: My Big Brother Database and social networking sites</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.01.php#anchor-2">2006.09.01#2: Emacs: Keep track of messages sent</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.01.php#anchor-3">2006.09.01#3: More Emacs coolness: List of contacts</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.01.php#anchor-4">2006.09.01#4: More Emacs fun: Composing mail to everyone with notes</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.02.php#anchor-1">2006.09.02#1: More Emacs goodness: Refresh your memory when you e-mail using notes from BBDB</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.15.php#anchor-2">2006.09.15#2: Emacs: Changing the font size on the fly</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.15.php#anchor-3">2006.09.15#3: Emacs clinic at the Linux Caffe</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.28.php#anchor-2">2006.09.28#2: Emacs + LinkedIn: Another totally idiosyncratic bit of code</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.28.php#anchor-3">2006.09.28#3: Emacs: Show only people whom I haven't pinged since...</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.28.php#anchor-4">2006.09.28#4: Emacs: BBDB rapid serial visualization</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.28.php#anchor-5">2006.09.28#5: Emacs: Animation in presentations</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.29.php#anchor-2">2006.09.29#2: Emacs BBDB: Filtering tags with the power of lambda expressions</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.09.29.php#anchor-8">2006.09.29#8: Emacs BBDB: Prioritize exact matches</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.02.php#anchor-10">2006.10.02#10: Crazy idea for Emacs: Random Emacs taglines</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.02.php#anchor-11">2006.10.02#11: Crazy Emacs: Personalized signatures with random taglines</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.04.php#anchor-1">2006.10.04#1: Developing a better sense of time</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.04.php#anchor-2">2006.10.04#2: Emacs Gnus hack: Prioritize based on the number of recipients</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.11.php#anchor-4">2006.10.11#4: Emacs: Hideshow</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.12.php#anchor-3">2006.10.12#3: Emacs: Quick way to collect references</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.12.php#anchor-4">2006.10.12#4: Emacs and a British voice</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.23.php#anchor-1">2006.10.23#1: Excited about my DemoCamp presentation!</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.10.27.php#anchor-4">2006.10.27#4: Keeping track of the age of messages</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.11.02.php#anchor-2">2006.11.02#2: Contact report</a></li>
<li><a href="http://sachachua.com/notebook/wiki/2006.12.12.php#anchor-2">2006.12.12#2: Personal contact relationship management</a></li>
</ol>

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

<p>Random Emacs symbol: browse-url-firefox-arguments - Variable: *A list of strings to pass to Firefox as arguments.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/12/26/a-year-in-review-emacs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Personal contact relationship management</title>
		<link>http://sachachua.com/wp/2006/12/12/personal-contact-relationship-management/</link>
		<comments>http://sachachua.com/wp/2006/12/12/personal-contact-relationship-management/#comments</comments>
		<pubDate>Tue, 12 Dec 2006 23:13:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.12.12.php#anchor-2</guid>
		<description><![CDATA[<p>It's a good thing that computer geeks appreciate automation. They can
sniff out form e-mail in seconds, but they don't mind as long as it
comes from a very clever technical hack. Such was the case with the
form letter engine I put together just in time to ask people for their
postal addresses for my holiday updates. Paul Lussier wanted to know what kind of Emacs Lisp magic I was doing
behind the scenes. <a href="http://uc.org/simon">Simon Ditner</a> got his
revenge by obfuscating his reply with 1337sp34&#124;<. People humored me and replied with their addresses and birthdays, knowing that although the e-mail they got may have been mostly automated, my interest in them and my replies to the replies they sent me were very much real.</p>

<p>Good magicians never reveal their tricks, but I like talking about the
crazy Emacs wizardry that goes on behind the scenes. Let me lift the
curtain:</p>

<pre class="example">
(concat
 "Hello, " (or (bbdb-record-getprop record 'nick) (bbdb-record-name record)) "!

I've actually managed to write my 2006 life update / holiday
letter somewhat in time, and will be mailing them out soon. I'd
love to find out how your year has been and what you're planning
to do next year, and I'd be happy to keep you up to date too!

"

(cond
 ((= (length (bbdb-record-addresses record)) 1)
  (concat "Is this address the best one to reach you at?\n\n"
          (sacha/bbdb-address-string (car (bbdb-record-addresses record)))))
 ((> (length (bbdb-record-addresses record)) 1)
  (concat "Which of these addresses is the best one to reach you at?\n\n"
          (mapconcat 'sacha/bbdb-address-string (bbdb-record-addresses record) "\n")))
 (t "I don't seem to have a mailing address for you, though. I'd
like to be able to snail-mail you postcards or holiday updates.
I promise not to use your address for anything evil! =) What's the best
way to send something to you?"))

(if (bbdb-record-getprop record 'birthdate)
    ""
  "\n\nBy the way, when is your birthday?")
"\n\nHope to hear from you soon!

Sacha Chua

p.s. No kittens were harmed in the writing of this message.")
</pre>

<p>That's the source for my form letter - a Lisp expression, allowing me
to use the full power of Emacs. I used that as the input to the
following function:</p>

<pre class="example">
(defun sacha/gnus-send-message-to-all (subject &#038;optional text)
  "Compose message to everyone, with notes.
SUBJECT is a string.
TEXT is a string or an arbitrary Lisp expression starting with (."
  (interactive
   (list (read-string "Subject: ")
         (read-string "Body: ")))
  (let ((records bbdb-records))
    (while records
      (when (bbdb-record-net (caar records))
        (bbdb-send-mail (caar records) subject)
        (goto-char (point-min))
        (re-search-forward "--text " nil t)
        (forward-line 1)
        (let ((record (caar records)))
          (when text
            (insert (if (= (aref text 0) ?\() (eval (read text)) text))))
        (when (bbdb-record-notes (caar records))
          (save-excursion
            (insert "\n--- NOTES ---\n"
                    (bbdb-record-notes (caar records))
                    "\n--- END NOTES ---\n"))))
      (setq records (cdr records)))))
</pre>

<p>The function composed a message for each of the records currently
displayed. I edited the messages by hand, combining messages where
appropriate, and sent them off.</p>

<p>What else can I do with this? Because this function accepts arbitrary
Lisp expressions, it would be really easy to include a random
holiday-related greeting or poem. If I had a database of significant
events, I can include a random factoid about the recipient's birthday.
If I had a local database of people's names, I could send one-off
messages including the meaning of their names.</p>

<p>Yes, it's pretty crazy, but that's what you get when you have a geek
who cares about connecting with people. I've stolen all the cool
features from the contact relationship management systems I know
about, and I keep trying out more ideas. It's a pity that the base
system I'm working on can be quite intimidating. If I found the time
to learn enough, say, Microsoft Outlook programming to implement a
similar system, I think I'd have quite a market.</p>

<p>Even with my idiosyncratic setup, though, it's fun pushing the
envelope. =) There are a lot of other things I'd like to add, and I
don't think I'll ever stop coming up with new ideas. In terms of
personal contact relationship management, I've got one of the most
advanced systems I know&#8212;which just means I need to get to know more
people, so that I can find other inspirations!</p>

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

<p>Random Emacs symbol: previous-buffer - Command: Switch to the previous buffer in cyclic order.</p>
]]></description>
			<content:encoded><![CDATA[<p>It's a good thing that computer geeks appreciate automation. They can
sniff out form e-mail in seconds, but they don't mind as long as it
comes from a very clever technical hack. Such was the case with the
form letter engine I put together just in time to ask people for their
postal addresses for my holiday updates. Paul Lussier wanted to know what kind of Emacs Lisp magic I was doing
behind the scenes. <a href="http://uc.org/simon">Simon Ditner</a> got his
revenge by obfuscating his reply with 1337sp34|<. People humored me and replied with their addresses and birthdays, knowing that although the e-mail they got may have been mostly automated, my interest in them and my replies to the replies they sent me were very much real.</p>

<p>Good magicians never reveal their tricks, but I like talking about the
crazy Emacs wizardry that goes on behind the scenes. Let me lift the
curtain:</p>

<pre class="example">
(concat
 "Hello, " (or (bbdb-record-getprop record 'nick) (bbdb-record-name record)) "!

I've actually managed to write my 2006 life update / holiday
letter somewhat in time, and will be mailing them out soon. I'd
love to find out how your year has been and what you're planning
to do next year, and I'd be happy to keep you up to date too!

"

(cond
 ((= (length (bbdb-record-addresses record)) 1)
  (concat "Is this address the best one to reach you at?\n\n"
          (sacha/bbdb-address-string (car (bbdb-record-addresses record)))))
 ((> (length (bbdb-record-addresses record)) 1)
  (concat "Which of these addresses is the best one to reach you at?\n\n"
          (mapconcat 'sacha/bbdb-address-string (bbdb-record-addresses record) "\n")))
 (t "I don't seem to have a mailing address for you, though. I'd
like to be able to snail-mail you postcards or holiday updates.
I promise not to use your address for anything evil! =) What's the best
way to send something to you?"))

(if (bbdb-record-getprop record 'birthdate)
    ""
  "\n\nBy the way, when is your birthday?")
"\n\nHope to hear from you soon!

Sacha Chua

p.s. No kittens were harmed in the writing of this message.")
</pre>

<p>That's the source for my form letter - a Lisp expression, allowing me
to use the full power of Emacs. I used that as the input to the
following function:</p>

<pre class="example">
(defun sacha/gnus-send-message-to-all (subject &optional text)
  "Compose message to everyone, with notes.
SUBJECT is a string.
TEXT is a string or an arbitrary Lisp expression starting with (."
  (interactive
   (list (read-string "Subject: ")
         (read-string "Body: ")))
  (let ((records bbdb-records))
    (while records
      (when (bbdb-record-net (caar records))
        (bbdb-send-mail (caar records) subject)
        (goto-char (point-min))
        (re-search-forward "--text " nil t)
        (forward-line 1)
        (let ((record (caar records)))
          (when text
            (insert (if (= (aref text 0) ?\() (eval (read text)) text))))
        (when (bbdb-record-notes (caar records))
          (save-excursion
            (insert "\n--- NOTES ---\n"
                    (bbdb-record-notes (caar records))
                    "\n--- END NOTES ---\n"))))
      (setq records (cdr records)))))
</pre>

<p>The function composed a message for each of the records currently
displayed. I edited the messages by hand, combining messages where
appropriate, and sent them off.</p>

<p>What else can I do with this? Because this function accepts arbitrary
Lisp expressions, it would be really easy to include a random
holiday-related greeting or poem. If I had a database of significant
events, I can include a random factoid about the recipient's birthday.
If I had a local database of people's names, I could send one-off
messages including the meaning of their names.</p>

<p>Yes, it's pretty crazy, but that's what you get when you have a geek
who cares about connecting with people. I've stolen all the cool
features from the contact relationship management systems I know
about, and I keep trying out more ideas. It's a pity that the base
system I'm working on can be quite intimidating. If I found the time
to learn enough, say, Microsoft Outlook programming to implement a
similar system, I think I'd have quite a market.</p>

<p>Even with my idiosyncratic setup, though, it's fun pushing the
envelope. =) There are a lot of other things I'd like to add, and I
don't think I'll ever stop coming up with new ideas. In terms of
personal contact relationship management, I've got one of the most
advanced systems I know&mdash;which just means I need to get to know more
people, so that I can find other inspirations!</p>

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

<p>Random Emacs symbol: previous-buffer - Command: Switch to the previous buffer in cyclic order.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/12/12/personal-contact-relationship-management/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Yay, done with Emacs 22 prerelease review!</title>
		<link>http://sachachua.com/wp/2006/11/06/yay-done-with-emacs-22-prerelease-review/</link>
		<comments>http://sachachua.com/wp/2006/11/06/yay-done-with-emacs-22-prerelease-review/#comments</comments>
		<pubDate>Mon, 06 Nov 2006 18:45:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.11.06.php#anchor-2</guid>
		<description><![CDATA[<p>All sorts of goodies in the new Emacs 22. I've just sent a ZIP of the
article and some images off to Don Marti, and I
look forward to merciless editing. I won't be able to post it on my
blog until some time after it gets released, but that was fun to
write.</p>

<p>I had to trim so much material from the individual sections.
Post-thesis, I should really start an Emacs column...</p>

<p>Chatting on #emacs gave me an interesting idea. You know, that Livin'
la Vida Emacs talk I gave at DemoCamp would be great as a
polished talk that I could take on a tour. Post-thesis (or maybe
mostly-done-thesis), I should take to the road and go across US and
Canada talking about tech and meeting up with all sorts of cool
people. It'll be a great excuse to visit Google and Amazon, which must
have lots of incredibly cool Emacs users.</p>

<p>Someday...</p>

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

<p>Random Emacs symbol: remember - Command: Remember an arbitrary piece of data. - Group: A mode to remember information.</p>
]]></description>
			<content:encoded><![CDATA[<p>All sorts of goodies in the new Emacs 22. I've just sent a ZIP of the
article and some images off to Don Marti, and I
look forward to merciless editing. I won't be able to post it on my
blog until some time after it gets released, but that was fun to
write.</p>

<p>I had to trim so much material from the individual sections.
Post-thesis, I should really start an Emacs column...</p>

<p>Chatting on #emacs gave me an interesting idea. You know, that Livin'
la Vida Emacs talk I gave at DemoCamp would be great as a
polished talk that I could take on a tour. Post-thesis (or maybe
mostly-done-thesis), I should take to the road and go across US and
Canada talking about tech and meeting up with all sorts of cool
people. It'll be a great excuse to visit Google and Amazon, which must
have lots of incredibly cool Emacs users.</p>

<p>Someday...</p>

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

<p>Random Emacs symbol: remember - Command: Remember an arbitrary piece of data. - Group: A mode to remember information.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/11/06/yay-done-with-emacs-22-prerelease-review/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The history of Calc</title>
		<link>http://sachachua.com/wp/2006/11/06/the-history-of-calc/</link>
		<comments>http://sachachua.com/wp/2006/11/06/the-history-of-calc/#comments</comments>
		<pubDate>Mon, 06 Nov 2006 16:50:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.11.06.php#anchor-1</guid>
		<description><![CDATA[<p>I'm taking some time off from cramming my KMD2004 project to write a
review of Emacs 22 prerelease for Don Marti. It's a great excuse to
look at all the cool new features I'd been taking for granted in my
Emacs CVS.</p>

<p>I love the stories people tell through their code and their
documentation! For example, take Calc mode. You'd expect it to be a
simple desk calculator, right? No, it can do "arithmetic on rational
numbers, complex numbers (rectangular and polar), error forms with
standard deviations, open and closed intervals, vectors and matrices,
dates and times, infinities, sets, quantities with units, and
algebraic formulas." It has tons of other features, too.</p>

<p>How did a calculator get so big, the way all Emacs features seem to
grow and grow and grow? Check out the History and Acknowledgements
section of the info manual for Calc. Here's the story from David
Gillespie in the manual:</p>

<blockquote>
Calc was originally started as a two-week project to occupy a lull in
the author's schedule.  Basically, a friend asked if I remembered the
value of `2^32'.  I didn't offhand, but I said, "that's easy, just call
up an `xcalc'."  `Xcalc' duly reported that the answer to our question
was `4.294967e+09'&#8212;with no way to see the full ten digits even though
we knew they were there in the program's memory!  I was so annoyed, I
vowed to write a calculator of my own, once and for all.

<p>I chose Emacs Lisp, a) because I had always been curious about it
and b) because, being only a text editor extension language after all,
Emacs Lisp would surely reach its limits long before the project got
too far out of hand.</p>

<p>To make a long story short, Emacs Lisp turned out to be a
distressingly solid implementation of Lisp, and the humble task of
calculating turned out to be more open-ended than one might have
expected.</p>

<p>Emacs Lisp doesn't have built-in floating point math, so it had to be
simulated in software.  In fact, Emacs integers will only comfortably
fit six decimal digits or so&#8212;not enough for a decent calculator.  So I
had to write my own high-precision integer code as well, and once I had
this I figured that arbitrary-size integers were just as easy as large
integers.  Arbitrary floating-point precision was the logical next step.
Also, since the large integer arithmetic was there anyway it seemed only
fair to give the user direct access to it, which in turn made it
practical to support fractions as well as floats.  All these features
inspired me to look around for other data types that might be worth
having.</p>

<p>Around this time, my friend Rick Koshi showed me his nifty new HP-28
calculator.  It allowed the user to manipulate formulas as well as
numerical quantities, and it could also operate on matrices.  I decided
that these would be good for Calc to have, too.  And once things had
gone this far, I figured I might as well take a look at serious algebra
systems for further ideas.  Since these systems did far more than I
could ever hope to implement, I decided to focus on rewrite rules and
other programming features so that users could implement what they
needed for themselves.</p>

<p>Rick complained that matrices were hard to read, so I put in code to
format them in a 2D style.  Once these routines were in place, Big mode
was obligatory.  Gee, what other language modes would be useful?</p>

<p>Scott Hemphill and Allen Knutson, two friends with a strong
mathematical bent, contributed ideas and algorithms for a number of
Calc features including modulo forms, primality testing, and
float-to-fraction conversion.</p>

<p>Units were added at the eager insistence of Mass Sivilotti.  Later,
Ulrich Mueller at CERN and Przemek Klosowski at NIST provided invaluable
expert assistance with the units table.  As far as I can remember, the
idea of using algebraic formulas and variables to represent units dates
back to an ancient article in Byte magazine about muMath, an early
algebra system for microcomputers.</p>

<p>Many people have contributed to Calc by reporting bugs and suggesting
features, large and small.  A few deserve special mention:  Tim Peters,
who helped develop the ideas that led to the selection commands, rewrite
rules, and many other algebra features; Francois Pinard, who
contributed an early prototype of the Calc Summary appendix as well as
providing valuable suggestions in many other areas of Calc; Carl Witty,
whose eagle eyes discovered many typographical and factual errors in
the Calc manual; Tim Kay, who drove the development of Embedded mode;
Ove Ewerlid, who made many suggestions relating to the algebra commands
and contributed some code for polynomial operations; Randal Schwartz,
who suggested the `calc-eval' function; Robert J. Chassell, who
suggested the Calc Tutorial and exercises; and Juha Sarlin, who first
worked out how to split Calc into quickly-loading parts.  Bob Weiner
helped immensely with the Lucid Emacs port.</p>

<p>Among the books used in the development of Calc were Knuth's _Art of
Computer Programming_ (especially volume II, _Seminumerical
Algorithms_); _Numerical Recipes_ by Press, Flannery, Teukolsky, and
Vetterling; Bevington's _Data Reduction and Error Analysis for the
Physical Sciences_; _Concrete Mathematics_ by Graham, Knuth, and
Patashnik; Steele's _Common Lisp, the Language_; the _CRC Standard Math
Tables_ (William H. Beyer, ed.); and Abramowitz and Stegun's venerable
_Handbook of Mathematical Functions_.  Also, of course, Calc could not
have been written without the excellent _GNU Emacs Lisp Reference
Manual_, by Bil Lewis and Dan LaLiberte.</p>

<p>Final thanks go to Richard Stallman, without whose fine
implementations of the Emacs editor, language, and environment, Calc
would have been finished in two weeks.
</blockquote></p>

<p>I've had a lot of these two week projects. I wasn't supposed to get
hooked on Planner. It was just supposed to be one of the components of
my fourth-year undergrad project. It turned into a way of life and my
main open source project for almost three years.</p>

<p>Most people look at Emacs and they see an editor with way, way, way
too many features. How many people need to do in-line matrix
calculations, anyway? I might never use it (then again, who knows?),
but I think it's terrific that someone just sat down one day and put
it in. When I look at Emacs, I see more than a text editor. I see a
community of hackers and a tradition of tinkerers. It's awesome. =)</p>

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

<p>History and Acknowledgements</p>

<p>Random Emacs symbol: enable-kinsoku - Variable: *Non-nil means enable "kinsoku" processing on filling paragraphs.</p>
]]></description>
			<content:encoded><![CDATA[<p>I'm taking some time off from cramming my KMD2004 project to write a
review of Emacs 22 prerelease for Don Marti. It's a great excuse to
look at all the cool new features I'd been taking for granted in my
Emacs CVS.</p>

<p>I love the stories people tell through their code and their
documentation! For example, take Calc mode. You'd expect it to be a
simple desk calculator, right? No, it can do "arithmetic on rational
numbers, complex numbers (rectangular and polar), error forms with
standard deviations, open and closed intervals, vectors and matrices,
dates and times, infinities, sets, quantities with units, and
algebraic formulas." It has tons of other features, too.</p>

<p>How did a calculator get so big, the way all Emacs features seem to
grow and grow and grow? Check out the History and Acknowledgements
section of the info manual for Calc. Here's the story from David
Gillespie in the manual:</p>

<blockquote>
Calc was originally started as a two-week project to occupy a lull in
the author's schedule.  Basically, a friend asked if I remembered the
value of `2^32'.  I didn't offhand, but I said, "that's easy, just call
up an `xcalc'."  `Xcalc' duly reported that the answer to our question
was `4.294967e+09'&mdash;with no way to see the full ten digits even though
we knew they were there in the program's memory!  I was so annoyed, I
vowed to write a calculator of my own, once and for all.

<p>I chose Emacs Lisp, a) because I had always been curious about it
and b) because, being only a text editor extension language after all,
Emacs Lisp would surely reach its limits long before the project got
too far out of hand.</p>

<p>To make a long story short, Emacs Lisp turned out to be a
distressingly solid implementation of Lisp, and the humble task of
calculating turned out to be more open-ended than one might have
expected.</p>

<p>Emacs Lisp doesn't have built-in floating point math, so it had to be
simulated in software.  In fact, Emacs integers will only comfortably
fit six decimal digits or so&mdash;not enough for a decent calculator.  So I
had to write my own high-precision integer code as well, and once I had
this I figured that arbitrary-size integers were just as easy as large
integers.  Arbitrary floating-point precision was the logical next step.
Also, since the large integer arithmetic was there anyway it seemed only
fair to give the user direct access to it, which in turn made it
practical to support fractions as well as floats.  All these features
inspired me to look around for other data types that might be worth
having.</p>

<p>Around this time, my friend Rick Koshi showed me his nifty new HP-28
calculator.  It allowed the user to manipulate formulas as well as
numerical quantities, and it could also operate on matrices.  I decided
that these would be good for Calc to have, too.  And once things had
gone this far, I figured I might as well take a look at serious algebra
systems for further ideas.  Since these systems did far more than I
could ever hope to implement, I decided to focus on rewrite rules and
other programming features so that users could implement what they
needed for themselves.</p>

<p>Rick complained that matrices were hard to read, so I put in code to
format them in a 2D style.  Once these routines were in place, Big mode
was obligatory.  Gee, what other language modes would be useful?</p>

<p>Scott Hemphill and Allen Knutson, two friends with a strong
mathematical bent, contributed ideas and algorithms for a number of
Calc features including modulo forms, primality testing, and
float-to-fraction conversion.</p>

<p>Units were added at the eager insistence of Mass Sivilotti.  Later,
Ulrich Mueller at CERN and Przemek Klosowski at NIST provided invaluable
expert assistance with the units table.  As far as I can remember, the
idea of using algebraic formulas and variables to represent units dates
back to an ancient article in Byte magazine about muMath, an early
algebra system for microcomputers.</p>

<p>Many people have contributed to Calc by reporting bugs and suggesting
features, large and small.  A few deserve special mention:  Tim Peters,
who helped develop the ideas that led to the selection commands, rewrite
rules, and many other algebra features; Francois Pinard, who
contributed an early prototype of the Calc Summary appendix as well as
providing valuable suggestions in many other areas of Calc; Carl Witty,
whose eagle eyes discovered many typographical and factual errors in
the Calc manual; Tim Kay, who drove the development of Embedded mode;
Ove Ewerlid, who made many suggestions relating to the algebra commands
and contributed some code for polynomial operations; Randal Schwartz,
who suggested the `calc-eval' function; Robert J. Chassell, who
suggested the Calc Tutorial and exercises; and Juha Sarlin, who first
worked out how to split Calc into quickly-loading parts.  Bob Weiner
helped immensely with the Lucid Emacs port.</p>

<p>Among the books used in the development of Calc were Knuth's _Art of
Computer Programming_ (especially volume II, _Seminumerical
Algorithms_); _Numerical Recipes_ by Press, Flannery, Teukolsky, and
Vetterling; Bevington's _Data Reduction and Error Analysis for the
Physical Sciences_; _Concrete Mathematics_ by Graham, Knuth, and
Patashnik; Steele's _Common Lisp, the Language_; the _CRC Standard Math
Tables_ (William H. Beyer, ed.); and Abramowitz and Stegun's venerable
_Handbook of Mathematical Functions_.  Also, of course, Calc could not
have been written without the excellent _GNU Emacs Lisp Reference
Manual_, by Bil Lewis and Dan LaLiberte.</p>

<p>Final thanks go to Richard Stallman, without whose fine
implementations of the Emacs editor, language, and environment, Calc
would have been finished in two weeks.
</blockquote></p>

<p>I've had a lot of these two week projects. I wasn't supposed to get
hooked on Planner. It was just supposed to be one of the components of
my fourth-year undergrad project. It turned into a way of life and my
main open source project for almost three years.</p>

<p>Most people look at Emacs and they see an editor with way, way, way
too many features. How many people need to do in-line matrix
calculations, anyway? I might never use it (then again, who knows?),
but I think it's terrific that someone just sat down one day and put
it in. When I look at Emacs, I see more than a text editor. I see a
community of hackers and a tradition of tinkerers. It's awesome. =)</p>

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

<p>History and Acknowledgements</p>

<p>Random Emacs symbol: enable-kinsoku - Variable: *Non-nil means enable "kinsoku" processing on filling paragraphs.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/11/06/the-history-of-calc/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Contact report</title>
		<link>http://sachachua.com/wp/2006/11/02/contact-report/</link>
		<comments>http://sachachua.com/wp/2006/11/02/contact-report/#comments</comments>
		<pubDate>Thu, 02 Nov 2006 20:07:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[bbdb]]></category>

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

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

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

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.11.02.php#anchor-2</guid>
		<description><![CDATA[<p>I started tracking e-mail sent on 2006.09.01 with a
<a href="http://sachachua.com/notebook/wiki/2006.09.01#2">nifty piece of Emacs Lisp code</a> I wrote just for the
purpose. Now I have two months of interesting data which include not
only e-mail but also the occasional in-person contact or phone call
that I remember to note. It's not complete - e-mail's the only thing
that gets automatically tracked - but it does give me interesting
information. Here's the contact report for your amusement:</p>

<p><a href="http://sachachua.com/notebook/wiki/2006.10#contact">Contact report</a></p>

<p>It's sorted by overall frequency and then by regular frequency.
Warning! Parentheses follow.</p>

<pre class="example">
(defun sacha/count-matches (regexp string)
  (let ((count 0)
        (start 0))
    (while (string-match regexp string start)
      (setq start (match-end 0)
            count (1+ count)))
    count))

(defun sacha/bbdb-contact-report-as-alist (&#038;rest regexps)
  "Creates a list of (name count-regexp1 count-regexp2 count-regexp3)..."
  (setq regexps (reverse regexps))
  (delq nil
        (mapcar
         (lambda (rec)
           (when (bbdb-record-name (car rec))
             (let ((reg regexps)
                   (notes (bbdb-record-notes (car rec)))
                   list)
               (while reg
                 (setq list (cons (sacha/count-matches (car reg) notes)
                                  list))
                 (setq reg (cdr reg)))
               (cons (sacha/planner-bbdb-annotation-from-bbdb rec)
                     list))))
         bbdb-records)))

(defun sacha/bbdb-alist-sort-by-total (alist)
  "Sort ALIST by total contact."
  (sort alist 'sacha/bbdb-contact-sort-predicate))

(defun sacha/bbdb-contact-sort-predicate (a b)
  (and a b
       (let ((count-a (apply '+ (cdr a)))
             (count-b (apply '+ (cdr b))))
         (or
          (> count-a count-b)
          (and (= count-a count-b)
               ;; If equal, look at the subtotal of the rest
               (sacha/bbdb-contact-sort-predicate (cdr a) (cdr b)))))))

(defun sacha/bbdb-kill-contact-barchart (alist)
  "Kill a barchart with the contact report for ALIST."
  (kill-new
   (mapconcat
    (lambda (entry)
      (concat
       (car entry)
       " &#124; "
       (mapconcat (lambda (count)
                    (if (= count 0)
                        "&#160;"
                      (make-string count ?-)))
                  (cdr entry)
                  " &#124; ")))
    alist
    "\n")))

;; Usage: (sacha/bbdb-kill-contact-barchart
;;         (sacha/bbdb-alist-sort-by-total
;;          (sacha/bbdb-contact-report-as-alist "2006.09" "2006.10")))
;; Then yank (paste) this into another buffer
</pre>

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

<p>Random Emacs symbol: standard-display-cyrillic-translit - Command: Display a cyrillic buffer using a transliteration.</p>
]]></description>
			<content:encoded><![CDATA[<p>I started tracking e-mail sent on 2006.09.01 with a
<a href="http://sachachua.com/notebook/wiki/2006.09.01#2">nifty piece of Emacs Lisp code</a> I wrote just for the
purpose. Now I have two months of interesting data which include not
only e-mail but also the occasional in-person contact or phone call
that I remember to note. It's not complete - e-mail's the only thing
that gets automatically tracked - but it does give me interesting
information. Here's the contact report for your amusement:</p>

<p><a href="http://sachachua.com/notebook/wiki/2006.10#contact">Contact report</a></p>

<p>It's sorted by overall frequency and then by regular frequency.
Warning! Parentheses follow.</p>

<pre class="example">
(defun sacha/count-matches (regexp string)
  (let ((count 0)
        (start 0))
    (while (string-match regexp string start)
      (setq start (match-end 0)
            count (1+ count)))
    count))

(defun sacha/bbdb-contact-report-as-alist (&rest regexps)
  "Creates a list of (name count-regexp1 count-regexp2 count-regexp3)..."
  (setq regexps (reverse regexps))
  (delq nil
        (mapcar
         (lambda (rec)
           (when (bbdb-record-name (car rec))
             (let ((reg regexps)
                   (notes (bbdb-record-notes (car rec)))
                   list)
               (while reg
                 (setq list (cons (sacha/count-matches (car reg) notes)
                                  list))
                 (setq reg (cdr reg)))
               (cons (sacha/planner-bbdb-annotation-from-bbdb rec)
                     list))))
         bbdb-records)))

(defun sacha/bbdb-alist-sort-by-total (alist)
  "Sort ALIST by total contact."
  (sort alist 'sacha/bbdb-contact-sort-predicate))

(defun sacha/bbdb-contact-sort-predicate (a b)
  (and a b
       (let ((count-a (apply '+ (cdr a)))
             (count-b (apply '+ (cdr b))))
         (or
          (> count-a count-b)
          (and (= count-a count-b)
               ;; If equal, look at the subtotal of the rest
               (sacha/bbdb-contact-sort-predicate (cdr a) (cdr b)))))))

(defun sacha/bbdb-kill-contact-barchart (alist)
  "Kill a barchart with the contact report for ALIST."
  (kill-new
   (mapconcat
    (lambda (entry)
      (concat
       (car entry)
       " | "
       (mapconcat (lambda (count)
                    (if (= count 0)
                        "&nbsp;"
                      (make-string count ?-)))
                  (cdr entry)
                  " | ")))
    alist
    "\n")))

;; Usage: (sacha/bbdb-kill-contact-barchart
;;         (sacha/bbdb-alist-sort-by-total
;;          (sacha/bbdb-contact-report-as-alist "2006.09" "2006.10")))
;; Then yank (paste) this into another buffer
</pre>

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

<p>Random Emacs symbol: standard-display-cyrillic-translit - Command: Display a cyrillic buffer using a transliteration.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/11/02/contact-report/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Keeping track of the age of messages</title>
		<link>http://sachachua.com/wp/2006/10/27/keeping-track-of-the-age-of-messages/</link>
		<comments>http://sachachua.com/wp/2006/10/27/keeping-track-of-the-age-of-messages/#comments</comments>
		<pubDate>Fri, 27 Oct 2006 23:35:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.10.27.php#anchor-4</guid>
		<description><![CDATA[<p>I can get pretty bad at responding to e-mail. This is an experiment to
see whether the negative reinforcement of seeing just how old a
message is will help me be more responsive. Either that, or I can
strive for a Mean Time Between Responses of whatever... ;)</p>

<p>Hmm, maybe I should combine this with my blog and start distinguishing
between E-mail to and Reply to...</p>

<pre class="example">
(defadvice gnus-post-news (around sacha/gnus-track-message-age activate)
  "Insert a header showing how old a message is, to shame me into replying faster."
  ;; Before you post the news, figure out how old it is
  (let (days)
    (when article-buffer
      (setq days
            (- (time-to-days (current-time))
               (time-to-days
                (gnus-date-get-time
                 (mail-header-date
                  (gnus-summary-article-header
                   (gnus-summary-article-number))))))))
    ad-do-it
    (when days
      (goto-char (point-min))
      (when (re-search-forward "--text follows this line--" nil t)
        (forward-line 1)
        (insert "In reply to a message sent by "
                (mail-header-from message-reply-headers)
                " "
                (cond
                 ((= days 0) "today")
                 ((= days 1) "yesterday")
                 (t (format "%d days ago" days)))
                ": \n\n")))))
(setq message-citation-line-function nil)
</pre>

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

<p>Random Emacs symbol: tramp-perl-directory-files-and-attributes - Variable: Perl script implementing `directory-files-attributes' as Lisp `read'able</p>
]]></description>
			<content:encoded><![CDATA[<p>I can get pretty bad at responding to e-mail. This is an experiment to
see whether the negative reinforcement of seeing just how old a
message is will help me be more responsive. Either that, or I can
strive for a Mean Time Between Responses of whatever... ;)</p>

<p>Hmm, maybe I should combine this with my blog and start distinguishing
between E-mail to and Reply to...</p>

<pre class="example">
(defadvice gnus-post-news (around sacha/gnus-track-message-age activate)
  "Insert a header showing how old a message is, to shame me into replying faster."
  ;; Before you post the news, figure out how old it is
  (let (days)
    (when article-buffer
      (setq days
            (- (time-to-days (current-time))
               (time-to-days
                (gnus-date-get-time
                 (mail-header-date
                  (gnus-summary-article-header
                   (gnus-summary-article-number))))))))
    ad-do-it
    (when days
      (goto-char (point-min))
      (when (re-search-forward "--text follows this line--" nil t)
        (forward-line 1)
        (insert "In reply to a message sent by "
                (mail-header-from message-reply-headers)
                " "
                (cond
                 ((= days 0) "today")
                 ((= days 1) "yesterday")
                 (t (format "%d days ago" days)))
                ": \n\n")))))
(setq message-citation-line-function nil)
</pre>

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

<p>Random Emacs symbol: tramp-perl-directory-files-and-attributes - Variable: Perl script implementing `directory-files-attributes' as Lisp `read'able</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/10/27/keeping-track-of-the-age-of-messages/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Planet Emacsen</title>
		<link>http://sachachua.com/wp/2006/10/27/planet-emacsen/</link>
		<comments>http://sachachua.com/wp/2006/10/27/planet-emacsen/#comments</comments>
		<pubDate>Fri, 27 Oct 2006 06:43:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.10.27.php#anchor-3</guid>
		<description><![CDATA[<p><a href="http://planet.emacsen.org/">http://planet.emacsen.org/</a> by Edward O'Connor. 'Nuff said! =D</p>

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

<p>Random Emacs symbol: ido-subdir - Face: *Font used by ido for highlighting subdirs in the alternatives.</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://planet.emacsen.org/">http://planet.emacsen.org/</a> by Edward O'Connor. 'Nuff said! =D</p>

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

<p>Random Emacs symbol: ido-subdir - Face: *Font used by ido for highlighting subdirs in the alternatives.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/10/27/planet-emacsen/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Excited about my DemoCamp presentation!</title>
		<link>http://sachachua.com/wp/2006/10/23/excited-about-my-democamp-presentation/</link>
		<comments>http://sachachua.com/wp/2006/10/23/excited-about-my-democamp-presentation/#comments</comments>
		<pubDate>Mon, 23 Oct 2006 20:21:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[democamp]]></category>

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

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.10.23.php#anchor-1</guid>
		<description><![CDATA[<p>I've written a totally small-time presentation thingy that cues me thanks to Emacspeak. ;) Here's the setup code:</p>

<pre class="example">
(progn ;; Setup
  (defvar democamp/presentation-file "~/democamp.el")
  (defvar democamp/cue-buffer "*DemoCamp*")
  (defun democamp/next ()
    (interactive)
    (let (start sexp)
      (with-current-buffer (find-file-noselect democamp/presentation-file)
        (setq start (point))
        (forward-sexp)
        (setq sexp (buffer-substring-no-properties start (point))))
      (eval (read sexp))))

  (defun democamp/previous ()
    (interactive)
    (let (start sexp)
      (with-current-buffer (find-file-noselect democamp/presentation-file)
        (setq start (point))
        (backward-sexp)
        (setq sexp (buffer-substring-no-properties (point) start)))
      (eval (read sexp))))

  (defun democamp/repeat ()
    (interactive)
    (let (start sexp)
      (with-current-buffer (find-file-noselect democamp/presentation-file)
        (setq start (point))
        (backward-sexp)
        (setq sexp (buffer-substring (point) start))
        (forward-sexp))
      (eval (read sexp))))

  (defun democamp/say (text)
    (with-current-buffer (get-buffer-create democamp/cue-buffer)
      (erase-buffer)
      (insert text)
      (goto-char (point-min))
      (call-interactively 'emacspeak-speak-buffer)))
  (global-set-key (kbd "<f12>") 'democamp/next)
  (global-set-key (kbd "S-<f12>") 'democamp/previous)
  (global-set-key (kbd "C-<f12>") 'democamp/repeat)
)
</pre>

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

<p>Random Emacs symbol: gnus-multiple-choice - Function: Ask user a multiple choice question.</p>
]]></description>
			<content:encoded><![CDATA[<p>I've written a totally small-time presentation thingy that cues me thanks to Emacspeak. ;) Here's the setup code:</p>

<pre class="example">
(progn ;; Setup
  (defvar democamp/presentation-file "~/democamp.el")
  (defvar democamp/cue-buffer "*DemoCamp*")
  (defun democamp/next ()
    (interactive)
    (let (start sexp)
      (with-current-buffer (find-file-noselect democamp/presentation-file)
        (setq start (point))
        (forward-sexp)
        (setq sexp (buffer-substring-no-properties start (point))))
      (eval (read sexp))))

  (defun democamp/previous ()
    (interactive)
    (let (start sexp)
      (with-current-buffer (find-file-noselect democamp/presentation-file)
        (setq start (point))
        (backward-sexp)
        (setq sexp (buffer-substring-no-properties (point) start)))
      (eval (read sexp))))

  (defun democamp/repeat ()
    (interactive)
    (let (start sexp)
      (with-current-buffer (find-file-noselect democamp/presentation-file)
        (setq start (point))
        (backward-sexp)
        (setq sexp (buffer-substring (point) start))
        (forward-sexp))
      (eval (read sexp))))

  (defun democamp/say (text)
    (with-current-buffer (get-buffer-create democamp/cue-buffer)
      (erase-buffer)
      (insert text)
      (goto-char (point-min))
      (call-interactively 'emacspeak-speak-buffer)))
  (global-set-key (kbd "<f12>") 'democamp/next)
  (global-set-key (kbd "S-<f12>") 'democamp/previous)
  (global-set-key (kbd "C-<f12>") 'democamp/repeat)
)
</pre>

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

<p>Random Emacs symbol: gnus-multiple-choice - Function: Ask user a multiple choice question.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/10/23/excited-about-my-democamp-presentation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Emacs and a British voice</title>
		<link>http://sachachua.com/wp/2006/10/12/emacs-and-a-british-voice/</link>
		<comments>http://sachachua.com/wp/2006/10/12/emacs-and-a-british-voice/#comments</comments>
		<pubDate>Fri, 13 Oct 2006 02:53:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.10.12.php#anchor-4</guid>
		<description><![CDATA[<p>There's something about deep, deep cultural programming. Anything
spoken with a British accent just sounds infinitely cool. Everyone
uses the default voice for Asterisk and all of that - an American
male.</p>

<p>You want to install festvox-rablpc16k or festvox-rablpc8k in addition
to all the usual things you need for emacspeak. You'll also need
espeakf from CVS.</p>

<pre class="example">
cvs -d:pserver:anonymous@espeakf.cvs.sourceforge.net:/cvsroot/espeakf login
cvs -z3 -d:pserver:anonymous@espeakf.cvs.sourceforge.net:/cvsroot/espeakf co -P espeakf
cd espeakf
sudo make install
</pre>

<p>One of these lines is responsible for setting up espeakf. I just can't
be bothered with figuring out which. ;) Probably the dtk-program line.</p>

<pre class="example">
(setq dtk-program "/usr/share/emacs/site-lisp/emacspeak/servers/espeakf.pl")
(setenv "DTK_TCL" dtk-program)
(setenv "DTK_PROGRAM" dtk-program)
</pre>

<p>Then add this to your /etc/festival.scm:</p>

<pre class="example">
(set! voice_default 'voice_rab_diphone)
</pre>

<p>Yummy British accent goodness.</p>

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

<p>Random Emacs symbol: mail-extr-disable-voodoo - Variable: *If it is a regexp, names matching it will never be modified.</p>
]]></description>
			<content:encoded><![CDATA[<p>There's something about deep, deep cultural programming. Anything
spoken with a British accent just sounds infinitely cool. Everyone
uses the default voice for Asterisk and all of that - an American
male.</p>

<p>You want to install festvox-rablpc16k or festvox-rablpc8k in addition
to all the usual things you need for emacspeak. You'll also need
espeakf from CVS.</p>

<pre class="example">
cvs -d:pserver:anonymous@espeakf.cvs.sourceforge.net:/cvsroot/espeakf login
cvs -z3 -d:pserver:anonymous@espeakf.cvs.sourceforge.net:/cvsroot/espeakf co -P espeakf
cd espeakf
sudo make install
</pre>

<p>One of these lines is responsible for setting up espeakf. I just can't
be bothered with figuring out which. ;) Probably the dtk-program line.</p>

<pre class="example">
(setq dtk-program "/usr/share/emacs/site-lisp/emacspeak/servers/espeakf.pl")
(setenv "DTK_TCL" dtk-program)
(setenv "DTK_PROGRAM" dtk-program)
</pre>

<p>Then add this to your /etc/festival.scm:</p>

<pre class="example">
(set! voice_default 'voice_rab_diphone)
</pre>

<p>Yummy British accent goodness.</p>

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

<p>Random Emacs symbol: mail-extr-disable-voodoo - Variable: *If it is a regexp, names matching it will never be modified.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/10/12/emacs-and-a-british-voice/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Emacs: Quick way to collect references</title>
		<link>http://sachachua.com/wp/2006/10/12/emacs-quick-way-to-collect-references/</link>
		<comments>http://sachachua.com/wp/2006/10/12/emacs-quick-way-to-collect-references/#comments</comments>
		<pubDate>Fri, 13 Oct 2006 01:57:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.10.12.php#anchor-3</guid>
		<description><![CDATA[<pre class="example">
(defvar sacha/planner-collector-buffer nil "Buffer for collecting links.")
(defun sacha/planner-collect-reference ()
  (interactive)
  (let ((text (sacha/yank-blog-reference-for-summary)))
    (with-current-buffer sacha/planner-collector-buffer
      (insert text))))

(defun sacha/planner-collect-reference ()
  (interactive)
  (let ((text (buffer-substring (line-beginning-position)
                                (1+ (line-end-position)))))
    (with-current-buffer sacha/planner-collector-buffer
      (insert text))))
</pre>

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

<p>Random Emacs symbol: sgml-tag - Command: Prompt for a tag and insert it, optionally with attributes.</p>
]]></description>
			<content:encoded><![CDATA[<pre class="example">
(defvar sacha/planner-collector-buffer nil "Buffer for collecting links.")
(defun sacha/planner-collect-reference ()
  (interactive)
  (let ((text (sacha/yank-blog-reference-for-summary)))
    (with-current-buffer sacha/planner-collector-buffer
      (insert text))))

(defun sacha/planner-collect-reference ()
  (interactive)
  (let ((text (buffer-substring (line-beginning-position)
                                (1+ (line-end-position)))))
    (with-current-buffer sacha/planner-collector-buffer
      (insert text))))
</pre>

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

<p>Random Emacs symbol: sgml-tag - Command: Prompt for a tag and insert it, optionally with attributes.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/10/12/emacs-quick-way-to-collect-references/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Emacs: Hideshow</title>
		<link>http://sachachua.com/wp/2006/10/11/emacs-hideshow/</link>
		<comments>http://sachachua.com/wp/2006/10/11/emacs-hideshow/#comments</comments>
		<pubDate>Thu, 12 Oct 2006 03:41:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.10.11.php#anchor-4</guid>
		<description><![CDATA[<p>One of the things I love about vising irc.freenode.net #emacs is that helping people with their questions lets me discover all sorts of cool things about Emacs. Today's nugget? hideshow.el, which allows you to automatically hide / show code. (Equivalent of vim folding).</p>

<p>I've added the following code to my config:</p>

<pre class="example">
(load-library "hideshow")
(add-hook 'emacs-lisp-mode-hook
          (lambda () (hs-minor-mode 1)
            (hs-hide-all)
            (set (make-variable-buffer-local 'my-hs-hide) t)))
(defvar my-hs-hide t "Current state of hideshow for toggling all.")
;;;###autoload
(defun my-toggle-hideshow-all ()
  "Toggle hideshow all."
  (interactive)
  (set (make-variable-buffer-local 'my-hs-hide) (not my-hs-hide))
  (if my-hs-hide
      (hs-hide-all)
    (hs-show-all)))
(global-set-key (kbd "C-c @ @") 'my-toggle-hideshow-all)
(global-set-key (kbd "C-c @ h") 'hs-hide-block)
(global-set-key (kbd "C-c @ s") 'hs-show-block)
(global-set-key (kbd "C-c @ SPC") 'hs-show-block)
</pre>

<p>Sweet.</p>

<p>... and then I find that I already have a
<a href="http://sachachua.com/notebook/emacs/hideshow-config.el">hideshow config</a>, of course, and that
I added it on 2003.11.21... &#60;bonk&#62;!</p>

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

<p>Random Emacs symbol: timezone-parse-date - Function: Parse DATE and return a vector [YEAR MONTH DAY TIME TIMEZONE].</p>
]]></description>
			<content:encoded><![CDATA[<p>One of the things I love about vising irc.freenode.net #emacs is that helping people with their questions lets me discover all sorts of cool things about Emacs. Today's nugget? hideshow.el, which allows you to automatically hide / show code. (Equivalent of vim folding).</p>

<p>I've added the following code to my config:</p>

<pre class="example">
(load-library "hideshow")
(add-hook 'emacs-lisp-mode-hook
          (lambda () (hs-minor-mode 1)
            (hs-hide-all)
            (set (make-variable-buffer-local 'my-hs-hide) t)))
(defvar my-hs-hide t "Current state of hideshow for toggling all.")
;;;###autoload
(defun my-toggle-hideshow-all ()
  "Toggle hideshow all."
  (interactive)
  (set (make-variable-buffer-local 'my-hs-hide) (not my-hs-hide))
  (if my-hs-hide
      (hs-hide-all)
    (hs-show-all)))
(global-set-key (kbd "C-c @ @") 'my-toggle-hideshow-all)
(global-set-key (kbd "C-c @ h") 'hs-hide-block)
(global-set-key (kbd "C-c @ s") 'hs-show-block)
(global-set-key (kbd "C-c @ SPC") 'hs-show-block)
</pre>

<p>Sweet.</p>

<p>... and then I find that I already have a
<a href="http://sachachua.com/notebook/emacs/hideshow-config.el">hideshow config</a>, of course, and that
I added it on 2003.11.21... &lt;bonk&gt;!</p>

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

<p>Random Emacs symbol: timezone-parse-date - Function: Parse DATE and return a vector [YEAR MONTH DAY TIME TIMEZONE].</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/10/11/emacs-hideshow/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Emacs Gnus hack: Prioritize based on the number of recipients</title>
		<link>http://sachachua.com/wp/2006/10/04/emacs-gnus-hack-prioritize-based-on-the-number-of-recipients/</link>
		<comments>http://sachachua.com/wp/2006/10/04/emacs-gnus-hack-prioritize-based-on-the-number-of-recipients/#comments</comments>
		<pubDate>Wed, 04 Oct 2006 19:15:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

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

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.10.04.php#anchor-2</guid>
		<description><![CDATA[<p>Ever found yourself confronted with an inbox overflowing with general
messages that you can ignore and messages that you and only you can
act on? Here's something to help you sort the wheat from the chaff.</p>

<p>This indicates how personal messages are so you can immediately see which messages are just for you and which are part of a long Cc. Stephen Perelgut showed me the feature in Lotus Notes and I wanted to steal it sometime, so I did it while waiting for the Instant Rails archive.</p>

<p>To use it, add %ur to your gnus-summary-line-format.</p>

<pre class="example">
(add-to-list 'nnmail-extra-headers 'To)
(add-to-list 'nnmail-extra-headers 'Cc)
(defvar sacha/gnus-count-recipients-threshold 5
  "*Number of recipients to consider as large.")

(defun sacha/gnus-count-recipients (header)
  "Given a Gnus message header, returns priority mark.
If I am the only recipient, return \"!\".
If I am one of a few recipients, but I'm listed in To:, return \"*\".
If I am one of a few recipients, return \"/\".
If I am one of many recipients, return \".\".
Else, return \" \"."
  (let* ((to (or (cdr (assoc 'To (mail-header-extra header))) ""))
         (cc (or (cdr (assoc 'Cc (mail-header-extra header))) "")))
    (cond
     ((string-match gnus-ignored-from-addresses to)
      (let ((len (length (bbdb-split to ","))))
        (cond
         ((= len 1) "!")
         ((< len sacha/gnus-count-recipients-threshold) "*")
         (t "/"))))
     ((string-match gnus-ignored-from-addresses
                    (concat to ", " cc))
      (if (< (length (bbdb-split (concat to ", " cc) ","))
             sacha/gnus-count-recipients-threshold)
          "/"
        "."))
     (t " "))))

(defalias 'gnus-user-format-function-r 'sacha/gnus-count-recipients)
</pre>

<p>Random Emacs symbol: dired-listing-switches - Variable: *Switches passed to `ls' for Dired.  MUST contain the `l' option.</p>

<p>On Technorati: <a href="http://www.technorati.com/tag/emacs" rel="tag">emacs</a>, <a href="http://www.technorati.com/tag/gnus" rel="tag">gnus</a>, <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a>, <a href="http://www.technorati.com/tag/emacslisp" rel="tag">emacslisp</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Ever found yourself confronted with an inbox overflowing with general
messages that you can ignore and messages that you and only you can
act on? Here's something to help you sort the wheat from the chaff.</p>

<p>This indicates how personal messages are so you can immediately see which messages are just for you and which are part of a long Cc. Stephen Perelgut showed me the feature in Lotus Notes and I wanted to steal it sometime, so I did it while waiting for the Instant Rails archive.</p>

<p>To use it, add %ur to your gnus-summary-line-format.</p>

<pre class="example">
(add-to-list 'nnmail-extra-headers 'To)
(add-to-list 'nnmail-extra-headers 'Cc)
(defvar sacha/gnus-count-recipients-threshold 5
  "*Number of recipients to consider as large.")

(defun sacha/gnus-count-recipients (header)
  "Given a Gnus message header, returns priority mark.
If I am the only recipient, return \"!\".
If I am one of a few recipients, but I'm listed in To:, return \"*\".
If I am one of a few recipients, return \"/\".
If I am one of many recipients, return \".\".
Else, return \" \"."
  (let* ((to (or (cdr (assoc 'To (mail-header-extra header))) ""))
         (cc (or (cdr (assoc 'Cc (mail-header-extra header))) "")))
    (cond
     ((string-match gnus-ignored-from-addresses to)
      (let ((len (length (bbdb-split to ","))))
        (cond
         ((= len 1) "!")
         ((< len sacha/gnus-count-recipients-threshold) "*")
         (t "/"))))
     ((string-match gnus-ignored-from-addresses
                    (concat to ", " cc))
      (if (< (length (bbdb-split (concat to ", " cc) ","))
             sacha/gnus-count-recipients-threshold)
          "/"
        "."))
     (t " "))))

(defalias 'gnus-user-format-function-r 'sacha/gnus-count-recipients)
</pre>

<p>Random Emacs symbol: dired-listing-switches - Variable: *Switches passed to `ls' for Dired.  MUST contain the `l' option.</p>

<p>On Technorati: <a href="http://www.technorati.com/tag/emacs" rel="tag">emacs</a>, <a href="http://www.technorati.com/tag/gnus" rel="tag">gnus</a>, <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a>, <a href="http://www.technorati.com/tag/emacslisp" rel="tag">emacslisp</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/10/04/emacs-gnus-hack-prioritize-based-on-the-number-of-recipients/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Developing a better sense of time</title>
		<link>http://sachachua.com/wp/2006/10/04/developing-a-better-sense-of-time/</link>
		<comments>http://sachachua.com/wp/2006/10/04/developing-a-better-sense-of-time/#comments</comments>
		<pubDate>Wed, 04 Oct 2006 18:34:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[emacs]]></category>

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

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

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.10.04.php#anchor-1</guid>
		<description><![CDATA[<p>One of the things I want to do is develop a good sense of how long it
takes me to do something. Better time estimates lead to better
scheduling, better sense of what I can commit to, and ultimately less
stress and more happiness. =)</p>

<p>Fortunately, Planner makes it easy for me to do really detailed
time-tracking. When I mark a task as in progress, the clock starts
ticking. When I postpone or close a task, the system clocks out
automatically.</p>

<p>I find that my attention occasionally strays. Sometime ago, I wrote a
function to help me keep track of what I'm supposed to be doing.
Today, I've decided to try estimating task completion times for more
of the tasks on my list. I modified my old function to tell me how
much time has elapsed since I started the task. This doesn't take into
account previous clock-in/clock-outs, but it will do for now.</p>

<p>We'll see how well it works. =)</p>

<pre class="example">
;; I've bound sacha/planner-what-am-i-supposed-to-be-doing to F9 F11. I
;; start out by clocking into the task (use planner-timeclock.el and
;; C-c TAB to mark a task as in progress). Then, when I find myself
;; getting distracted, I hit F9 F9 to see my current task in the
;; minibuffer. C-u F9 F9 jumps back to the task so that I can either
;; mark it as postponed. M-x planner-task-pending (bound to C-c C-p in
;; my local config) and M-x planner-task-done (C-c C-x) both clock out
;; of the task. If I want to jump back to the previous window
;; configuration from that planner page, I can just hit F9 F9 again.

(defvar sacha/window-register "w"
  "Register for jumping back and forth between planner and wherever I am.")
(defvar sacha/planner-current-task nil
  "Current task info.")
(defadvice planner-task-in-progress (after sacha activate)
  "Keep track of the task info."
  (setq sacha/planner-current-task (planner-current-task-info)))

(defun sacha/planner-what-am-i-supposed-to-be-doing (&#038;optional prefix)
  "Make it easy to keep track of what I'm supposed to be working on.
If PREFIX is non-nil, jump to the current task, else display it
in a message. If called from the plan page, jump back to whatever
I was looking at."
  (interactive "P")
  (if planner-timeclock-current-task
      (if (string= (planner-task-page sacha/planner-current-task)
                   (planner-page-name))
          (jump-to-register sacha/window-register)
        (if (null prefix)
            (message "%s %s"
                     ;; Minutes so far
                     (timeclock-seconds-to-string (timeclock-last-period))
                     planner-timeclock-current-task)
          (frame-configuration-to-register sacha/window-register)
          (planner-find-file (planner-task-page sacha/planner-current-task))
          (planner-find-task sacha/planner-current-task)))
    (if prefix
        (planner-goto-today)
      (message "No current task. HEY!"))))
</pre>

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

<p>Random Emacs symbol: cal-tex-mouse-filofax-week - Command: Two page Filofax calendar for week indicated by cursor. <i>(Hey, I didn't know we could print Filofax calendars from Emacs cal...)</i></p>
]]></description>
			<content:encoded><![CDATA[<p>One of the things I want to do is develop a good sense of how long it
takes me to do something. Better time estimates lead to better
scheduling, better sense of what I can commit to, and ultimately less
stress and more happiness. =)</p>

<p>Fortunately, Planner makes it easy for me to do really detailed
time-tracking. When I mark a task as in progress, the clock starts
ticking. When I postpone or close a task, the system clocks out
automatically.</p>

<p>I find that my attention occasionally strays. Sometime ago, I wrote a
function to help me keep track of what I'm supposed to be doing.
Today, I've decided to try estimating task completion times for more
of the tasks on my list. I modified my old function to tell me how
much time has elapsed since I started the task. This doesn't take into
account previous clock-in/clock-outs, but it will do for now.</p>

<p>We'll see how well it works. =)</p>

<pre class="example">
;; I've bound sacha/planner-what-am-i-supposed-to-be-doing to F9 F11. I
;; start out by clocking into the task (use planner-timeclock.el and
;; C-c TAB to mark a task as in progress). Then, when I find myself
;; getting distracted, I hit F9 F9 to see my current task in the
;; minibuffer. C-u F9 F9 jumps back to the task so that I can either
;; mark it as postponed. M-x planner-task-pending (bound to C-c C-p in
;; my local config) and M-x planner-task-done (C-c C-x) both clock out
;; of the task. If I want to jump back to the previous window
;; configuration from that planner page, I can just hit F9 F9 again.

(defvar sacha/window-register "w"
  "Register for jumping back and forth between planner and wherever I am.")
(defvar sacha/planner-current-task nil
  "Current task info.")
(defadvice planner-task-in-progress (after sacha activate)
  "Keep track of the task info."
  (setq sacha/planner-current-task (planner-current-task-info)))

(defun sacha/planner-what-am-i-supposed-to-be-doing (&optional prefix)
  "Make it easy to keep track of what I'm supposed to be working on.
If PREFIX is non-nil, jump to the current task, else display it
in a message. If called from the plan page, jump back to whatever
I was looking at."
  (interactive "P")
  (if planner-timeclock-current-task
      (if (string= (planner-task-page sacha/planner-current-task)
                   (planner-page-name))
          (jump-to-register sacha/window-register)
        (if (null prefix)
            (message "%s %s"
                     ;; Minutes so far
                     (timeclock-seconds-to-string (timeclock-last-period))
                     planner-timeclock-current-task)
          (frame-configuration-to-register sacha/window-register)
          (planner-find-file (planner-task-page sacha/planner-current-task))
          (planner-find-task sacha/planner-current-task)))
    (if prefix
        (planner-goto-today)
      (message "No current task. HEY!"))))
</pre>

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

<p>Random Emacs symbol: cal-tex-mouse-filofax-week - Command: Two page Filofax calendar for week indicated by cursor. <i>(Hey, I didn't know we could print Filofax calendars from Emacs cal...)</i></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/10/04/developing-a-better-sense-of-time/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Crazy idea for Emacs: Random Emacs taglines</title>
		<link>http://sachachua.com/wp/2006/10/02/crazy-idea-for-emacs-random-emacs-taglines/</link>
		<comments>http://sachachua.com/wp/2006/10/02/crazy-idea-for-emacs-random-emacs-taglines/#comments</comments>
		<pubDate>Mon, 02 Oct 2006 18:34:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[elisp]]></category>

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

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.10.02.php#anchor-10</guid>
		<description><![CDATA[<p>Would anyone happen to know of a way to select a random symbol with a
description?</p>

<p>Actually. Hmm.</p>

<pre class="example">
(progn
  (apropos ".")
  (write-file "~/.taglines.random-emacs-symbols")
  (delete-matching-lines "Plist")
  (delete-matching-lines "not documented")
  (replace-regexp "\n  " " - " nil)
  (delete-non-matching-lines " - "))
</pre>

<p>Et voila! Random Emacs taglines together with the code:</p>

<pre class="example">
(defun sacha/random-tagline (&#038;optional file)
  "Return a random tagline and put it in the kill ring."
  (interactive)
  (with-current-buffer (find-file-noselect (or file "~/.taglines"))
    (goto-char (random (point-max)))
    (let ((string
           (buffer-substring (line-beginning-position)
                             (line-end-position))))
      (kill-new string)
      string)))

(defadvice remember (after sacha-tagline activate)
  "Add random tagline."
  (save-excursion
  (goto-char (point-max))
  (insert "\n\nRandom Emacs symbol: "
          (sacha/random-tagline "~/.taglines.random-emacs-symbols")
          "\n\n")))))
</pre>

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

<p>Random Emacs symbol: eshell-remove-entries - Function: From PATH, remove all of the given FILES, perhaps interactively.</p>
]]></description>
			<content:encoded><![CDATA[<p>Would anyone happen to know of a way to select a random symbol with a
description?</p>

<p>Actually. Hmm.</p>

<pre class="example">
(progn
  (apropos ".")
  (write-file "~/.taglines.random-emacs-symbols")
  (delete-matching-lines "Plist")
  (delete-matching-lines "not documented")
  (replace-regexp "\n  " " - " nil)
  (delete-non-matching-lines " - "))
</pre>

<p>Et voila! Random Emacs taglines together with the code:</p>

<pre class="example">
(defun sacha/random-tagline (&optional file)
  "Return a random tagline and put it in the kill ring."
  (interactive)
  (with-current-buffer (find-file-noselect (or file "~/.taglines"))
    (goto-char (random (point-max)))
    (let ((string
           (buffer-substring (line-beginning-position)
                             (line-end-position))))
      (kill-new string)
      string)))

(defadvice remember (after sacha-tagline activate)
  "Add random tagline."
  (save-excursion
  (goto-char (point-max))
  (insert "\n\nRandom Emacs symbol: "
          (sacha/random-tagline "~/.taglines.random-emacs-symbols")
          "\n\n")))))
</pre>

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

<p>Random Emacs symbol: eshell-remove-entries - Function: From PATH, remove all of the given FILES, perhaps interactively.</p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/10/02/crazy-idea-for-emacs-random-emacs-taglines/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Emacs BBDB: Prioritize exact matches</title>
		<link>http://sachachua.com/wp/2006/09/29/emacs-bbdb-prioritize-exact-matches/</link>
		<comments>http://sachachua.com/wp/2006/09/29/emacs-bbdb-prioritize-exact-matches/#comments</comments>
		<pubDate>Fri, 29 Sep 2006 19:54:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
		
		<category><![CDATA[bbdb]]></category>

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

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

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

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

		<guid isPermaLink="false">http://sachachua.com/notebook/wiki/2006.09.29.php#anchor-8</guid>
		<description><![CDATA[<p>I often include people's names in my notes on other people, such as
when I'm tracking who introduced me to whom. The following code
modifies BBDB's behavior to put exact matches for name, company, or
network address above matches for notes.</p>

<pre class="example">
(defun sacha/bbdb (string elidep)
  "Display all entries in the BBDB matching the regexp STRING
in either the name(s), company, network address, or notes.
Prioritize non-note matches."
  (interactive
   (list (bbdb-search-prompt "Search records %m regexp: ")
         current-prefix-arg))
  (let* ((bbdb-display-layout (bbdb-grovel-elide-arg elidep))
         (notes (cons '* string))
         (records-top
          (bbdb-search (bbdb-records) string string string nil
                       nil))
         (records
          (bbdb-search (bbdb-records) string string string notes
                       nil))
         temp)
    (setq temp records-top)
    (while temp
      (setq records (delete (car temp) records))
      (setq temp (cdr temp)))
    (if (or records-top records)
        (bbdb-display-records (append
                               records-top
                               records))
      ;; we could use error here, but it's not really an error.
      (message "No records matching '%s'" string))))

(defalias 'bbdb 'sacha/bbdb)
</pre>

<p>On Technorati: <a href="http://www.technorati.com/tag/emacs" rel="tag">emacs</a>, <a href="http://www.technorati.com/tag/bbdb" rel="tag">bbdb</a>, <a href="http://www.technorati.com/tag/crm" rel="tag">crm</a>, <a href="http://www.technorati.com/tag/elisp" rel="tag">elisp</a>, <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I often include people's names in my notes on other people, such as
when I'm tracking who introduced me to whom. The following code
modifies BBDB's behavior to put exact matches for name, company, or
network address above matches for notes.</p>

<pre class="example">
(defun sacha/bbdb (string elidep)
  "Display all entries in the BBDB matching the regexp STRING
in either the name(s), company, network address, or notes.
Prioritize non-note matches."
  (interactive
   (list (bbdb-search-prompt "Search records %m regexp: ")
         current-prefix-arg))
  (let* ((bbdb-display-layout (bbdb-grovel-elide-arg elidep))
         (notes (cons '* string))
         (records-top
          (bbdb-search (bbdb-records) string string string nil
                       nil))
         (records
          (bbdb-search (bbdb-records) string string string notes
                       nil))
         temp)
    (setq temp records-top)
    (while temp
      (setq records (delete (car temp) records))
      (setq temp (cdr temp)))
    (if (or records-top records)
        (bbdb-display-records (append
                               records-top
                               records))
      ;; we could use error here, but it's not really an error.
      (message "No records matching '%s'" string))))

(defalias 'bbdb 'sacha/bbdb)
</pre>

<p>On Technorati: <a href="http://www.technorati.com/tag/emacs" rel="tag">emacs</a>, <a href="http://www.technorati.com/tag/bbdb" rel="tag">bbdb</a>, <a href="http://www.technorati.com/tag/crm" rel="tag">crm</a>, <a href="http://www.technorati.com/tag/elisp" rel="tag">elisp</a>, <a href="http://www.technorati.com/tag/pimpmyemacs" rel="tag">pimpmyemacs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2006/09/29/emacs-bbdb-prioritize-exact-matches/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
