<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Inasmuch as... &#187; Emacs</title>
	<atom:link href="http://inasmuch.as/category/emacs/feed/" rel="self" type="application/rss+xml" />
	<link>http://inasmuch.as</link>
	<description>...Life&#039;s but a walking shadow</description>
	<lastBuildDate>Sun, 13 May 2012 18:35:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Getting started with Wisent</title>
		<link>http://inasmuch.as/2012/04/25/getting-started-with-wisent/</link>
		<comments>http://inasmuch.as/2012/04/25/getting-started-with-wisent/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 22:28:29 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1357</guid>
		<description><![CDATA[Inasmuch as I&#8217;d wanted for a long time to have an excuse to write an Emacs mode that uses a Semantic Wisent parser, I recently started writing a new mode for RELAX NG compact syntax files. The mode-in-progress is available &#8230; <a href="http://inasmuch.as/2012/04/25/getting-started-with-wisent/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> I&#8217;d wanted for a long time to have an excuse to write an Emacs mode that uses a <a title="Adding a new language to Semantic (or vice-versa)" href="http://cedet.sourceforge.net/addlang.shtml">Semantic Wisent parser</a>, I recently started writing a new mode for <a title="RELAX NG home page" href="http://www.relaxng.org/">RELAX NG</a> compact syntax files. The mode-in-progress is available on GitHub at <a title="nrnc-mode on GitHub" href="https://github.com/tkg/nrnc.git">https://github.com/tkg/nrnc.git</a>, and here&#8217;s my thoughts so far on using Wisent:<span id="more-1357"></span></p>
<ul>
<li><strong>Start from the examples in the documentation</strong> – My first attempt at a top-level production was incorrect and failed to match anything, so nothing matched. I eventually resorted to reusing the entire <code>wisent-graphviz-dot-mode</code> parsing code with one added production for RELAX NG compact syntax <code>namespace</code> declarations and built it up from there until I&#8217;d sufficiently got the hang of the productions to remove the remaining <code>wisent-graphviz-dot-mode</code> training wheels and go it alone.</li>
<li><strong>Make sure your syntax table is correct</strong> – The mode was initially based on <a title="rnc-mode download page" href="http://www.pantor.com/download.html"><code>rnc-mode</code></a> by David Rosenberg of Pantor Engineering AB and used the syntax table defined in it. At one point when things weren&#8217;t working, I remembered that the <code>wisent-graphviz-dot-mode</code> code that I&#8217;d been using as an example included a comment about needing to modify the syntax table of <code>graphviz-dot-mode</code>. Sure enough, <code>rnc-mode</code> was missing a syntax-table entry that was needed for Semantic parsing of <code>.rnc</code> files. And just today I had to set the &#8220;<code>?</code>&#8221; character as a symbol character to get one more part working properly.</li>
<li><strong>Use the debug functions</strong> – Forgive me for restating the very, very obvious, but you will find these useful. For example, `<code>semantic-show-unmatched-syntax-mode</code>&#8216; is useful, though initially disheartening, for showing which parts of the file are not being matched by displaying a red line under the unmatched parts. Occasionally, you may also note the absence of the red line under parts that you don&#8217;t expect to be matched yet.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2012/04/25/getting-started-with-wisent/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flymake for RELAX NG compact syntax</title>
		<link>http://inasmuch.as/2012/02/22/flymake-for-relax-ng-compact-syntax/</link>
		<comments>http://inasmuch.as/2012/02/22/flymake-for-relax-ng-compact-syntax/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 13:11:27 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[RELAX NG]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1285</guid>
		<description><![CDATA[Inasmuch as the Wisent parsing and other CEDET/Speedbar/Semantic goodness for RELAX NG compact syntax files that I&#8217;m currently working on may not be ready for prime time for a while, here&#8217;s something to add to your .emacs so `flymake' runs &#8230; <a href="http://inasmuch.as/2012/02/22/flymake-for-relax-ng-compact-syntax/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> the Wisent parsing and other CEDET/Speedbar/Semantic goodness for RELAX NG compact syntax files that I&#8217;m currently working on may not be ready for prime time for a while, here&#8217;s something to add to your <code>.emacs</code> so <code>`flymake'</code> runs Jing in the background to find syntax errors in your RELAX NG compact syntax files:</p>
<pre>(require 'flymake)
(defun flymake-rnc-init ()
  (let* ((temp-file (flymake-init-create-temp-buffer-copy
		     'flymake-create-temp-inplace))
     	 (local-file (file-relative-name
		      temp-file
		      (file-name-directory buffer-file-name))))
    (list "jing" (list "-c" local-file))))
(add-to-list 'flymake-allowed-file-name-masks
      '(".+\\.rnc$"
	flymake-rnc-init
	flymake-simple-cleanup
	flymake-get-real-file-name))
(add-hook 'rnc-mode-hook
	  'flymake-mode)</pre>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2012/02/22/flymake-for-relax-ng-compact-syntax/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>imenu-generic-expression</title>
		<link>http://inasmuch.as/2012/01/13/imenu-generic-expression/</link>
		<comments>http://inasmuch.as/2012/01/13/imenu-generic-expression/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 11:27:30 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[RELAX NG]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1207</guid>
		<description><![CDATA[Inasmuch as `imenu-generic-expression` makes using Emacs&#8217; &#8220;Imenu&#8221; simpler, it&#8217;s this triennial&#8217;s &#8220;Obscure Emacs variable of the week&#8220;. Emacs&#8217; &#8220;Imenu&#8221; feature puts in the menu-bar a menu whose each menu item (or sub-menu item) jumps you to a location in the &#8230; <a href="http://inasmuch.as/2012/01/13/imenu-generic-expression/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> <code>`imenu-generic-expression`</code> makes using Emacs&#8217; &#8220;Imenu&#8221; simpler, it&#8217;s this triennial&#8217;s &#8220;<a title="Obscure Emacs variable of the week" href="http://inasmuch.as/2009/02/06/obscure-emacs-variable-of-the-week/">Obscure Emacs variable of the week</a>&#8220;.<br />
<span id="more-1207"></span></p>
<p>Emacs&#8217; &#8220;Imenu&#8221; feature puts in the menu-bar a menu whose each menu item (or sub-menu item) jumps you to a location in the current buffer.  Emacs being Emacs, Imenu is highly configurable, and quite often an Emacs mode will set up the Imenu menu to point to locations in the buffer that are significant for that mode/file-type.  For example, my <a href="https://sourceforge.net/apps/trac/xslide/wiki/WikiStart" title="'xslide' XSL mode for Emacs at SourceForge">xslide</a> and <a href="http://www.menteith.com/wiki/tdtd" title="'tdtd' Emacs mode for DTDs">tdtd</a> modes each set up very different Imenu menus.</p>
<p><code>`imenu-generic-expression`</code> is a variable that, at its simplest, contains a list of three-item lists that each specify a menu title, a regular expression, and the number corresponding to the subexpression of the regular expression to use as the resulting menu item&#8217;s name.  When <code>`imenu-generic-expression`</code> is set and the Imenu menu bar item is enabled (using <code>`imenu-add-to-menubar`</code>, naturally), Emacs constructs a buffer index by searching the buffer using each of the regular expressions in turn and then builds up the menu based on the matches found.</p>
<p>For example, here&#8217;s the <code>`rnc-mode-hook'</code> that I use to add a &#8220;RNC&#8221; menu when using <code>`rnc-mode'</code> to edit RELAX NG compact syntax (RNC) files.  The hook sets <code>`imenu-generic-expression`</code> with patterns that match significant declarations in a RNC file (with separate sub-menus for <code>include</code>, <code>namespace</code>, and <code>datatypes</code> declaration types) then enables Imenu with <code>`imenu-add-to-menubar`</code>.  A screenshot of the resulting menu is action is shown after the code.</p>
<pre>(require 'rnc-mode)
(add-hook 'rnc-mode-hook
 (lambda ()
   (set-variable
    'imenu-generic-expression
    (list
     (list
      nil
      "^\\([a-zA-Z][-a-zA-Z0-9._]*\\)\\s-*[&amp;|]?=" 1)
     (list
      "include"
      "^include\\s-+['\"]\\([a-zA-Z][-a-zA-Z0-9._]*\\)['\"]" 1)
     (list
      "namespace"
      "^\\(default\\s-+\\)?namespace\\s-+\\([a-zA-Z][-a-zA-Z0-9._]*\\)\\s-*=" 2)
     (list
      "dataypes"
      "^datatypes\\s-+\\([a-zA-Z][-a-zA-Z0-9._]*\\)\\s-*=" 1)))
   (imenu-add-to-menubar "RNC")))
</pre>
<p><a href="http://inasmuch.as/wp-content/uploads/2012/01/imenu-generic-expression.png"><img src="http://inasmuch.as/wp-content/uploads/2012/01/imenu-generic-expression.png" alt="" title="&#039;RNC&#039; Imenu menu" width="765" height="705" class="aligncenter size-full wp-image-1217" /></a></p>
<p>The only downside to using <code>`imenu-add-to-menubar`</code> compared to doing more of it yourself is that <code>`imenu-add-to-menubar`</code> doesn&#8217;t provide a way to sort the menu items, so the order of the matches in the file is the order of the items in the menu or sub-menu.  I wrote both xslide and tdtd before I knew of <code>`imenu-add-to-menubar`</code>, but the recently revived <a href="http://inasmuch.as/2011/10/21/xslide-alive/" title="xslide alive!">xslide for XSLT 2.0</a> still uses a custom function to make the Imenu index because I also like to sort the index entries alphabetically within each menu or sub-menu.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2012/01/13/imenu-generic-expression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xslide alive!</title>
		<link>http://inasmuch.as/2011/10/21/xslide-alive/</link>
		<comments>http://inasmuch.as/2011/10/21/xslide-alive/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 10:08:07 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[XSL]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=1035</guid>
		<description><![CDATA[Inasmuch as you, like me, may have missed xslide&#8217;s &#8220;Template&#8221; menu when editing XSLT using Emacs&#8217; nXML-mode, I&#8217;ve made available my &#8220;xslide2&#8243; XSLT mode for Emacs that I&#8217;ve been using for a while.  This new xslide is a derived mode &#8230; <a href="http://inasmuch.as/2011/10/21/xslide-alive/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> you, like me, may have missed xslide&#8217;s &#8220;Template&#8221; menu when editing XSLT using Emacs&#8217; nXML-mode, I&#8217;ve made available my &#8220;xslide2&#8243; XSLT mode for Emacs that I&#8217;ve been using for a while.  This new xslide is a derived mode that uses nXML-mode for nearly everything and adds back some of the XSLT-specific parts of xslide.</p>
<p>Future development is happening on the Trac and Subversion for the xslide SourceForge project.  See <a title="xslide Trac at SourceForge" href="https://sourceforge.net/apps/trac/xslide/wiki/WikiStart">https://sourceforge.net/apps/trac/xslide/wiki/WikiStart</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2011/10/21/xslide-alive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X11 connection rejected because of wrong authentication</title>
		<link>http://inasmuch.as/2011/07/11/x11-connection-rejected/</link>
		<comments>http://inasmuch.as/2011/07/11/x11-connection-rejected/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 16:36:21 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=755</guid>
		<description><![CDATA[Inasmuch as using a frame from Emacs running on the laptop on the larger screen of the desktop machine using `make-frame-on-display' is one of life&#8217;s pleasures, it was less than a pleasure when it stopped working with a &#8220;ï»¿X11 connection &#8230; <a href="http://inasmuch.as/2011/07/11/x11-connection-rejected/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> using a frame from Emacs running on the laptop on the larger screen of the desktop machine using <code>`make-frame-on-display'</code> is one of life&#8217;s pleasures, it was less than a pleasure when it stopped working with a &#8220;ï»¿X11 connection rejected because of wrong authentication&#8221; message after an upgrade of one of the machines.</p>
<p>Several upgrades and much thrashing later, the solution by Gregory Grubbs at <a href="http://gregorygrubbs.com/development/get-remote-x-working-in-karmic/">http://gregorygrubbs.com/development/get-remote-x-working-in-karmic/</a> works for me, and the script in the fifth comment by Ben Hyde for running emacsclient makes things even easier than I was used to.<span id="more-755"></span></p>
<p>My usual technique was to &#8220;<code>ssh -X laptop</code>&#8221; from the desktop machine to the laptop and then run <code>`make-frame-on-display'</code> in the Emacs running on the laptop so I can check mail on the bigger screen, but it works (or worked) equally well the other way when I want to, say, take my development environment, open buffers and all, away from my desk.</p>
<p>When you use X11 forwarding with ssh (either by using the <code>-X</code> or <code>-Y</code> option or setting <code>ForwardX11</code> to <code>"yes</code>&#8220;), the connection to the local (desktop) X11 display is forwarded to the remote (laptop) side, but ssh creates a &#8220;proxy&#8221; X server on the remote machine and sets up Xauthority data in <code>~/.Xauthority</code> with a random authorization cookie.  The shell on the remote machine started by ssh sees the proxy X11 display as, e.g., <code>localhost:10</code>. In the already-running Emacs on the laptop, <code>M-x make-frame-on-display ret localhost:10 ret</code> gets Emacs to use the proxy X11 display to put a frame on the desktop machine.  At least that&#8217;s how it used to work.</p>
<p>The problem is that recent Ubuntu/Xubuntu releases, probably for your own good, use separate Xauthority data for each login.  The laptop&#8217;s local login has its Xauthority in <code>/var/run/gdm/auth-for-<em>login</em>-<em>random</em>/database</code> (where &#8220;<em>login</em>&#8221; is your login name and &#8220;<em>random</em>&#8221; is a random string), with <code>XAUTHORITY</code> set to point to it.  The ssh login, however, still uses (and modifies) <code>~/.Xauthority</code>.</p>
<p>The workaround, or the driving of a truck straight through the security measures, is to merge the Xauthority data added by the ssh login with the Xauthority data seen by the laptop console login. My brute-strength-and-ignorance approach was a straight merge: from a shell on the laptop (remote) machine, run &#8220;<code>xauth merge ~/.Xauthority</code>&#8220;.</p>
<p>The script by Gregory Grubb is rather more subtle since it doesn&#8217;t jigger with the Xauthority data for the local display, only for displays not ending in <code>:0</code>, and the script in the comment by Ben Hyde takes that one step further by using <code>emacsclient</code> to do the merge, so you can do it all from the shell from the ssh login, so you don&#8217;t need physical access to the laptop (remote) machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2011/07/11/x11-connection-rejected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting RNG to RNC</title>
		<link>http://inasmuch.as/2011/06/24/converting-rng-to-rnc/</link>
		<comments>http://inasmuch.as/2011/06/24/converting-rng-to-rnc/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 22:51:54 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=739</guid>
		<description><![CDATA[Inasmuch as the customised version of the &#8220;xmlspec&#8221; schema being used for the next version of the XSL spec is maintained in RELAX NG XML syntax (RNG) and Emacs&#8217;s nXML-mode only uses RELAX NG compact syntax (RNC), I yet again &#8230; <a href="http://inasmuch.as/2011/06/24/converting-rng-to-rnc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> the customised version of the &#8220;xmlspec&#8221; schema being used for the next version of the XSL spec is maintained in <a title="MURATA Makoto's RELAX NG page." href="http://relaxng.org/">RELAX NG</a> XML syntax (RNG) and Emacs&#8217;s <a title="'nxml-mode' at emacswiki.org." href="http://www.emacswiki.org/emacs/NxmlMode">nXML-mode</a> only uses RELAX NG compact syntax (RNC), I yet again wanted to convert a schema from RNG to RNC.Â  As you would expect, there&#8217;s more than one way to do it.<span id="more-739"></span></p>
<p>The classic way is using James Clark&#8217;s utility.Â  This involves: (a) working out if you need <a title="Jing and Trang at Google Project Hosting." href="http://code.google.com/p/jing-trang/">&#8220;Jing&#8221; or &#8220;Trang&#8221;</a> (you need Trang); (b) getting the .jar or the executable; and (c) running it.Â  Fairly simple, though it&#8217;s a pain that although it&#8217;s bundled with Ubuntu, etc., it&#8217;s not installed by default.Â  I backup my data between OS re-installs (who doesn&#8217;t?) but not the OS-installed programs, so when I need it on a new machine or after a re-install, I, at least, have to go through the Jing/Trang confusion and then fire up the package manager to install it.</p>
<p>I wanted an alternative, but writing a RNG schema loader function for nxml-mode isn&#8217;t the work of an afternoon (interesting as it would be to bootstrap it using nxml-mode&#8217;s tokenizing of the RNG XML), so I found David Rosenborg&#8217;s &#8220;RNG to RNC Converter&#8221; (<a title="RNG to RNC converter download page." href="http://www.pantor.com/download.html">http://www.pantor.com/download.html</a>).Â  The current version works with XSLT 1.0 but not XSLT 2.0 (because it expects the XSLT processor to have a <code>node-set()</code> furnction), but you can add the following to <code>RngToRncProcessorConfig.xsl</code> so the XSLT works with both XSLT 1.0 and XSLT 2.0:</p>
<pre>&lt;!-- XSLT 2.0 or later. --&gt;
&lt;xsl:when test="system-property('xsl:version') &gt;= 2"&gt;
  &lt;xsl:variable name="body"&gt;
    &lt;xsl:for-each select="$schema"&gt;
      &lt;xsl:call-template name="make-body"/&gt;
    &lt;/xsl:for-each&gt;
  &lt;/xsl:variable&gt;
  &lt;xsl:sequence select="$body"/&gt;
&lt;/xsl:when&gt;
</pre>
<p>My only other quibble with the stylesheet is that it doesn&#8217;t preserve comments that are in the RNG (more straightforward to do in XSLT 2.0 than XSLT 1.0, I admit).</p>
<p>I don&#8217;t yet know if I&#8217;ll stick to using RNG to RNC Converter in preference to Trang.Â  The XSLT is easier to keep with the other stuff that I backup between installs or keep in the Subversion repository for machine configurations, but Trang is easier to use once it is installed and on your path.Â  The best thing is that now I have the choice of more than one way to do it.</p>
<p>For a more complete list of ways to do it that is maintained by MURATA Makoto, see <a title="Converters list at relaxng.org." href="http://relaxng.org/#conversion">http://relaxng.org/#conversion</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2011/06/24/converting-rng-to-rnc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xml-model processing instruction with nXML mode</title>
		<link>http://inasmuch.as/2011/05/25/xml-model-with-nxml-mode/</link>
		<comments>http://inasmuch.as/2011/05/25/xml-model-with-nxml-mode/#comments</comments>
		<pubDate>Wed, 25 May 2011 19:07:21 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=720</guid>
		<description><![CDATA[Inasmuch as the &#60;?xml-model?&#62; processing instruction (jointly developed by W3C and ISO/IEC JTC1/SC34) is the new, standard way to associate schemas with XML documents and I already had code for using a similar, oXygen-specific PI, it was easy to make &#8230; <a href="http://inasmuch.as/2011/05/25/xml-model-with-nxml-mode/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> the <a title="xml-model Working Group Note" href="http://www.w3.org/TR/xml-model/"><code>&lt;?xml-model?&gt;</code></a> processing instruction (jointly developed by W3C and ISO/IEC JTC1/SC34) is the new, standard way to associate schemas with XML documents and I already had code for using a similar, oXygen-specific PI, it was easy to make a hook function to put in your .emacs file so nXML mode will use <code>&lt;?xml-model?&gt;</code> to find a RNC schema:<span id="more-720"></span></p>
<pre>(defun use-xml-model ()
  "Hook function for `nxml-mode' to use  PI for locating a
RNC schema."
  (interactive)
  (save-excursion
    (goto-char (point-min))
    (if (search-forward "" nil t)
                           (match-beginning 0)))
                 (filename (save-excursion
                             (re-search-forward "href=\"\\([^\"]+\.rnc\\)\""
                                                pi-end t)
                             (match-string 1))))
;;            (message "pi-end: %d; filename: %s
;;                     pi-end filename)
            (if (and filename (file-readable-p filename))
                (rng-set-schema-file filename)))))))

(add-hook 'nxml-mode-hook
          'use-xml-model)</pre>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2011/05/25/xml-model-with-nxml-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opening EPUB in Emacs</title>
		<link>http://inasmuch.as/2011/04/06/opening-epub-in-emacs/</link>
		<comments>http://inasmuch.as/2011/04/06/opening-epub-in-emacs/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 09:03:14 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[EPUB]]></category>

		<guid isPermaLink="false">http://inasmuch.as/?p=713</guid>
		<description><![CDATA[Inasmuch as there&#8217;s not, yet, an EPUB reader for Emacs, you can still set up Emacs to be able to open .epub files to see what&#8217;s inside them, since they are, after all, just ZIP files: (setq auto-mode-alist (append (list &#8230; <a href="http://inasmuch.as/2011/04/06/opening-epub-in-emacs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="font-variant: small-caps;">Inasmuch as</span> there&#8217;s not, yet, an EPUB reader for Emacs, you can still set up Emacs to be able to open <code>.epub</code> files to see what&#8217;s inside them, since they are, after all, just ZIP files:</p>
<pre>(setq auto-mode-alist
 (append
 (list
 '("\\.epub$" . archive-mode))
 auto-mode-alist))
(setq auto-coding-alist
 (append
 (list
 '("\\.epub$" . no-conversion))
 auto-coding-alist))</pre>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2011/04/06/opening-epub-in-emacs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Obscure Emacs variable of the week</title>
		<link>http://inasmuch.as/2009/02/06/obscure-emacs-variable-of-the-week/</link>
		<comments>http://inasmuch.as/2009/02/06/obscure-emacs-variable-of-the-week/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 13:12:12 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://tkg.menteith.com/2009/02/06/obscure-emacs-variable-of-the-week/</guid>
		<description><![CDATA[`fancy-splash-image&#8217; points to the image to show when Emacs starts up.  I can think of only two groups who&#8217;d need this: the Emacs maintainers and the XEmacs maintainers who&#8217;d set it to their respective logos.  So naturally I customized mine: &#8230; <a href="http://inasmuch.as/2009/02/06/obscure-emacs-variable-of-the-week/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>`fancy-splash-image&#8217; points to the image to show when Emacs starts up.  I can think of only two groups who&#8217;d need this: the Emacs maintainers and the XEmacs maintainers who&#8217;d set it to their respective logos.  So naturally I customized mine:</p>
<p><img src="http://tkg.menteith.com/wp-content/uploads/2009/02/menteith-splash.png" alt="Menteith Consulting logo as Emacs splash image" /><span id="more-143"></span></p>
<p>Along the way, I found an interesting history of the <a title="The Design of the Emacs Logo" href="http://www.ee.ryerson.ca/~elf/emacs/logo/index.html">design of the Emacs logo</a>.</p>
<p>At one a week, there&#8217;s probably several years&#8217; worth in the index of the Emacs Lisp manual, but I&#8217;m really not planning on doing this every week: this just seemed like a catchy title for a one-off post.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2009/02/06/obscure-emacs-variable-of-the-week/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linking to Trac tickets in email</title>
		<link>http://inasmuch.as/2008/02/12/linking-to-trac-tickets-in-email/</link>
		<comments>http://inasmuch.as/2008/02/12/linking-to-trac-tickets-in-email/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 19:57:52 +0000</pubDate>
		<dc:creator>tkg</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://tkg.menteith.com/2008/02/12/linking-to-trac-tickets-in-email/</guid>
		<description><![CDATA[Since I do a lot of referring to Trac ticket numbers in email messages, most visibly on the xmlroff-list mailing list, I wrote an Emacs function that finds the Trac ticket references in the current buffer and inserts a sorted &#8230; <a href="http://inasmuch.as/2008/02/12/linking-to-trac-tickets-in-email/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since I do a lot of referring to Trac ticket numbers in email messages, most visibly on the xmlroff-list mailing list, I wrote an Emacs function that finds the Trac ticket references in the current buffer and inserts a sorted list of the ticket references and their URLs at the end of the buffer.</p>
<p>The code (if WordPress hasn&#8217;t done too much damage to it) is:</p>
<pre>(defvar trac-base "http://xmlroff.org"
  "Base to use when inserting links to trac tickets in email.")

(defun trac-base-xmlroff ()
  (interactive)
  (setq trac-base "http://xmlroff.org")
  (message trac-base))

(defun insert-trac-links ()
  "Insert links for Trac links."
  (interactive)
  (let ((ticket-alist)
         (changeset-alist '()))
    (goto-char (point-min))
    (while
        (re-search-forward
         "#([0-9]+)" nil t)
      (setq ticket-alist
              (add-to-list 'ticket-alist
 		 (string-to-number
 		  (buffer-substring-no-properties
 		   (match-beginning 1)
 		   (match-end 1))))))
    (goto-char (point-max))
    (insert "\\n")
    (dolist (ticket (sort ticket-alist '&lt;))
      (insert (format
        "#%s %s/ticket/%s\\n"
        ticket trac-base ticket)))))</pre>
<p>I have a separate <code>`trac-base-xxx'</code> function for setting <code>`trac-base'</code> for each Trac that I regularly use, and I use GNUS customizations to call the appropriate <code>`trac-base-xxx'</code> function when I enter specific email folders.</p>
]]></content:encoded>
			<wfw:commentRss>http://inasmuch.as/2008/02/12/linking-to-trac-tickets-in-email/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

