<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rdf:RDF [
<!ENTITY % HTMLlat1 PUBLIC
 "-//W3C//ENTITIES Latin 1 for XHTML//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
]>
<rdf:RDF
 xmlns="http://purl.org/rss/1.0/"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:content="http://purl.org/rss/1.0/modules/content/"
 xmlns:admin="http://webns.net/mvcb/"
>
<channel rdf:about="http://tstotts.net/blog">
<title>tstotts dot net Weblog</title>
<link>http://tstotts.net/blog</link>
<description>jumbled items that fit nowhere else</description>
<dc:language>en-us</dc:language>
<dc:creator>timotheus</dc:creator>
<dc:date>2007-04-23T08:12:50-04:00</dc:date>
<admin:generatorAgent rdf:resource="http://nanoblogger.sourceforge.net" />
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://tstotts.net/blog/archives/2007/04/22/T11_48_08/" />
<rdf:li rdf:resource="http://tstotts.net/blog/archives/2007/01/02/T19_18_10/" />
<rdf:li rdf:resource="http://tstotts.net/blog/archives/2006/12/26/T22_26_15/" />
<rdf:li rdf:resource="http://tstotts.net/blog/archives/2006/12/01/T02_07_28/" />
<rdf:li rdf:resource="http://tstotts.net/blog/archives/2006/11/20/T00_23_09/" />
<rdf:li rdf:resource="http://tstotts.net/blog/archives/2006/11/18/T02_12_46/" />
<rdf:li rdf:resource="http://tstotts.net/blog/archives/2006/11/12/T17_47_44/" />
<rdf:li rdf:resource="http://tstotts.net/blog/archives/2006/11/06/T23_21_06/" />
<rdf:li rdf:resource="http://tstotts.net/blog/archives/2006/10/25/T17_08_46/" />
<rdf:li rdf:resource="http://tstotts.net/blog/archives/2006/09/09/T02_12_04/" />
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://tstotts.net/blog/archives/2007/04/22/T11_48_08/">
<link>http://tstotts.net/blog/archives/2007/04/22/T11_48_08/</link>
<title>blogkomm + nanoblogger, part 1</title>
<dc:date>2007-04-22T11:48:08-04:00</dc:date>
<dc:creator>timotheus</dc:creator>
<dc:subject>Software</dc:subject>
<description><![CDATA[<p>It appears that at least a few other web site developers are taking notice of
my custom integration of <a href="http://blogkomm.com/">blogkomm</a> and
<a href="http://nanoblogger.sourceforge.net/">nanoblogger</a>. This week I received
another email requesting information / assistance.</p>

<p>Not having the time nor will power to attempt to further document the internals
of my web site, I have opened a few source directories for public
access. Hopefully they may be of some use to others.</p>

<pre class="example"># nb --version
NanoBlogger 3.3 RC5
</pre>

<ul>
<li>NanoBlogger template directory:  <a href="http://tstotts.net/blog/templates/">…/templates/</a>.</li>
<li>NanoBlogger configuration:  <a href="http://tstotts.net/blog/blog.conf">…/blog.conf</a>.</li>
<li>Style sheets:  <a href="http://tstotts.net/css/">…/css/</a>.</li>
</ul>]]></description>
</item>
<item rdf:about="http://tstotts.net/blog/archives/2007/01/02/T19_18_10/">
<link>http://tstotts.net/blog/archives/2007/01/02/T19_18_10/</link>
<title>budgeting in Emacs</title>
<dc:date>2007-01-02T19:18:10-04:00</dc:date>
<dc:creator>timotheus</dc:creator>
<dc:subject>Software</dc:subject>
<description><![CDATA[<p>With the start of the new fiscal year, I have been devising a new personal
budget—hopefully one more suited to paying off college and expense
tracking. The ideal scenario would be an efficient method for budgeting on the
computer; something that takes as little time as pen and paper, but computes
balances, statistics, and graphs quickly.</p>

<p>Sadly, I believe that most personal finance software is as deserving
of my faith (in its reliability) as the old copy of <a href="http://en.wikipedia.org/wiki/Windows_98">Windows 98</a> hiding somewhere
in the closet. A quick look at a friend's current version of <a href="http://en.wikipedia.org/wiki/Quicken#Quicken">Quicken</a> is enough
to remind me that conventional consumer software—once considering bugs,
backups, and presentation—can often feel
more cumbersome than performing the same task with pen, paper, and
mental concentration…</p>

<p>About the same time I was trying to settle between using <a href="http://www.gnucash.org/">GNU Cash</a> and just
creating a checkbook-like spread sheet in Emacs `<a href="http://www.emacswiki.org/cgi-bin/wiki/SimpleEmacsSpreadsheet">ses-mode</a>', I happened upon a
command-line finance application that could actually meet the requirements of
speed, simplicity, data integrity, and statistical power. Appropriately named
`<a href="http://www.newartisans.com/ledger.html">ledger</a>', this seemingly modest application <a href="http://www.linux.com/article.pl?sid=06/11/06/2136209">performs everything</a> from checkbook
balancing and stocks to forecasting and detailed graphs; all with plain text and
the command-line, <a href="http://en.wikipedia.org/wiki/Regular_expressions">regular expressions</a> included. Thank you
<a href="http://www.newartisans.com/contact.html">John Wiegley</a> for providing the world with a first quality, well designed,
accounting program!</p>

<p>Now using `ledger' regularly, my only regret was losing the spread
sheet-like “feel” of rapidly entering data into columns. So I created
<a href="http://tstotts.net/pubvc.co/elisp-snippets/ledger-indent.el">ledger-indent.el</a>, a small Emacs library that supplements the current <a href="http://ledger.cvs.sourceforge.net/ledger/ledger/ledger.el">CVS version</a>
of <em>ledger.el</em> by providing some forced indentation, including a right-justified
unitary amount column. Using this code, writing tidy ledger entries is further
expedited by simple use of the <code>TAB</code> key.</p>

<p>The following files demonstrate some additional setup of `ledger' with Emacs,
including prevention for a tiny cache bug I found in `ledger':
<a href="http://tstotts.net/pubvc.co/profile/ledgerrc">…/ledgerrc</a>, <a href="http://tstotts.net/pubvc.co/profile/bin/ledger.sh">…/ledger.sh</a>, <a href="http://tstotts.net/pubvc.co/elisp-snippets/set-ledger.el">…/set-ledger.el</a>.</p>]]></description>
</item>
<item rdf:about="http://tstotts.net/blog/archives/2006/12/26/T22_26_15/">
<link>http://tstotts.net/blog/archives/2006/12/26/T22_26_15/</link>
<title>muse nanoblogger plugin</title>
<dc:date>2006-12-26T22:26:15-04:00</dc:date>
<dc:creator>timotheus</dc:creator>
<dc:subject>Software</dc:subject>
<description><![CDATA[<p>Today I wrote a small plugin to <a href="http://nanoblogger.sourceforge.net/">NanoBlogger</a> for publishing entries written in
<a href="http://www.emacswiki.org/cgi-bin/wiki/EmacsMuse">Emacs Muse</a> markup. Personally, I never found writing NanoBlogger entries with
<a href="http://daringfireball.net/projects/markdown/">Markdown</a> formatting any quicker that raw HTML; probably due to the lack of an
Emacs major mode for Markdown.</p>

<p>The plugin is only tested with Emacs 22.0.91 (cvs) and Muse 3.02.93, but should
work with all Emacs versions supported by Muse. The Emacs Muse plugin for
NanoBlogger is: <a href="http://tstotts.net/pubvc.co/bash-snippets/muse.sh">.../muse.sh</a>. You will need to read the comments and modify the
file accordingly. Two scripts must be created within the nanoblogger
installation directory, under plugins/.</p>

<p>For an example of a Muse-formatted blog entry, you can view the original data
file for this page: <a href="http://tstotts.net/blog/data/2006-12-26T22_26_15.txt">2006-12-26T22_26_15.txt</a>. To then default to using the muse
plugin in NanoBlogger, you can change your default authoring format in
blog.conf:</p>

<pre class="example">ENTRY_FORMAT=&quot;muse&quot;
ARTICLE_FORMAT=&quot;muse&quot;
</pre>

<p>To configure Emacs to automatically enable muse-mode for editing NB entries, use
something similar to the following lisp code:</p>

<pre class="example">(autoload 'muse-mode &quot;muse-autoloads&quot; nil t)
(add-to-list 'auto-mode-alist
             '(&quot;[0-9]*-[0-9]*-[0-9T]*_[0-9]*_[0-9]*\\.txt\\'&quot; . muse-mode))
</pre>]]></description>
</item>
<item rdf:about="http://tstotts.net/blog/archives/2006/12/01/T02_07_28/">
<link>http://tstotts.net/blog/archives/2006/12/01/T02_07_28/</link>
<title>enforcing low-latency SSH</title>
<dc:date>2006-12-01T02:07:28-04:00</dc:date>
<dc:creator>timotheus</dc:creator>
<dc:subject>Software</dc:subject>
<description><![CDATA[<p>It would not be obvious just from browsing a few pages, but the web
server that hosts this site actually functions as a remote
<a href="http://en.wikipedia.org/wiki/Headless">headless</a>
“<a href="http://en.wikipedia.org/wiki/Workstation">workstation</a>”
of sorts. I execute a variety of applications, from
<a href="http://en.wikipedia.org/wiki/Instant_messaging">instant messaging</a> to
<a href="http://en.wikipedia.org/wiki/Hardware_description_language">HDL simulations</a>
within a
<a href="http://en.wikipedia.org/wiki/GNU_Screen">GNU Screen</a>
session for many days at a time.</p>

<p>As <a href="http://tstotts.net/home/statistics.html">visits</a>
to this site increase each month, I have been observing my
<a href="http://en.wikipedia.org/wiki/Ssh">SSH</a>
<a href="http://en.wikipedia.org/wiki/Network_Latency">latency</a>
increasing to absurd levels, with
<a href="http://en.wikipedia.org/wiki/Round-trip_delay_time">RTT</a> reaching
into the minutes. I even experienced typing half of a document
page—and waiting in dire suspense of losing the paragraphs to the
Internet abyss.</p>

<p>The primary networking solution would be to configure
<a href="http://en.wikipedia.org/wiki/Traffic_shaping">traffic shaping</a>
in my Linux router—but most methods that I have tried in the past
involved a harry mixture of custom packet tagging and queuing without
much for high-level configuration. One example would be
<a href="http://lartc.org/howto/lartc.cookbook.ultimate-tc.html">ultimate-tc</a>
which never worked correctly for me without considerably reducing my
overall bandwidth.</p>

<p>Using <a href="http://www.shorewall.net/">shorewall</a>’s more high-level
configuration and some experimental networking measurements, I
determined an over-specified set of rules to give dedicated precedence
to SSH when competing with other traffic.</p>

<p>First, the available bandwidth of the external network interface is
significantly over-estimated to prevent the router from
ever limiting the network bandwidth.</p>

<pre><code>#/etc/shorewall/tcdevices
#INTERFACE   IN-BANDWITH  OUT-BANDWIDTH
 $NET_IF     10000kbit    500kbit
</code></pre>

<p>My actual bandwidth is somewhere near:</p>

<pre><code>#             7000kbit    400kbit
</code></pre>

<p>Second, high-frequency protocols are assigned
<a href="http://en.wikipedia.org/wiki/Type_of_Service">Type of Service</a>
(ToS)
tags to classify their desired network behavior. The catch-all source,
destination, and dual port forms are deliberate as I wish for
the rules to apply for any communication of a particular protocol,
regardless of client/server or lan/Internet relationships.</p>

<pre><code>#/etc/shorewall/tos
#SRC  DEST PROTO  SRC       DEST
          PORT      PORT      TOS

# max responsiveness (min latency)
 all  all  tcp    -         ssh       16
 all  all  tcp    ssh       -         16
 all  all  tcp    -         ssh-alt   16
 all  all  tcp    ssh-alt   -         16
 all  all  tcp    rsync     -         16
 all  all  tcp    -         rsync     16
 all  all  tcp    imaps     -         16
 all  all  tcp    -         imaps     16
# max reliability
 all  all  tcp    -         ftp       4
 all  all  tcp    ftp       -         4
 all  all  tcp    https     -         4
 all  all  tcp    -         https     4
# min cost / priority
 all  all  tcp    ftp-data  -         2
 all  all  tcp    -         ftp-data  2
 all  all  tcp    http      -         2
 all  all  tcp    -         http      2
</code></pre>

<p>In and of themselves, the ToS tags provide some noticeable network
improvements when SSH'ing from friends' computers connecting to the
same <a href="http://en.wikipedia.org/wiki/ISP">ISP</a>. I assume the only
explanation would be that my ISP's routers observe ToS to a
limited extent, which is helpful,
but not really adequate as I frequently connect across multiple ISP
networks.</p>

<p>Third, to enforce ToS internally, I specify the dedicated and capping
bandwidths for each ToS class,
<a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol#Header">TCP ACK</a>
packets, and any unclassified traffic (‘default’).
Shown previously, the download bandwidth was over-specified by a
larger ratio than was the upload bandwidth; this prevents any
limiting of the download bandwidth and loosens prioritization
while downloading, but more tightly enforces upload priorities.</p>

<pre><code>#/etc/shorewall/tcclasses
#INTERFACE  MARK  RATE      CEIL       PRIORITY  OPTIONS
 $NET_IF    1     full*2/3  full       1         tos=0x10/0x10
 $NET_IF    2     full/2    full       2         tos=0x04/0x04
 $NET_IF    3     full/4    full       3         tcp-ackn
 $NET_IF    4     full/5    full*8/10  4         default
 $NET_IF    5     full/10   full*6/10  5         tos=0x02/0x02
</code></pre>

<p>With these settings, download networking latency is slightly reduced
and bandwidth is unaffected. The upload latency, the original problem,
is drastically reduced. Upload bandwidth is rigidly prioritized
between protocols, and SSH will steal up to ~60% of the network
responsiveness and bandwidth from other protocols
automatically. And when there is no competition, each protocol is
still able to consume near 100% of the network upload bandwidth.</p>

<p>Now, quite happily, all of my remote sessions remain responsive,
regardless of the number of people
(or <a href="http://en.wikipedia.org/wiki/Internet_bot">bots</a>)
browsing site content; and without noticeably reducing any portion
of the network bandwidth.</p>]]></description>
</item>
<item rdf:about="http://tstotts.net/blog/archives/2006/11/20/T00_23_09/">
<link>http://tstotts.net/blog/archives/2006/11/20/T00_23_09/</link>
<title>rapid window toggle in emacs</title>
<dc:date>2006-11-20T00:23:09-04:00</dc:date>
<dc:creator>timotheus</dc:creator>
<dc:subject>Software</dc:subject>
<description><![CDATA[<p>Every so often I encounter an
<a href="http://en.wikipedia.org/wiki/Emacs">Emacs</a>
“quick reference” that lists the functionality of command
<tt>other-window</tt> (<tt>C-x o</tt>)
as toggling between two windows. In fact, this is incorrect as
Emacs only implements cyclical window navigation. There is no single
shortcut to toggle between two windows; only to cycle through a list
of windows. If there are more than two windows in an Emacs session (I
typically use four) then there is no simple reflexive key stroke
by which the user may
return to the previously visited window. To implement <em>real</em> window
toggling, identical to the <tt>other</tt> command in
<a href="http://en.wikipedia.org/wiki/GNU_Screen">GNU Screen</a>,
I use the following code:</p>

<pre><code>;; Redefines "C-x o" to behave like 'other-window' while also
;; remembering the previously selected window.
(defun other-window-history  (&amp;optional x)
  (interactive "P")
  (setq toggle-window-prev (selected-window))
  (if (equal x nil)
      (other-window '1)
    (other-window x)))
(global-set-key (kbd "C-x o") 'other-window-history)


;; By calling other-window-toggle, two windows can be rapidly switched
;; between with a single key sequence, definied below.
(defun other-window-toggle (&amp;optional x)
  (interactive "P")
  (if (not (boundp 'toggle-window-prev))
      (if (equal x nil)
          (other-window-history 1)
        (other-window-history x))
    (let ( (y toggle-window-prev) )
      (setq toggle-window-prev (selected-window))
      (if (equal toggle-window-prev y)
          (if (equal x nil)
              (other-window-history 1)
            (other-window-history x))
        (select-window y)))))
(global-set-key (kbd "C-x C-o") 'other-window-toggle)
(global-set-key (kbd "C-c C-o") 'other-window-toggle)
</code></pre>

<p>The source also available at:
<a href="http://tstotts.net/pubvc.co/elisp-snippets/conf-windows.el">conf-windows.el</a>.</p>

<p>Other elisp code snippets available at:
<a href="http://tstotts.net/pubvc.co/elisp-snippets/">…/elisp-snippets/</a>.</p>]]></description>
</item>
<item rdf:about="http://tstotts.net/blog/archives/2006/11/18/T02_12_46/">
<link>http://tstotts.net/blog/archives/2006/11/18/T02_12_46/</link>
<title>submitting MSIE to xhtml+xml</title>
<dc:date>2006-11-18T02:12:46-04:00</dc:date>
<dc:creator>timotheus</dc:creator>
<dc:subject>Software</dc:subject>
<description><![CDATA[<p>Being somewhat of a standards nut, I have been frustrated by the fact
that
<a href="http://en.wikipedia.org/wiki/Internet_Explorer">Internet Explorer</a>
6 and 7 are the <em>only</em> browsers to incorrectly render my documents and
gracelessly handle the <tt>application/xhtml+xml</tt>
<a href="http://en.wikipedia.org/wiki/MIME">MIME</a> type—despite most other
softwares having adequately supported them for years.
On my server it is necessary to perform the following tricks to
maintain standards compliance while also supporting IE.</p>

<p>First, every document contains a pair of
<a href="http://www.quirksmode.org/css/condcom.html">conditional comments</a>
to instruct Internet Explorer to load non-standard style sheets.
This “invalid” styling provides compensating formating to
“correct” IE's rendering blemishes. As these issues are similar in
quantity, yet different, between IE versions 6 and 7, a style sheet is
needed for each version.</p>

<pre><code>&lt;!--[if lte IE 6]&gt;&lt;style type="text/css" media="all"&gt;
@import "/css/invalid_ie6.css";
&lt;/style&gt;&lt;![endif]--&gt;

&lt;!--[if gte IE 7]&gt;&lt;style type="text/css" media="all"&gt;
@import "/css/invalid_ie7.css";
&lt;/style&gt;&lt;![endif]--&gt;
</code></pre>

<p>Second, I duplicate each static
<a href="http://en.wikipedia.org/wiki/Xhtml">XHTML</a>
1.1 page and rewrite its
<a href="http://en.wikipedia.org/wiki/Doctype">DOCTYPE</a>
as XHTML 1.0. On my site I use the extension .html for files
have that have XHTML 1.1 doctypes and .htm for files that have older
doctypes.</p>

<pre><code>sed 's!DTD XHTML 1.1!DTD XHTML 1.0 Strict!'$'\n'\
's!TR/xhtml11/DTD/xhtml11.dtd!xhtml1/DTD/xhtml1-strict.dtd!'$'\n'\
's![&lt;][?]xml .*[?][&gt;]!!' \
file.html &gt; file.htm
</code></pre>

<p>Third, to force IE to use the .htm documents, I configure
<a href="http://en.wikipedia.org/wiki/Apache_HTTP_Server">Apache's</a>
<em><a href="http://en.wikipedia.org/wiki/Rewrite_engine">mod_rewrite</a></em>
to redirect IE browsers to the equivalent .htm
document of each page. This rewriting applies to all static content,
which is every page not found within the Blog at
<a href="http://en.wikipedia.org/wiki/Uniform_Resource_Identifier">URI</a>
/blog/.</p>

<pre><code># set file extensions I like to the MIME types appropriate to their
# doctype content (as per the W3C specs), XHTML 1.0 serving as
# traditional HTML and XHTML 1.1 serving as XML.
AddType text/html .htm
AddType application/xhtml+xml .html

# Force all versions of MSIE, and only MSIE, to use the web pages with
# older doctypes. No other popular browsers seem to require this.
Options +FollowSymlinks
RewriteEngine on
RewriteOptions inherit
RewriteBase /

RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml
RewriteCond %{HTTP_USER_AGENT} MSIE\ [123456789]
RewriteCond %{REQUEST_URI} !^.{0,30}/blog/{0,70}$
RewriteRule ^(.{0,100})/$ $1/index.htm [R]

RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml
RewriteCond %{HTTP_USER_AGENT} MSIE\ [123456789]
RewriteRule ^(.{1,100})\.html$ $1.htm [R]

RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml
RewriteCond %{HTTP_USER_AGENT} MSIE\ [123456789]
RewriteRule ^$ /index.htm [R]
</code></pre>

<p>Fourth, I perform a combination of the above DOCTYPE and MIME
adjustments with the following
<a href="http://en.wikipedia.org/wiki/Php">PHP</a>
code. This only applies to the
PHP-enabled pages with extension .phtml—mainly the Blog pages which
already use PHP for the commenting system.</p>

<pre><code>&lt;?php
$serv = isset($_SERVER["HTTP_ACCEPT"]) and isset($_SERVER["HTTP_USER_AGENT"]);
$cond0 = strlen( stristr($_SERVER["HTTP_USER_AGENT"], "MSIE ") ) &gt; 0;
$cond1 = (! stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml"));

if ( $serv and $cond0 and $cond1 ) {
  header("Content-type: text/html; charset=UTF-8");
  echo '&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
   . '"http://www.w3.org/xhtml1/DTD/xhtml1-strict.dtd"&gt;';
 }  else {
  header("Content-type: application/xhtml+xml");
  echo '&lt;?xml version="1.0" encoding="utf-8"?&gt;';
  echo '&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"'
   . '"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;';
 }
?&gt;
</code></pre>

<p>It is quite unfortunate that all of this is needed just to support
Internet Explorer. Were I only concerned with standards-compliant
browsers such as
<a href="http://en.wikipedia.org/wiki/Firefox">Firefox</a>,
Safari, and Opera, I could have skipped the above and simply
added this one line in Apache's configuration:</p>

<pre><code>AddType application/xhtml+xml .html
</code></pre>]]></description>
</item>
<item rdf:about="http://tstotts.net/blog/archives/2006/11/12/T17_47_44/">
<link>http://tstotts.net/blog/archives/2006/11/12/T17_47_44/</link>
<title>blog commenting support</title>
<dc:date>2006-11-12T17:47:44-04:00</dc:date>
<dc:creator>timotheus</dc:creator>
<dc:subject>Site News, Software</dc:subject>
<description><![CDATA[<p>Working commenting support has at last been added to the
<a href="http://tstotts.net/blog/">blog</a>.</p>

<p>For the curious, the minimalistic PHP software used to facilitate the
commenting is <a href="http://blogkomm.com/">blogkomm</a> with some significant
modifications, including support for valid
<a href="http://en.wikipedia.org/wiki/Xhtml#XHTML_1.1">XHTML 1.1</a>.</p>]]></description>
</item>
<item rdf:about="http://tstotts.net/blog/archives/2006/11/06/T23_21_06/">
<link>http://tstotts.net/blog/archives/2006/11/06/T23_21_06/</link>
<title>emacs -nw “smart” punctuation…</title>
<dc:date>2006-11-06T23:21:06-04:00</dc:date>
<dc:creator>timotheus</dc:creator>
<dc:subject>Software</dc:subject>
<description><![CDATA[<p>Not many days ago I asked a few
<a href="http://en.wikipedia.org/wiki/Emacs">Emacs</a>
developers on
<a href="irc://irc.freenode.net:6667/emacs">#emacs</a>
how I might easily type characters from the
General Punctuation Unicode block within console
Emacs. To my surprise, the best answers I received were to
copy-and-paste from a
<a href="http://en.wikipedia.org/wiki/Gtk">GTK</a>
application,
or insert the characters by
<a href="http://en.wikipedia.org/wiki/Unicode#Input_methods">ISO 14755</a>/<a href="http://en.wikipedia.org/wiki/Universal_Character_Set">UCS</a>
hex code entry.</p>

<p>Fortunately, <a href="http://nwalsh.com/emacs/xmlchars/">xmlunicode</a>
provides a variety of Unicode entry methods that do not require
numeric memorizations. With some quick coding, I bound the interactive
input methods to familiar key strokes—similar to those used by
<em>Unibyte Editing</em>. A minor mode is used to toggle
automatic “word processing”-style punctuation, including smart quotes,
ellipses, and em/en dashes.</p>

<p>My binding code in all of its simplicity:</p>

<pre><code>(autoload 'unicode-character-insert "xmlunicode" "" t)
(autoload 'unicode-character-shortcut-insert "xmlunicode" "" t)
(autoload 'iso8879-character-insert "xmlunicode" "" t)

(global-set-key (kbd "C-x 9") 'unicode-character-shortcut-insert)
(global-set-key (kbd "C-x 7") 'iso8879-character-insert)
(global-set-key (kbd "C-c 9") 'unicode-character-insert)
(global-set-key (kbd "C-c 7") 'smart-chars-mode)

(define-minor-mode smart-chars-mode
  "Toggle SmartChars unicode punctuation mode." nil " SmartChars"
  '(("\'" . unicode-smart-single-quote)
    ("\"" . unicode-smart-double-quote)
    ("\;" . unicode-smart-semicolon)
    ("\-" . unicode-smart-hyphen)
    ("\." . unicode-smart-period))
  (if (not (commandp 'unicode-smart-period)) (load "xmlunicode")))
</code></pre>

<p>The source also available at:
<a href="http://tstotts.net/pubvc.co/elisp-snippets/smartchars.el">smartchars.el</a>.</p>

<p>Other elisp code snippets available at:
<a href="http://tstotts.net/pubvc.co/elisp-snippets/">…/elisp-snippets/</a>.</p>]]></description>
</item>
<item rdf:about="http://tstotts.net/blog/archives/2006/10/25/T17_08_46/">
<link>http://tstotts.net/blog/archives/2006/10/25/T17_08_46/</link>
<title>/bible verse quoting in IRC</title>
<dc:date>2006-10-25T17:08:46-04:00</dc:date>
<dc:creator>timotheus</dc:creator>
<dc:subject>Software</dc:subject>
<description><![CDATA[<p>Today I completed a simple set of
<a href="http://en.wikipedia.org/wiki/Python_%28programming_language%29">Python</a>
scripts to facilitate bible verse and book quoting within my
<a href="http://weechat.flashtux.org/">IRC client</a>.</p>

<p>The syntax is quite simple:</p>

<pre><code>[p]  /bible  [option] &lt;query&gt;

Running diatheke lookups in WeeChat

       -c :  print output to channel, instead of local
  -n nick :  print output to channel, preceeded with nick
       -r :  repeat last query to channel (no new query)
  -r nick :  repeat last query to channel, preceded with nick
nick&lt;:|,&gt; :  print output to channel, preceded with nick     
  &lt;query&gt; :  JD BibleBot line, use 'help' to see what is available
</code></pre>

<p>More information and the code may be found at:
<a href="http://tstotts.net/pubvc.co/weechat-plugins/diatheke4IRC/">…/diatheke4IRC/</a>.</p>]]></description>
</item>
<item rdf:about="http://tstotts.net/blog/archives/2006/09/09/T02_12_04/">
<link>http://tstotts.net/blog/archives/2006/09/09/T02_12_04/</link>
<title>bible bot duo</title>
<dc:date>2006-09-09T02:12:04-04:00</dc:date>
<dc:creator>timotheus</dc:creator>
<dc:subject>Site News</dc:subject>
<description><![CDATA[<p>The
<a href="http://www.jabber.org/">Jabber</a>/<a href="http://www.google.com/talk/">Google Talk</a>
instant messaging
<a href="http://biblebot.jabberstudio.org/">bible robot</a>
is now available at two addresses:
<a href="xmpp:bible@tstotts.us?message">bible@tstotts.net</a>,
<a href="xmpp:bible@tstotts.us?message">bible@tstotts.us</a>.</p>]]></description>
</item>
</rdf:RDF>
