<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Alex's Adventures on the Infobahn - emacs</title><link href="https://www.bennee.com/~alex/" rel="alternate"></link><link href="https://www.bennee.com/~alex/blog/tag/emacs/feed" rel="self"></link><id>https://www.bennee.com/~alex/</id><updated>2023-07-14T16:04:00+01:00</updated><subtitle>the wanderings of a supposed digital native</subtitle><entry><title>dired-rsync 0.7 released</title><link href="https://www.bennee.com/~alex/blog/2023/07/14/dired-rsync-07-released/" rel="alternate"></link><published>2023-07-14T16:04:00+01:00</published><updated>2023-07-14T16:04:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2023-07-14:/~alex/blog/2023/07/14/dired-rsync-07-released/</id><summary type="html">&lt;p&gt;There haven't been many changes in the last few years but Liu Hui did
submit a new package that allows you to use dired-rsync with a
&lt;a href="https://www.gnu.org/software/emacs/manual/html_mono/transient.html"&gt;transient&lt;/a&gt;
interface. Aside from that there have been a few minor bug fixes for a
few issues and I spent some time cleaning up …&lt;/p&gt;</summary><content type="html">&lt;p&gt;There haven't been many changes in the last few years but Liu Hui did
submit a new package that allows you to use dired-rsync with a
&lt;a href="https://www.gnu.org/software/emacs/manual/html_mono/transient.html"&gt;transient&lt;/a&gt;
interface. Aside from that there have been a few minor bug fixes for a
few issues and I spent some time cleaning up the bit rotted CI system
by migrating from the broken Travis setup to using GitHub actions.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;v0.7&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;truncate process buffer output to last status line&lt;/li&gt;
&lt;li&gt;raise minimum Emacs version to 25.1&lt;/li&gt;
&lt;li&gt;new dired-rsync-transient frontend&lt;/li&gt;
&lt;li&gt;various code clean-ups&lt;/li&gt;
&lt;li&gt;new customisation hook dired-rsync-success-hook&lt;/li&gt;
&lt;li&gt;moved the project CI to GitHub Actions&lt;/li&gt;
&lt;li&gt;now understands alternate port syntax in tramp URIs&lt;/li&gt;
&lt;/ul&gt;</content><category term="geek"></category><category term="emacs"></category><category term="dired"></category><category term="dired-rsync"></category></entry><entry><title>My Setup (2022 Edition)</title><link href="https://www.bennee.com/~alex/blog/2022/11/01/my-setup-2022-edition/" rel="alternate"></link><published>2022-11-01T09:30:00+00:00</published><updated>2022-11-01T09:30:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2022-11-01:/~alex/blog/2022/11/01/my-setup-2022-edition/</id><summary type="html">&lt;p&gt;It's been a while since I last blogged about anything personally (although I have written a few things for work). In a struggle to come up with things to talk about I finally decided it might be worth documenting my current working setup. It's probably a function of my aging …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It's been a while since I last blogged about anything personally (although I have written a few things for work). In a struggle to come up with things to talk about I finally decided it might be worth documenting my current working setup. It's probably a function of my aging but as I've gotten older I've slowly tweaked and tuned my
environment to minimise the friction of doing things. I'll briefly talk about the hardware but most of the environment is software and therefor fairly malleable.&lt;/p&gt;
&lt;p&gt;Starting from the top and working my way down.&lt;/p&gt;
&lt;h1&gt;Desktop (sway/i3/Gnome/ChromeOS)&lt;/h1&gt;
&lt;p&gt;I spend by far and away the most time in &lt;a href="https://swaywm.org/" title="link to sway website"&gt;Sway&lt;/a&gt; and previously it's X11 reference &lt;a href="https://i3wm.org/" title="link to i3 website"&gt;i3&lt;/a&gt; which are both tiling window managers. I don't really use the tiling feature much as in reality my main workflow is to have full maximised single application screens in workspaces. However I do have hotkeys for the two most important applications I open (terminal and editor) and with a narrowing launcher for the rest. I use &lt;a href="https://www.gnome.org/" title="link to Gnome website"&gt;Gnome&lt;/a&gt; on one of my laptops because I share it with other people and it pays to keep track of the mainstream Linux desktop. I have remapped some keys to closer match my tiling experience as well as tweaking the default applications.&lt;/p&gt;
&lt;p&gt;ChromeOS is the weird case where I accept a slightly different desktop paradigm because when travelling I like the ChromeOS feature set of secure and lightweight hardware. Any development I do on the road tends to use the &lt;a href="https://chromeos.dev/en/linux"&gt;Crostini terminal&lt;/a&gt;. More often than not it's just a shell for a ssh or mosh session to a bigger development box.&lt;/p&gt;
&lt;h2&gt;Key Desktop Apps (Emacs, Firefox, Modern Terminal)&lt;/h2&gt;
&lt;p&gt;It won't be a surprise to anyone that my main application is &lt;a href="https://www.gnu.org/software/emacs/" title="link to Emacs website"&gt;Emacs&lt;/a&gt; which provides the main interface into the rest of the system for pretty much everything except browsing the web. For web browsing I prefer &lt;a href="https://www.mozilla.org/en-GB/firefox/browsers/" title="link to Firefox website"&gt;Firefox&lt;/a&gt; which is synced up between my desktop and mobile. I occasionally have to use Chrome to access Javascript heavy web apps like Atlassian or some video call solutions.&lt;/p&gt;
&lt;p&gt;I currently use a range of &lt;a href="https://github.com/stsquad/dotfiles/blob/master/dotconfig/i3/terminal.sh" title="terminal launch script"&gt;terminals&lt;/a&gt; depending on the system. My daily driver terminal on my main box is &lt;a href="https://codeberg.org/dnkl/foot" title="Foot development pages"&gt;foot&lt;/a&gt; which is simple and minimal. It has a client/server setup so there is really only one foot binary running for all my terminals. I don't need anything fancy because all my terminal multiplexing is handled by &lt;a href="https://github.com/tmux/tmux" title="tmux development site"&gt;tmux&lt;/a&gt; which also handles shell persistence.&lt;/p&gt;
&lt;h2&gt;Hardware&lt;/h2&gt;
&lt;p&gt;I now run a single desktop machine which is a ~9 year old Intel brought for work which has seen upgrades to the SSDs and thats about it. When I do serious building I have a range of powerful servers with lots of cores and disk space which I can use. I have an electric standing desk although I don't tend to move it during my work day. I do put it in the upright position at the end of the day to stop me sitting down if I'm just checking something in the evening. I also own a personal XPS15 laptop which I can run Steam on although mostly on the built in Intel graphics as &lt;a href="https://nouveau.freedesktop.org/" title="Nouveau development site"&gt;Nouveau&lt;/a&gt; can't clock it to get any reasonable performance. I don't really mind because for most of my intensive high frame rate gaming I use my PS5 on a big flat screen TV.&lt;/p&gt;
&lt;p&gt;For my NAS I have a Synology DiskStation with around 8TB of storage and a Raspberry Pi 4 in a cute metal case running Kodi connected to the main TV. Finally there is a 24 core Arm server which draws a miniscule 5w which acts as a permanent point of presence and eventually may take on some home automation tasks. This is all supplied with 300Mbs of fibre optic broadband and a mesh network of Eero's supplying WiFi to the rest of the house. My office network has a hard link to the main router and comes through a &lt;a href="https://www.turris.com/en/omnia/overview/" title="Turris Omnia homepage"&gt;Turris Omnia&lt;/a&gt;.&lt;/p&gt;</content><category term="geek"></category><category term="tools"></category><category term="desktop"></category><category term="setup"></category><category term="emacs"></category></entry><entry><title>dired-rsync 0.6 released</title><link href="https://www.bennee.com/~alex/blog/2020/12/24/dired-rsync-06-released/" rel="alternate"></link><published>2020-12-24T22:18:00+00:00</published><updated>2020-12-24T22:18:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2020-12-24:/~alex/blog/2020/12/24/dired-rsync-06-released/</id><summary type="html">&lt;p&gt;Given the slowly growing collection of fixes I thought it was worth cutting a new release for the benefit of those that get their dired-rsync via the stable MELPA channels. The biggest user visible change is dired-rsync no longer tweaks mode-line-process itself. You can now decide if to add dired-rsync-modeline-status …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Given the slowly growing collection of fixes I thought it was worth cutting a new release for the benefit of those that get their dired-rsync via the stable MELPA channels. The biggest user visible change is dired-rsync no longer tweaks mode-line-process itself. You can now decide if to add dired-rsync-modeline-status in your modeline (or anywhere else if you wish).&lt;/p&gt;
&lt;p&gt;Merry Christmas ;-)&lt;/p&gt;
&lt;p&gt;v0.6&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;use tramp functions to decompose URIs (fix #22)&lt;/li&gt;
&lt;li&gt;use username from dired URI if we have it in rsync&lt;/li&gt;
&lt;li&gt;fix escaping of 's for remote-to-remote copies&lt;/li&gt;
&lt;li&gt;better detection of running jobs by parsing buffers&lt;/li&gt;
&lt;li&gt;increment the reverse proxy port based on active connections&lt;/li&gt;
&lt;li&gt;don't set mode-line-process, leave it to user to put dired-rsync-modeline-status somewhere&lt;/li&gt;
&lt;/ul&gt;</content><category term="geek"></category><category term="emacs"></category><category term="dired"></category><category term="dired-rsync"></category></entry><entry><title>Edit with Emacs v1.16 released</title><link href="https://www.bennee.com/~alex/blog/2020/12/24/edit-with-emacs-v116-released/" rel="alternate"></link><published>2020-12-24T16:10:00+00:00</published><updated>2020-12-24T16:10:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2020-12-24:/~alex/blog/2020/12/24/edit-with-emacs-v116-released/</id><summary type="html">&lt;p&gt;Despite what I said &lt;a href="https://www.bennee.com/~alex/blog/2018/01/17/edit-with-emacs-v1-15-released" title="link to the last release"&gt;last time&lt;/a&gt; it seems that this is still a useful tool for me. I had some free time to peruse some of the open issues and managed to work out what was breaking the GMail interaction and work out a fix. While &lt;a href="https://github.com/alpha22jp/atomic-chrome" title="Atomic Chrome homepage"&gt;Atomic Chrome&lt;/a&gt; provides a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Despite what I said &lt;a href="https://www.bennee.com/~alex/blog/2018/01/17/edit-with-emacs-v1-15-released" title="link to the last release"&gt;last time&lt;/a&gt; it seems that this is still a useful tool for me. I had some free time to peruse some of the open issues and managed to work out what was breaking the GMail interaction and work out a fix. While &lt;a href="https://github.com/alpha22jp/atomic-chrome" title="Atomic Chrome homepage"&gt;Atomic Chrome&lt;/a&gt; provides a nicer interactive experience with direct feedback the release of Crostini keeps the Emacs flame alive on my Chromebook. I suspect I still need someone to step up who is more conversant in the web languages of Javascript and CSS to improve the front end experience and maybe tackle the frequently requested feature of interaction with fancy javascript editors. In the meantime I'll continue to bumble along and look at what pull requests do come in and leave the pile of feature requests slowly growing.&lt;/p&gt;
&lt;p&gt;Merry Christmas ;-)&lt;/p&gt;
&lt;p&gt;v1.16&lt;/p&gt;
&lt;p&gt;Extension&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;allow disabling of switch to settings behaviour&lt;/li&gt;
&lt;li&gt;whitelist penguin.linux.test for edit server (ChromeOS/Crostini)&lt;/li&gt;
&lt;li&gt;fix context menu on newer Chromes (#158)&lt;/li&gt;
&lt;li&gt;honour edit_server_host instead of hard-coding 127.0.0.1&lt;/li&gt;
&lt;li&gt;use the Chrome/Firefox extension UI to set keyboard shortcuts.&lt;/li&gt;
&lt;li&gt;fix handling of spellcheck=false nodes for Gmail (#171, #162)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;edit-server.el&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;use make-frame (see updated docs for edit-server-new-frame-alist)&lt;/li&gt;
&lt;/ul&gt;</content><category term="geek"></category><category term="emacs"></category><category term="edit with emacs"></category><category term="chrome"></category><category term="chromeos"></category><category term="firefox"></category></entry><entry><title>magit-file-dispatch</title><link href="https://www.bennee.com/~alex/blog/2020/12/14/magit-file-dispatch/" rel="alternate"></link><published>2020-12-14T16:10:00+00:00</published><updated>2020-12-14T16:10:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2020-12-14:/~alex/blog/2020/12/14/magit-file-dispatch/</id><summary type="html">&lt;p&gt;&lt;a href="https://magit.vc/manual/magit/Commands-for-Buffers-Visiting-Files.html" title="manual page for magit-file-dispatch"&gt;magit-file-dispatch&lt;/a&gt; is my new favourite command since the recent removal of &lt;a href="https://github.com/magit/magit/pull/4237" title="pull request describing change"&gt;magit-file-mode&lt;/a&gt;. Rather than paper over the change and stick to the old way I tried the &lt;a href="https://emacsredux.com/blog/2020/12/10/essential-magit-file-commands/" title="Bozhidar Batsov blog post discussing Magit launch strategies"&gt;suggestions of launching with the dispatch commands&lt;/a&gt;. I discovered a few cool things including the ability to trace an individual functions changes over …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;a href="https://magit.vc/manual/magit/Commands-for-Buffers-Visiting-Files.html" title="manual page for magit-file-dispatch"&gt;magit-file-dispatch&lt;/a&gt; is my new favourite command since the recent removal of &lt;a href="https://github.com/magit/magit/pull/4237" title="pull request describing change"&gt;magit-file-mode&lt;/a&gt;. Rather than paper over the change and stick to the old way I tried the &lt;a href="https://emacsredux.com/blog/2020/12/10/essential-magit-file-commands/" title="Bozhidar Batsov blog post discussing Magit launch strategies"&gt;suggestions of launching with the dispatch commands&lt;/a&gt;. I discovered a few cool things including the ability to trace an individual functions changes over time which has completely replaced my old method of piping &lt;em&gt;git log&lt;/em&gt; through &lt;em&gt;less&lt;/em&gt;. In the end I found the fall-back of going to &lt;em&gt;magit-dispatch&lt;/em&gt; a little too much friction given I've a lot of memory muscle to launch the status of git from various non-file backed yet still project orientated buffers. &lt;em&gt;compilation-mode&lt;/em&gt; is one example but I also have my mail client set-up so I can quickly get to the code from the relevant mailing list. As everyone can have their own special snowflake settings in Emacs I finally went with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;with-eval-after-load&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;magit&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;defun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;my-magit-file-bindings&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Setup my file bindings&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;local-set-key&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;kbd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&amp;lt;f5&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;my-counsel-git-grep&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;add-hook&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;magit-find-file-hook&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;my-magit-file-bindings&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;defun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;my-magit-dispatch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;&amp;amp;optional&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;prefix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;My personal preference for magit-dispatch.&lt;/span&gt;
&lt;span class="s"&gt;While magit-file-dispatch is cool, falling back to magit-dispatch is&lt;/span&gt;
&lt;span class="s"&gt;not, I&amp;#39;d rather just go to magit-status. Lets make it so.&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;interactive&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;P&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;prefix&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;buffer-file-name&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;functionp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;#39;magit-file-dispatch&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;magit-status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;magit-file-dispatch&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;use-package&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;magit&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;:bind&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;C-x g&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;my-magit-dispatch&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="geek"></category><category term="emacs"></category><category term="magit"></category></entry><entry><title>Migrating again</title><link href="https://www.bennee.com/~alex/blog/2020/05/25/migrating-again/" rel="alternate"></link><published>2020-05-25T17:53:00+01:00</published><updated>2020-05-25T17:53:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2020-05-25:/~alex/blog/2020/05/25/migrating-again/</id><summary type="html">&lt;p&gt;It's been some time since I last blogged but I have been doing some
spring cleaning amongst my servers. While moving all my web content
onto a new box I though I would take advantage of the fresh start to
migrate away from &lt;a href="https://wordpress.org/"&gt;Wordpress&lt;/a&gt;. While it is a
fine FLOSS …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It's been some time since I last blogged but I have been doing some
spring cleaning amongst my servers. While moving all my web content
onto a new box I though I would take advantage of the fresh start to
migrate away from &lt;a href="https://wordpress.org/"&gt;Wordpress&lt;/a&gt;. While it is a
fine FLOSS project it really needs quite a bit of time to keep it up
to date and secure. I've decided it's much better to have a static
site so I've imported all my exiting blog content into a bunch of rST
and Markdown files and re-generated the site with a Python based
content generator called
&lt;a href="https://docs.getpelican.com/en/stable/"&gt;Pelican&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So far it seems easy enough to tweak. The main challenge is ensuring
the various feeds for different planets are in the same place as they
would have been with Wordpress. One difference with the change is the
lack of comments although I think I could probably re-enable them with
some 3rd party solution if I wanted to. We shall see.&lt;/p&gt;</content><category term="geek"></category><category term="emacs"></category><category term="wordpress"></category><category term="blog"></category></entry><entry><title>dired-rsync 0.5 release</title><link href="https://www.bennee.com/~alex/blog/2019/11/10/dired-rsync-0-5-release/" rel="alternate"></link><published>2019-11-10T19:42:00+00:00</published><updated>2019-11-10T19:42:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2019-11-10:/~alex/blog/2019/11/10/dired-rsync-0-5-release/</id><summary type="html">&lt;p&gt;If you've been running from MELPA you will have had all these features already but it was certainly overdue a stable tagging. The commit history shows a lot of faffing around getting the CI working again. However there are a bunch of customisation tweaks exposed as well as support for …&lt;/p&gt;</summary><content type="html">&lt;p&gt;If you've been running from MELPA you will have had all these features already but it was certainly overdue a stable tagging. The commit history shows a lot of faffing around getting the CI working again. However there are a bunch of customisation tweaks exposed as well as support for remote-to-remote rsync support (with a very ugly port-forward hack). From the NEWS file:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Big CI clean-ups (dropped emake, added Cask)&lt;/li&gt;
&lt;li&gt;smarter modeline status (show R:n% when one job running)&lt;/li&gt;
&lt;li&gt;make dired-rsync process dest with expand-file-name&lt;/li&gt;
&lt;li&gt;we now support remote to remote with an ugly port forward hack&lt;/li&gt;
&lt;li&gt;prompt the user for a passphrase if we detect stall in process&lt;/li&gt;
&lt;li&gt;add some basic ert tests&lt;/li&gt;
&lt;li&gt;new customisation option dired-rsync-source-files&lt;/li&gt;
&lt;li&gt;new customisation hook dired-rsync-failed-hook&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Happy file syncing ;-)&lt;/p&gt;
</content><category term="geek"></category><category term="dired"></category><category term="dired-rsync"></category><category term="emacs"></category></entry><entry><title>dired-rsync 0.4 released</title><link href="https://www.bennee.com/~alex/blog/2018/06/01/dired-rsync-0-4-released/" rel="alternate"></link><published>2018-06-01T18:12:00+01:00</published><updated>2018-06-01T18:12:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2018-06-01:/~alex/blog/2018/06/01/dired-rsync-0-4-released/</id><summary type="html">&lt;p&gt;I started hacking on this a while back but I've finally done the house-keeping tasks required to make it a proper grown up package.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://github.com/stsquad/dired-rsync"&gt;dired-rsync&lt;/a&gt; is a simple command which you can use to trigger an rsync copy from within dired. This is especially useful when you want to copy …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I started hacking on this a while back but I've finally done the house-keeping tasks required to make it a proper grown up package.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://github.com/stsquad/dired-rsync"&gt;dired-rsync&lt;/a&gt; is a simple command which you can use to trigger an rsync copy from within dired. This is especially useful when you want to copy across large files from a remote server without locking up Emacs/Tramp. The rsync just runs as an inferior process in the background.&lt;/p&gt;
&lt;p&gt;Today was mainly a process of cleaning up the CI and fixing any issues with it. I'd still like to add some proper tests but the whole thing is interactive and that seems to be tricky for Emacs to test. Anyway I've now tagged 0.4 so it will be available from MELPA Stable once it rebuilds. You can of course grab the building edge from MELPA any time ;-)&lt;/p&gt;
</content><category term="geek"></category><category term="dired"></category><category term="elisp"></category><category term="emacs"></category><category term="dired-rsync"></category></entry><entry><title>Working with dired</title><link href="https://www.bennee.com/~alex/blog/2018/04/07/working-with-dired/" rel="alternate"></link><published>2018-04-07T11:12:00+01:00</published><updated>2018-04-07T11:12:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2018-04-07:/~alex/blog/2018/04/07/working-with-dired/</id><summary type="html">&lt;p&gt;I've been making a lot more use of dired recently. One use case is copying files from my remote server to my home machine. Doing this directly from dired, even with the power of tramp, is a little too time consuming and potentially locks up your session for large files …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been making a lot more use of dired recently. One use case is copying files from my remote server to my home machine. Doing this directly from dired, even with the power of tramp, is a little too time consuming and potentially locks up your session for large files. While browsing reddit &lt;a class="reference internal" href="#r-emacs"&gt;r/emacs&lt;/a&gt; I found a reference to &lt;cite&gt;this post &amp;lt;https://vxlabs.com/2018/03/30/asynchronous-rsync-with-emacs-dired-and-tramp/&amp;gt;&lt;/cite&gt; that spurred me to look at spawning rsync from dired some more.&lt;/p&gt;
&lt;p&gt;:: &lt;span class="target" id="r-emacs"&gt;r/emacs&lt;/span&gt;: &lt;a class="reference external" href="http://reddit.com/r/emacs"&gt;http://reddit.com/r/emacs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately the solution is currently sitting in a pull-request to what looks like an orphaned package. I also ran into some other problems with the handling of where rsync needs to be run from so rather than unpicking some unfamiliar code I decided to re-implement everything in my &lt;cite&gt;own package &amp;lt;https://github.com/stsquad/dired-rsync&amp;gt;&lt;/cite&gt;.&lt;/p&gt;
&lt;p&gt;I've still got some debugging to do to get it to cleanly handle multiple sessions as well as a more detailed mode-line status. Once I'm happy I'll tag a 0.1 and get it submitted to MELPA.&lt;/p&gt;
&lt;p&gt;While getting more familiar with dired I also came up with this little helper:&lt;/p&gt;
&lt;pre class="code elisp literal-block"&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;defun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;my-dired-frame&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;directory&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Open up a dired frame which closes on exit.&amp;quot;&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;interactive&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;switch-to-buffer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;dired&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;directory&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;local-set-key&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;kbd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;C-x C-c&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;lambda&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;interactive&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;kill-this-buffer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;save-buffers-kill-terminal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;'t&lt;/span&gt;&lt;span class="p"&gt;))))&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;Which is paired with a simple alias in my shell setup:&lt;/p&gt;
&lt;pre class="code shell literal-block"&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;dired&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;emacsclient -a '' -t -e '(my-dired-frame default-directory)'&amp;quot;&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;This works really nicely for popping up a dired frame in your terminal window and cleaning itself up when you exit.&lt;/p&gt;
</content><category term="geek"></category><category term="dired"></category><category term="dired-rsync"></category><category term="emacs"></category></entry><entry><title>Solving the HKG18 puzzle with org-mode</title><link href="https://www.bennee.com/~alex/blog/2018/03/26/solving-the-hkg18-puzzle-with-org-mode/" rel="alternate"></link><published>2018-03-26T11:19:00+01:00</published><updated>2018-03-26T11:19:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2018-03-26:/~alex/blog/2018/03/26/solving-the-hkg18-puzzle-with-org-mode/</id><summary type="html">&lt;p&gt;One of the traditions I like about Linaro's Connect event is the
conference puzzle. Usually set by &lt;a href="https://www.linaro.org/author/dave-pigott/"&gt;Dave Piggot&lt;/a&gt; they provide a challenge
to your jet lagged brain. Full disclosure: I did not complete the
puzzle in time. In fact when Dave explained it I realised the answer
had been …&lt;/p&gt;</summary><content type="html">&lt;p&gt;One of the traditions I like about Linaro's Connect event is the
conference puzzle. Usually set by &lt;a href="https://www.linaro.org/author/dave-pigott/"&gt;Dave Piggot&lt;/a&gt; they provide a challenge
to your jet lagged brain. Full disclosure: I did not complete the
puzzle in time. In fact when Dave explained it I realised the answer
had been staring me in the face. However I thought a successful walk
through would make for a more entertaining read ;-)&lt;/p&gt;
&lt;p&gt;First the Puzzle:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Take the clues below and solve them. Once solved, figure out what the
hex numbers mean and then you should be able to associate each of the
clue solutions with their respective hex numbers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;table id="org530cfaf" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"&gt;


&lt;colgroup&gt;
&lt;col  class="org-left" /&gt;

&lt;col  class="org-left" /&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th scope="col" class="org-left"&gt;Clue&lt;/th&gt;
&lt;th scope="col" class="org-left"&gt;Hex Number&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;

&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="org-left"&gt;Lava Ale Code&lt;/td&gt;
&lt;td class="org-left"&gt;1114DBA&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Be Google Roe&lt;/td&gt;
&lt;td class="org-left"&gt;114F6BE&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Natural Gin&lt;/td&gt;
&lt;td class="org-left"&gt;114F72A&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Pope Charger&lt;/td&gt;
&lt;td class="org-left"&gt;121EE50&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Dolt And Hunk&lt;/td&gt;
&lt;td class="org-left"&gt;12264BC&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Monk Hops Net&lt;/td&gt;
&lt;td class="org-left"&gt;122D9D9&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Is Enriched Tin&lt;/td&gt;
&lt;td class="org-left"&gt;123C1EF&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Bran Hearing Kin&lt;/td&gt;
&lt;td class="org-left"&gt;1245D6E&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Enter Slim Beer&lt;/td&gt;
&lt;td class="org-left"&gt;127B78E&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Herbal Cabbages&lt;/td&gt;
&lt;td class="org-left"&gt;1282FDD&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Jan Venom Hon Nun&lt;/td&gt;
&lt;td class="org-left"&gt;12853C5&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;A Cherry Skull&lt;/td&gt;
&lt;td class="org-left"&gt;1287B3C&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Each Noun Lands&lt;/td&gt;
&lt;td class="org-left"&gt;1298F0B&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Wave Zone Kits&lt;/td&gt;
&lt;td class="org-left"&gt;12A024C&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Avid Null Sorts&lt;/td&gt;
&lt;td class="org-left"&gt;12A5190&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Handcars All Trim&lt;/td&gt;
&lt;td class="org-left"&gt;12C76DC&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;h1&gt;Clues&lt;/h1&gt;
&lt;p&gt;It looks like all the clues are anagrams. I was lazy and just used the
first online anagram solver that Google pointed me at. However we can
automate this by combining org-mode with Python and the excellent
Beautiful Soup library.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;bs4&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BeautifulSoup&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;requests&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;re&lt;/span&gt;

&lt;span class="c1"&gt;# ask internet to solve the puzzle&lt;/span&gt;
&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;http://anagram-solver.net/&lt;/span&gt;&lt;span class="si"&gt;%s&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;anagram&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;%20&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# fish out the answers&lt;/span&gt;
&lt;span class="n"&gt;soup&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;BeautifulSoup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;soup&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;ul&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;class_&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;answers&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;li&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find_all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;li&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;li&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;# filter out non computer related or poor results&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Elmer Berstein&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Tim-Berners Lee&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Babbage Charles&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Calude Shannon&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;continue&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;# filter out non proper names&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;[a-z] [A-Z]&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;break&lt;/span&gt;

&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;So with &lt;code&gt;:var anagram=clues[2,0]&lt;/code&gt; we get&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Ada Lovelace
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I admit the "if result in []" is a bit of hack.&lt;/p&gt;
&lt;h1&gt;Hex Numbers&lt;/h1&gt;
&lt;p&gt;The hex numbers could be anything. But lets first start by converting
to something else.&lt;/p&gt;
&lt;table id="orgf38fe0d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"&gt;


&lt;colgroup&gt;
&lt;col  class="org-left" /&gt;

&lt;col  class="org-right" /&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th scope="col" class="org-left"&gt;Hex Prompt&lt;/th&gt;
&lt;th scope="col" class="org-right"&gt;Number&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;

&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="org-left"&gt;1114DBA&lt;/td&gt;
&lt;td class="org-right"&gt;17911226&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;114F6BE&lt;/td&gt;
&lt;td class="org-right"&gt;18151102&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;114F72A&lt;/td&gt;
&lt;td class="org-right"&gt;18151210&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;121EE50&lt;/td&gt;
&lt;td class="org-right"&gt;19000912&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;12264BC&lt;/td&gt;
&lt;td class="org-right"&gt;19031228&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;122D9D9&lt;/td&gt;
&lt;td class="org-right"&gt;19061209&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;123C1EF&lt;/td&gt;
&lt;td class="org-right"&gt;19120623&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;1245D6E&lt;/td&gt;
&lt;td class="org-right"&gt;19160430&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;127B78E&lt;/td&gt;
&lt;td class="org-right"&gt;19380110&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;1282FDD&lt;/td&gt;
&lt;td class="org-right"&gt;19410909&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;12853C5&lt;/td&gt;
&lt;td class="org-right"&gt;19420101&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;1287B3C&lt;/td&gt;
&lt;td class="org-right"&gt;19430204&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;1298F0B&lt;/td&gt;
&lt;td class="org-right"&gt;19500811&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;12A024C&lt;/td&gt;
&lt;td class="org-right"&gt;19530316&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;12A5190&lt;/td&gt;
&lt;td class="org-right"&gt;19550608&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;12C76DC&lt;/td&gt;
&lt;td class="org-right"&gt;19691228&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The #+TBLFM: is &lt;code&gt;$1='(identity remote(clues,@@#$2))::$2='(string-to-number $1 16)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This is where I went down a blind alley. The fact all they all had the
top bit set made me think that Dave was giving a hint to the purpose
of the hex number in the way many &lt;a href="https://en.wikipedia.org/wiki/Cryptic_crossword"&gt;cryptic crosswords&lt;/a&gt; do (I know he is
a fan of these). However the more obvious answer is that everyone in
the list was born in the last millennium.&lt;/p&gt;
&lt;h1&gt;Looking up Birth Dates&lt;/h1&gt;
&lt;p&gt;Now I could go through all the names by hand and look up their birth
dates but as we are automating things perhaps we can use computers for
what they are good at. Unfortunately there isn't a simple web-api for
looking up this stuff. However there is a project called &lt;a href="http://wiki.dbpedia.org/about"&gt;DBpedia&lt;/a&gt; which
takes Wikipedia's data and attempts to make it semantically useful. We
can query this using a semantic query language called SparQL. If only
I could call it from Emacs&amp;#x2026;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;select distinct ?birthDate {
  dbr:$name dbo:birthDate|dbp:birthDate ?birthDate
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;So calling with &lt;code&gt;:var name="Ada_Lovelace"&lt;/code&gt; we get&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;quot;birthDate&amp;quot;
1815-12-10
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Of course it shouldn't be a surprise this exists. And in what I hope
is a growing trend &lt;a href="https://github.com/ljos/sparql-mode"&gt;sparql-mode&lt;/a&gt; supports org-mode out of the box. The
$name in the snippet is expanded from the passed in variables to the
function. This makes it a general purpose lookup function we can use
for all our names.&lt;/p&gt;
&lt;p&gt;There are a couple of wrinkles. We need to format the name we are
looking up with underscores to make a valid URL. Also the output spits
out a header and possible multiple birth dates. We can solve this with
a little wrapper function. It also introduces some rate limiting so we
don't smash DBpedia's public SPARQL endpoint.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;rate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;limit&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sleep&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;let&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;replace&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;all&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;#39;((&lt;/span&gt;&lt;span class="s"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;_&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Von&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;von&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ret&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;eval&lt;/span&gt;
&lt;span class="w"&gt;             &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;car&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;read&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;string&lt;/span&gt;
&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;(org-sbe get-dob (name $&lt;/span&gt;&lt;span class="se"&gt;\&amp;quot;&lt;/span&gt;&lt;span class="s"&gt;%s&lt;/span&gt;&lt;span class="se"&gt;\&amp;quot;&lt;/span&gt;&lt;span class="s"&gt;))&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="p"&gt;))))))&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;string&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;replace&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;regexp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;in&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;string&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;car&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cdr&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;lines&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ret&lt;/span&gt;&lt;span class="p"&gt;))))))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Calling with &lt;code&gt;:var name="Ada Lovelace"&lt;/code&gt; we get&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="mf"&gt;18151210&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;Full Solution&lt;/h1&gt;
&lt;p&gt;So now we know what we are doing we need to solve all the puzzles and
lookup the data. Fortunately org-mode's tables are fully functional
spreadsheets except they are not limited to simple transformations.
Each formula can be a fully realised bit of elisp, calling other
source blocks as needed.&lt;/p&gt;
&lt;table id="orgb836df6" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"&gt;


&lt;colgroup&gt;
&lt;col  class="org-left" /&gt;

&lt;col  class="org-left" /&gt;

&lt;col  class="org-right" /&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th scope="col" class="org-left"&gt;Clue&lt;/th&gt;
&lt;th scope="col" class="org-left"&gt;Solution&lt;/th&gt;
&lt;th scope="col" class="org-right"&gt;DOB&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;

&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="org-left"&gt;Herbal Cabbages&lt;/td&gt;
&lt;td class="org-left"&gt;Charles Babbage&lt;/td&gt;
&lt;td class="org-right"&gt;17911226&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Be Google Roe&lt;/td&gt;
&lt;td class="org-left"&gt;George Boole&lt;/td&gt;
&lt;td class="org-right"&gt;18151102&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Lava Ale Code&lt;/td&gt;
&lt;td class="org-left"&gt;Ada Lovelace&lt;/td&gt;
&lt;td class="org-right"&gt;18151210&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;A Cherry Skull&lt;/td&gt;
&lt;td class="org-left"&gt;Haskell Curry&lt;/td&gt;
&lt;td class="org-right"&gt;19000912&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Jan Venom Hon Nun&lt;/td&gt;
&lt;td class="org-left"&gt;John Von Neumann&lt;/td&gt;
&lt;td class="org-right"&gt;19031228&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Pope Charger&lt;/td&gt;
&lt;td class="org-left"&gt;Grace Hopper&lt;/td&gt;
&lt;td class="org-right"&gt;19061209&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Natural Gin&lt;/td&gt;
&lt;td class="org-left"&gt;Alan Turing&lt;/td&gt;
&lt;td class="org-right"&gt;19120623&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Each Noun Lands&lt;/td&gt;
&lt;td class="org-left"&gt;Claude Shannon&lt;/td&gt;
&lt;td class="org-right"&gt;19160430&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Dolt And Hunk&lt;/td&gt;
&lt;td class="org-left"&gt;Donald Knuth&lt;/td&gt;
&lt;td class="org-right"&gt;19380110&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Is Enriched Tin&lt;/td&gt;
&lt;td class="org-left"&gt;Dennis Ritchie&lt;/td&gt;
&lt;td class="org-right"&gt;19410909&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Bran Hearing Kin&lt;/td&gt;
&lt;td class="org-left"&gt;Brian Kernighan&lt;/td&gt;
&lt;td class="org-right"&gt;19420101&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Monk Hops Net&lt;/td&gt;
&lt;td class="org-left"&gt;Ken Thompson&lt;/td&gt;
&lt;td class="org-right"&gt;19430204&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Wave Zone Kits&lt;/td&gt;
&lt;td class="org-left"&gt;Steve Wozniak&lt;/td&gt;
&lt;td class="org-right"&gt;19500811&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Handcars All Trim&lt;/td&gt;
&lt;td class="org-left"&gt;Richard Stallman&lt;/td&gt;
&lt;td class="org-right"&gt;19530316&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Enter Slim Beer&lt;/td&gt;
&lt;td class="org-left"&gt;Tim Berners-Lee&lt;/td&gt;
&lt;td class="org-right"&gt;19550608&lt;/td&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td class="org-left"&gt;Avid Null Sorts&lt;/td&gt;
&lt;td class="org-left"&gt;Linus Torvalds&lt;/td&gt;
&lt;td class="org-right"&gt;19691228&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The #+TBLFM: is &lt;code&gt;$1='(identity remote(clues,@@#$1))::$2='(org-sbe solve-anagram (anagram $$1))::$3='(org-sbe frob-dob (name $$2))&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The hex numbers are helpfully sorted so as long as we sort the clues
table by the looked up date of birth using &lt;em&gt;M-x org-table-sort-lines&lt;/em&gt;
we are good to go.&lt;/p&gt;</content><category term="geek"></category><category term="connect"></category><category term="emacs"></category><category term="linaro"></category><category term="org-mode"></category></entry><entry><title>Workbooks for Benchmarking</title><link href="https://www.bennee.com/~alex/blog/2018/02/21/workbooks-for-benchmarking/" rel="alternate"></link><published>2018-02-21T20:34:00+00:00</published><updated>2018-02-21T20:34:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2018-02-21:/~alex/blog/2018/02/21/workbooks-for-benchmarking/</id><summary type="html">&lt;p&gt;While working on a major re-factor of &lt;a class="reference external" href="http://lists.gnu.org/archive/html/qemu-devel/2018-02/msg01330.html"&gt;QEMU's softfloat code&lt;/a&gt; I've been doing a lot of benchmarking. It can be quite tedious work as you need to be careful you've run the correct steps on the correct binaries and keeping notes is important. It is a task that cries out …&lt;/p&gt;</summary><content type="html">&lt;p&gt;While working on a major re-factor of &lt;a class="reference external" href="http://lists.gnu.org/archive/html/qemu-devel/2018-02/msg01330.html"&gt;QEMU's softfloat code&lt;/a&gt; I've been doing a lot of benchmarking. It can be quite tedious work as you need to be careful you've run the correct steps on the correct binaries and keeping notes is important. It is a task that cries out for scripting but that in itself can be a compromise as you end up stitching a pipeline of commands together in something like perl. You may script it all in a language designed for this sort of thing like R but then find your final upload step is a pain to implement.&lt;/p&gt;
&lt;p&gt;One solution to this is to use a literate programming workbook like &lt;a class="reference external" href="https://github.com/stsquad/testcases/blob/master/aarch64/benchmark.org"&gt;this&lt;/a&gt;. Literate programming is a style where you interleave your code with natural prose describing the steps you go through. This is different from simply having well commented code in a source tree. For one thing you do not have to leap around a large code base as everything you need is on the file you are reading, from top to bottom. There are many solutions out there including &lt;a class="reference external" href="https://github.com/jupyter/jupyter/wiki/A-gallery-of-interesting-Jupyter-Notebooks"&gt;various python based examples&lt;/a&gt;. Of course being a happy Emacs user I use one of its stand-out features &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Org-mode"&gt;org-mode&lt;/a&gt; which comes with multi-language &lt;a class="reference external" href="https://orgmode.org/worg/org-contrib/babel/"&gt;org-babel&lt;/a&gt; support. This allows me to document my benchmarking while scripting up the steps in a variety of &amp;quot;languages&amp;quot; depending on the my needs at the time. Let's take a look at the first section:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p class="rubric" id="orgb7da4a0"&gt;1 Binaries To Test&lt;/p&gt;
&lt;div id="text-1" class="outline-text-2"&gt;&lt;div class="line-block"&gt;
&lt;div class="line"&gt;Here we have several tables of binaries to test. We refer to the&lt;/div&gt;
&lt;div class="line"&gt;current benchmarking set from the next stage, Run Benchmark.&lt;/div&gt;
&lt;/div&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;For a final test we might compare the system QEMU with a reference&lt;/div&gt;
&lt;div class="line"&gt;build as well as our current build.&lt;/div&gt;
&lt;/div&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="81%" /&gt;
&lt;col width="19%" /&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;Binary&lt;/th&gt;
&lt;th class="head"&gt;title&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;/usr/bin/qemu-aarch64&lt;/td&gt;
&lt;td&gt;system-2.5.log&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;~/lsrc/qemu/qemu-builddirs/arm-targets.build/aarch64-linux-user/qemu-aarch64&lt;/td&gt;
&lt;td&gt;master.log&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;~/lsrc/qemu/qemu.git/aarch64-linux-user/qemu-aarch64&lt;/td&gt;
&lt;td&gt;softfloat-v4.log&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/blockquote&gt;&lt;p&gt;Well that is certainly fairly explanatory. These are named org-mode tables which can be referred to in other code snippets and passed in as variables. So the next job is to run the benchmark itself:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p class="rubric" id="org5a36bd2"&gt;2 Run Benchmark&lt;/p&gt;
&lt;div id="text-2" class="outline-text-2"&gt;&lt;p&gt;This runs the benchmark against each binary we have selected above.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
import subprocess
import os

runs=[]

for qemu,logname in files:
cmd=&amp;quot;taskset -c 0 %s ./vector-benchmark -n %s | tee %s&amp;quot; % (qemu, tests, logname)
    subprocess.call(cmd, shell=True)
    runs.append(logname)

    return runs
&lt;/pre&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;So why use python as the test runner? Well truth is whenever I end up munging arrays in shell script I forget the syntax and end up jumping through all sorts of hoops. Easier just to have some simple python. I use python again later to read the data back into an org-table so I can pass it to the next step, graphing:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre class="literal-block"&gt;
set title &amp;quot;Vector Benchmark Results (lower is better)&amp;quot;
set style data histograms
set style fill solid 1.0 border lt -1

set xtics rotate by 90 right
set yrange [:]
set xlabel noenhanced
set ylabel &amp;quot;nsecs/Kop&amp;quot; noenhanced
set xtics noenhanced
set ytics noenhanced
set boxwidth 1
set xtics format &amp;quot;&amp;quot;
set xtics scale 0
set grid ytics
set term pngcairo size 1200,500

plot for [i=2:5] data using i:xtic(1) title columnhead
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is a &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Gnuplot"&gt;GNU Plot&lt;/a&gt; script which takes the data and plots an image from it. org-mode takes care of the details of marshalling the table data into GNU Plot so all this script is really concerned with is setting styles and titles. The language is capable of some fairly advanced stuff but I could always pre-process the data with something else if I needed to.&lt;/p&gt;
&lt;p&gt;Finally I need to upload my graph to an image hosting service to share with my colleges. This can be done with a elaborate curl command but I have another trick at my disposal thanks to the excellent &lt;a class="reference external" href="https://github.com/pashky/restclient.el"&gt;restclient-mode&lt;/a&gt;. This mode is actually designed for interactive debugging of REST APIs but it is also easily to use from an org-mode source block. So the whole thing looks like a HTTP session:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre class="literal-block"&gt;
:client_id = feedbeef

# Upload images to imgur
POST https://api.imgur.com/3/image
Authorization: Client-ID :client_id
Content-type: image/png

&amp;lt; benchmark.png
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Finally because the above dumps all the headers when run (which is very handy for debugging) I actually only want the URL in most cases. I can do this simply enough in elisp:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre class="literal-block"&gt;
#+name: post-to-imgur
#+begin_src emacs-lisp :var json-string=upload-to-imgur()
  (when (string-match
         (rx &amp;quot;link&amp;quot; (one-or-more (any &amp;quot;\&amp;quot;:&amp;quot; whitespace))
             (group (one-or-more (not (any &amp;quot;\&amp;quot;&amp;quot;)))))
         json-string)
    (match-string 1 json-string))
#+end_src
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;The :var line calls the restclient-mode function automatically and passes it the result which it can then extract the final URL from.&lt;/p&gt;
&lt;p&gt;And there you have it, my entire benchmarking workflow document in a single file which I can read through tweaking each step as I go. This isn't the first time I've done this sort of thing. As I use org-mode extensively as a logbook to keep track of my upstream work I've slowly grown a series of scripts for common tasks. For example every patch series and pull request I post is done via org. I keep the whole thing in a git repository so each time I finish a sequence I can commit the results into the repository as a permanent record of what steps I ran.&lt;/p&gt;
&lt;p&gt;If you want even more inspiration I suggest you look at John Kitchen's &lt;a class="reference external" href="http://kitchingroup.cheme.cmu.edu/scimax"&gt;scimax&lt;/a&gt; work. As a publishing scientist he makes extensive use of org-mode when writing his papers. He is able to include the main prose with the code to plot the graphs and tables in a single source document from which his camera ready documents are generated. Should he ever need to reproduce any work his exact steps are all there in the source document. Yet another example of why org-mode is awesome ;-)&lt;/p&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content><category term="general"></category><category term="benchmark"></category><category term="emacs"></category><category term="linaro"></category><category term="org-mode"></category><category term="qemu"></category></entry><entry><title>FOSDEM 2018</title><link href="https://www.bennee.com/~alex/blog/2018/02/06/fosdem-2018/" rel="alternate"></link><published>2018-02-06T09:36:00+00:00</published><updated>2018-02-06T09:36:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2018-02-06:/~alex/blog/2018/02/06/fosdem-2018/</id><summary type="html">&lt;p&gt;I've just returned from a weekend in Brussels for my first ever FOSDEM - the Free and Open Source Developers, European Meeting. It's been on my list of conferences to go to for some time and thanks to getting my talk accepted, my &lt;a class="reference external" href="http://www.linaro.org"&gt;employer&lt;/a&gt; financed the cost of travel and hotels …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've just returned from a weekend in Brussels for my first ever FOSDEM - the Free and Open Source Developers, European Meeting. It's been on my list of conferences to go to for some time and thanks to getting my talk accepted, my &lt;a class="reference external" href="http://www.linaro.org"&gt;employer&lt;/a&gt; financed the cost of travel and hotels. Thanks to the support of the &lt;a class="reference external" href="http://www.ulb.ac.be/"&gt;Université libre de Bruxelles (ULB)&lt;/a&gt; the event itself is free and run entirely by volunteers. As you can expect from the name they also have a strong commitment to free and open source software.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image0" class="alignright size-thumbnail wp-image-2761" src="/~alex/blog/wp-content/uploads/2018/02/fos-150x33.jpg" style="width: 150px; height: 33px;" /&gt;&lt;/p&gt;
&lt;p&gt;The first thing that struck me about the conference is how wide ranging it was. There were talks on everything from the internals of debugging tools to developing public policy. When I first loaded up their excellent companion app (naturally via &lt;a class="reference external" href="https://f-droid.org/en/packages/be.digitalia.fosdem/"&gt;the F-Droid repository&lt;/a&gt;) I was somewhat overwhelmed by the choice. As it is a free conference there is no limit on the numbers who can attend which means you are not always guarenteed to be able to get into every talk. In fact during the event I walked past many long queues for the more popular talks. In the end I ended up just bookmarking all the talks I was interested in and deciding which one to go to depending on how I felt at the time. Fortunately FOSDEM have a strong archiving policy and video most of their talks so I'll be spending the next few weeks catching up on the ones I missed.&lt;/p&gt;
&lt;p&gt;There now follows a non-exhaustive list of the most interesting ones I was able to see live:&lt;/p&gt;
&lt;p&gt;Dashamir's &lt;a class="reference external" href="https://fosdem.org/2018/schedule/event/easy_gnupg/"&gt;talk on EasyGPG&lt;/a&gt; dealt with the opinionated decisions it makes to try and make the use of GnuPG more intuitive to those not versed in the full gory details of public key cryptography. Although I use GPG mainly for signing GIT pull requests I really should make better use it over all. The split-key solution to backups was particularly interesting. I suspect I'll need a little convincing before I put part of my key in the cloud but I'll certainly check out his scripts.&lt;/p&gt;
&lt;p&gt;Liam's &lt;a class="reference external" href="https://fosdem.org/2018/schedule/event/alternative_histories/"&gt;A Circuit Less Travelled&lt;/a&gt; was an entertaining tour of some of the technologies and ideas from early computer history that got abandoned on the wayside. These ideas were often to be re-invented in a less superior form as engineers realised the error of their ways as technology advanced. The later half of the talk turns into a bit of LISP love-fest but as an Emacs user with an ever growing config file that is fine by me ;-)&lt;/p&gt;
&lt;p&gt;Following on in the history vein was Steven Goodwin's talk on &lt;a class="reference external" href="https://fosdem.org/2018/schedule/event/digital_archaeology/"&gt;Digital Archaeology&lt;/a&gt; which was a salutatory reminder of the amount of recent history that is getting lost as computing's breakneck pace has discarded old physical formats in lieu of newer equally short lived formats. It reminded me I should really do something about the 3 boxes of floppy disks I have under my desk. I also need to schedule a visit to the &lt;a class="reference external" href="http://www.computinghistory.org.uk/"&gt;Computer History Museum&lt;/a&gt; with my children seeing as it is more or less on my doorstep.&lt;/p&gt;
&lt;p&gt;There was a tongue in check &lt;a class="reference external" href="http://n-gate.com/fosdem/"&gt;preview&lt;/a&gt; that described the &lt;a class="reference external" href="https://fosdem.org/2018/schedule/event/edsac/"&gt;EDSAC talk&lt;/a&gt; as recreating &amp;quot;an ancient computer without any of the things that made it interesting&amp;quot;. This was was a little unkind. Although the project re-implemented the computation parts in a tiny little FPGA the core idea was to introduce potential students to the physicality of the early computers. After an introduction to the hoary architecture of the original EDSAC and &lt;a class="reference external" href="https://www.youtube.com/watch?v=DcZ1bFfDvSQ"&gt;the Wheeler Jump&lt;/a&gt; Mary introduced the hardware they re-imagined for the project. The first was an optical reader developed to read in paper tapes although this time ones printed on thermal receipt paper. This included an in-depth review of the problems of smoothing out analogue inputs to get reliable signals from their optical sensors which mirrors the problems the rebuild is facing with nature of the valves used in EDSAC. It is a shame they couldn't come up with some way to involve a valve but I guess high-tension supplies and school kids don't mix well. However they did come up with a way of re-creating the original acoustic mercury delay lines but this time with a tube of air and some 3D printed parabolic ends.&lt;/p&gt;
&lt;p&gt;The big geek event was the much anticipated announcement of RISC-V hardware during the &lt;a class="reference external" href="https://fosdem.org/2018/schedule/event/riscv/"&gt;RISC-V enablement talk&lt;/a&gt;. It seemed to be an open secret the announcement was coming but it still garnered hearty applause when it finally came. I should point out I'm indirectly employed by companies with an interest in a competing architecture but it is still good to see other stuff out there. The board is fairly open but there are still some peripheral IPs which were closed which shows just how tricky getting to fully-free hardware is going to be. As I understand the RISC-V's licensing model the ISA is open (unlike for example an ARM Architecture License) but individual companies can still have closed implementations which they license to be manufactured which is how I assume SiFive funds development. The actual CPU implementation is still very much a black box you have to take on trust.&lt;/p&gt;
&lt;p&gt;Finally for those that are interested &lt;a class="reference external" href="https://fosdem.org/2018/schedule/event/vai_vectors_meet_virtualization/"&gt;my talk is already online&lt;/a&gt; for those that are interested in what I'm currently working on. The slides have been slightly cropped in the video but if you follow the &lt;a class="reference external" href="http://people.linaro.org/~alex.bennee/org/presentations/vectors-meet-virt.html"&gt;link to the HTML version&lt;/a&gt; you can read along on your machine.&lt;/p&gt;
&lt;p&gt;I have to say FOSDEM's setup is pretty impressive. Although there was a volunteer in each room to deal with fire safety and replace microphones all the recording is fully automated. There are rather fancy hand crafted wooden boxes in each room which take the feed from your laptop and mux it with the camera. I got the email from the automated system asking me to review a preview of my talk about half and hour after I gave it. It took a little longer for the final product to get encoded and online but it's certainly the nicest system I've come across so far.&lt;/p&gt;
&lt;p&gt;All in all I can heartily recommend FOSDEM for anyone in an interest is FLOSS. It's a packed schedule and there is going to be something for everyone there. Big thanks to all the volunteers and organisers and I hope I can make it next year ;-)&lt;/p&gt;
</content><category term="geek"></category><category term="conference"></category><category term="edsac"></category><category term="emacs"></category><category term="fosdem"></category><category term="linaro"></category><category term="lisp"></category></entry><entry><title>Edit with Emacs v1.15 released</title><link href="https://www.bennee.com/~alex/blog/2018/01/17/edit-with-emacs-v1-15-released/" rel="alternate"></link><published>2018-01-17T16:47:00+00:00</published><updated>2018-01-17T16:47:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2018-01-17:/~alex/blog/2018/01/17/edit-with-emacs-v1-15-released/</id><summary type="html">&lt;p&gt;After a bit of hiatus there was enough of a flurry of patches to make it worth pushing out a new release. I'm in a little bit of a quandary with what to do with this package now. It's obviously a useful extension for a good number of people but …&lt;/p&gt;</summary><content type="html">&lt;p&gt;After a bit of hiatus there was enough of a flurry of patches to make it worth pushing out a new release. I'm in a little bit of a quandary with what to do with this package now. It's obviously a useful extension for a good number of people but I notice the &lt;a class="reference external" href="https://github.com/stsquad/emacs_chrome/issues"&gt;slowly growing number of issues&lt;/a&gt; which I'm not making much progress on. It's hard to find time to debug and fix things when it's main state is Works For Me. There is also competition from the &lt;a class="reference external" href="https://github.com/tuvistavie/atomic-chrome"&gt;Atomic Chrome&lt;/a&gt; extension (and it's related &lt;a class="reference external" href="https://github.com/alpha22jp/atomic-chrome"&gt;emacs extension&lt;/a&gt;). It's an excellent package and has the advantage of a Chrome extension that is more actively developed and using a bi-directional web-socket to communicate with the edit server. It's been a feature I've wanted to add to Edit with Emacs for a while but my re-factoring efforts are slowed down by the fact that Javascript is not a language I'm fluent in and finding a long enough period of spare time is hard with a family. I guess this is a roundabout way of saying that realistically this package is in maintenance mode and you shouldn't expect to see any new development for the time being. I'll of course try my best to address reproducible bugs and process pull requests in a timely manner. That said please enjoy v1.15:&lt;/p&gt;
&lt;p&gt;Extension&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Now builds for Firefox using WebExtension hooks&lt;/div&gt;
&lt;div class="line"&gt;* Use chrome.notifications instead of webkitNotifications&lt;/div&gt;
&lt;div class="line"&gt;* Use&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;p&gt;with style instead of inline for edit button
* fake &amp;quot;input&amp;quot; event to stop active page components overwriting text area&lt;/p&gt;
&lt;/p&gt;&lt;p&gt;edit-server.el&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* avoid calling make-frame-on-display for TTY setups (#103/#132/#133)&lt;/div&gt;
&lt;div class="line"&gt;* restore edit-server-default-major-mode if auto-mode lookup fails&lt;/div&gt;
&lt;div class="line"&gt;* delete window when done editing with no new frame&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Get the latest from &lt;a class="reference external" href="https://chrome.google.com/webstore/detail/edit-with-emacs/ljobjlafonikaiipfkggjbhkghgicgoh"&gt;the Chrome Webstore&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;</content><category term="geek"></category><category term="edit with emacs"></category><category term="emacs"></category></entry><entry><title>checkpatch-mode</title><link href="https://www.bennee.com/~alex/blog/2017/02/09/checkpatch-mode/" rel="alternate"></link><published>2017-02-09T15:30:00+00:00</published><updated>2017-02-09T15:30:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2017-02-09:/~alex/blog/2017/02/09/checkpatch-mode/</id><summary type="html">&lt;p&gt;A couple of weeks ago I mused that I should really collect together the &lt;a class="reference external" href="https://github.com/stsquad/my-emacs-stuff/blob/master/my-git.el#L139"&gt;various&lt;/a&gt; &lt;a class="reference external" href="https://github.com/stsquad/my-emacs-stuff/blob/master/my-email.el#L562"&gt;hacks&lt;/a&gt; to integrate checkpatch into my workflow into a consistent mode. Having a quick look around I couldn't find any other implementations and went to create the said mode. It turns out I'd created the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A couple of weeks ago I mused that I should really collect together the &lt;a class="reference external" href="https://github.com/stsquad/my-emacs-stuff/blob/master/my-git.el#L139"&gt;various&lt;/a&gt; &lt;a class="reference external" href="https://github.com/stsquad/my-emacs-stuff/blob/master/my-email.el#L562"&gt;hacks&lt;/a&gt; to integrate checkpatch into my workflow into a consistent mode. Having a quick look around I couldn't find any other implementations and went to create the said mode. It turns out I'd created the directory and done the initial commit 3 years ago. Anyway I polished it up a bit and you can now get it &lt;a class="reference external" href="https://github.com/stsquad/checkpatch-mode"&gt;here&lt;/a&gt;. I hope it's useful to the wider community and as ever patches welcome ;-)&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category></entry><entry><title>Anyone interested at an Emacs BoF at LCU14?</title><link href="https://www.bennee.com/~alex/blog/2014/04/29/anyone-interested-at-an-emacs-bof-at-lcu14/" rel="alternate"></link><published>2014-04-29T16:00:00+01:00</published><updated>2014-04-29T16:00:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2014-04-29:/~alex/blog/2014/04/29/anyone-interested-at-an-emacs-bof-at-lcu14/</id><summary type="html">&lt;p&gt;I'm fairly atypical as a Linaro employee because I have a desk in a shared office. This means I get to participate in technical banter with the other employees based in the Cambridge office. However it has become quite clear I'm surrounded on all sides by VIMers with only one …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I'm fairly atypical as a Linaro employee because I have a desk in a shared office. This means I get to participate in technical banter with the other employees based in the Cambridge office. However it has become quite clear I'm surrounded on all sides by VIMers with only one potential convert who wants to try Emacs out &amp;quot;one day&amp;quot;. As a result I thought it might be nice to have an Emacs Birds of a Feather (BoF) session at &lt;a class="reference external" href="http://www.linaro.org/connect/lcu/lcu14/"&gt;LCU14&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;BoF sessions are basically an informal gathering where people with a shared interest who come along to swap tips and stories about their area of interest. In the context of LCU it would be an opportunity to network and meet fellow Emacers. So any interest?&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="linaro"></category></entry><entry><title>Boutique modes</title><link href="https://www.bennee.com/~alex/blog/2014/03/05/boutique-modes/" rel="alternate"></link><published>2014-03-05T10:12:00+00:00</published><updated>2014-03-05T10:12:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2014-03-05:/~alex/blog/2014/03/05/boutique-modes/</id><summary type="html">&lt;p&gt;I've recently started a new job at &lt;a class="reference external" href="http:www.linaro.org"&gt;Linaro&lt;/a&gt; which has been keeping me very busy. My role combines the low-level fun of Dynamic Binary Translation that I so enjoyed at Transitive and the fact Linaro is a fully Open Source company. I work directly on the upstream projects (in this …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've recently started a new job at &lt;a class="reference external" href="http:www.linaro.org"&gt;Linaro&lt;/a&gt; which has been keeping me very busy. My role combines the low-level fun of Dynamic Binary Translation that I so enjoyed at Transitive and the fact Linaro is a fully Open Source company. I work directly on the upstream projects (in this case &lt;a class="reference external" href="http://wiki.qemu.org/Main_Page"&gt;QEMU&lt;/a&gt;) and with the project community. In many ways it's my ideal job.&lt;/p&gt;
&lt;p&gt;Of course I've quickly built up a reputation as the Emacs guy in the office surrounded by a sea of VIMers although one of the guys does profess a desire to learn Emacs &amp;quot;one day&amp;quot;.&lt;/p&gt;
&lt;p&gt;One of the first things I did was move all my email into Emacs. I'd long been dissatisfied with the state of Thunderbird (and previously Evolution) that I took the opportunity to migrate to &lt;a class="reference external" href="http://www.djcbsoftware.nl/code/mu/mu4e.html"&gt;mu4e&lt;/a&gt;. I spend my days slinging patches and going through mailing lists so I really appreciate being in my editor while I do that.&lt;/p&gt;
&lt;p&gt;I have also started streamlining some of my work-flow with a few specialised extensions to Emacs. I think I'm finally comfortable enough with elisp to have a pretty good stab at solving most problems. I'm also appreciating the ability to leverage the mass of Emacs code under the hood to make incremental tweaks rather than solve everything at once. I thought I might give you a tour of the code I've written so far.&lt;/p&gt;
&lt;p&gt;First up is &lt;a class="reference external" href="https://github.com/stsquad/risu/blob/aarch-with-ajb-hacks/risu.el"&gt;risu-mode&lt;/a&gt;. RISU is the code testing tool we've been using to verify our aarch64 ARM work in QEMU. The .risu file is a template that's used to specify instruction patterns that the tool then uses to generate random code sequences with. &lt;em&gt;risu-mode&lt;/em&gt; is really just a bunch of regex expressions wrapped in the mode machinery that highlights the elements on the page. It doesn't sound like much but when you are working through a bunch of patterns looking for bugs it's easier on the eye when the different elements are coloured.&lt;/p&gt;
&lt;p&gt;Next thing I wrote was my own &lt;a class="reference external" href="https://github.com/stsquad/qemu-mode/blob/master/qemu-mode.el"&gt;QEMU mode&lt;/a&gt; which is a simple comint-mode based mode for launching QEMU system emulation. It's still very rough and ready as I'm mostly working on user emulation but I suspect it will be handy once I start on system emulation stuff.&lt;/p&gt;
&lt;p&gt;Finally there is &lt;a class="reference external" href="http://git.linaro.org/people/alex.bennee/lava-mode.git"&gt;lava-mode&lt;/a&gt;. LAVA is Linaro's automated test and validation framework. Although it already provides command line and web interfaces I thought it would be nice to launch and track test jobs from within Emacs itself. The job control files a JSON based so I built on the existing json-mode and a &lt;a class="reference external" href="https://github.com/stsquad/xml-rpc/tree/extra-headers"&gt;slightly patched version of xml-rpc.el&lt;/a&gt; to add job submission. I've started a simple job tracking mode that uses the tabulated-list-mode framework and eventually I'll link it into the tracking library so job completion will be as seamless as my IRC work-flow.&lt;/p&gt;
&lt;p&gt;So there you have it, a bunch of code that may well not interest anyone else but shows how Emacs provides a very rich base of functionality on which to build up tools that are useful to you.&lt;/p&gt;
&lt;p&gt;Does anyone else want to share an example of their esoteric extensions? What's the most obscure thing you've built on top of our favourite text editor?&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="linaro"></category></entry><entry><title>Edit with Emacs v1.13 now available</title><link href="https://www.bennee.com/~alex/blog/2013/11/08/edit-with-emacs-v1-13-now-available/" rel="alternate"></link><published>2013-11-08T14:05:00+00:00</published><updated>2013-11-08T14:05:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2013-11-08:/~alex/blog/2013/11/08/edit-with-emacs-v1-13-now-available/</id><summary type="html">&lt;p&gt;I've just pushed the latest version of Edit with Emacs to the Chrome App Store. Hopefully most people are already tracking the latest edit-server.el via MELPA but this does introduce a few minor fixes to the extension itself. A new piece of functionality is the ability to trigger bringing …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've just pushed the latest version of Edit with Emacs to the Chrome App Store. Hopefully most people are already tracking the latest edit-server.el via MELPA but this does introduce a few minor fixes to the extension itself. A new piece of functionality is the ability to trigger bringing Emacs to the foreground from a key-stroke within Chrome. I added this to support running Emacs on ChromeOS which together with &lt;a class="reference external" href="https://github.com/stsquad/emacs-chromebooks"&gt;my chromebooks.el&lt;/a&gt; package gives me a rather nice development environment without having to dump ChromeOS.&lt;/p&gt;
&lt;p&gt;So new for v1.13&lt;/p&gt;
&lt;p&gt;Extension&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Change the handling of hidden elements (fix bug #78)&lt;/div&gt;
&lt;div class="line"&gt;* Add debugging for erroneous hidden text areas (#93)&lt;/div&gt;
&lt;div class="line"&gt;* Add keyboard shortcut to bring Emacs to foreground&lt;/div&gt;
&lt;div class="line"&gt;* Pass clipboard contents to foreground request&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;edit-server.el&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* add advice to save-buffers-kill-emacs to avoid prompting on shutdown&lt;/div&gt;
&lt;div class="line"&gt;* add autoload cookies&lt;/div&gt;
&lt;div class="line"&gt;* fix bug with format chars in url (#80)&lt;/div&gt;
&lt;div class="line"&gt;* don't call kill buffer hooks twice (#92)&lt;/div&gt;
&lt;div class="line"&gt;* don't set-buffer-multibyte on process buffer&lt;/div&gt;
&lt;div class="line"&gt;* support the &amp;quot;foreground&amp;quot; request with optional clipboard contents&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Get the latest from &lt;a class="reference external" href="https://chrome.google.com/webstore/detail/edit-with-emacs/ljobjlafonikaiipfkggjbhkghgicgoh"&gt;the Chrome Webstore&lt;/a&gt;.&lt;/p&gt;
</content><category term="geek"></category><category term="chrome"></category><category term="chromeos"></category><category term="chromium"></category><category term="edit with emacs"></category><category term="emacs"></category></entry><entry><title>On the death of Google Reader</title><link href="https://www.bennee.com/~alex/blog/2013/03/14/on-the-death-of-google-reader/" rel="alternate"></link><published>2013-03-14T22:17:00+00:00</published><updated>2013-03-14T22:17:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2013-03-14:/~alex/blog/2013/03/14/on-the-death-of-google-reader/</id><summary type="html">&lt;p&gt;You can probably tell the sort of on-line company I keep from the deluge of noise on the social networks regarding Google's decision to shut down Reader. However we shouldn't be that surprised. In fact some companies that source content from Reader &lt;a class="reference external" href="http://blog.feedly.com/2013/03/14/google-reader/"&gt;have anticipated the need to collect content themselves …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;You can probably tell the sort of on-line company I keep from the deluge of noise on the social networks regarding Google's decision to shut down Reader. However we shouldn't be that surprised. In fact some companies that source content from Reader &lt;a class="reference external" href="http://blog.feedly.com/2013/03/14/google-reader/"&gt;have anticipated the need to collect content themselves&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I of course will have to make a decision at some point. However I'll not do it today like a lot of Reader users have. The rush to try out alternatives has over-whelmed some &lt;a class="reference external" href="https://twitter.com/samuelclay"&gt;open source based projects&lt;/a&gt; who were quietly growing organically. I don't envy those that have to suddenly gear up their back-end systems because an Internet behemoth gave us 2593 hours notice to sort out a replacement.&lt;/p&gt;
&lt;p&gt;I'm mulling over the difference between self-hosting and having someone else do it. I'm not overly worried about going for convenience if I know I can get my data back if I need to. In fact the knowledge that you can theoretically self-host might be enough. To be fair to Google their &lt;a class="reference external" href="http://www.dataliberation.org/"&gt;Data Liberation&lt;/a&gt; team made exporting all my Reader data easy.&lt;/p&gt;
&lt;p&gt;Before I make a choice I need to decide what my priorities are. Currently I subscribe to 250+ RSS feeds. Obviously I don't read every single post but I make extensive use of tags to quickly process through stuff I do need to see when I need to see it. Aside from news, blog posts, funny cat pictures I also subscribe to other data feeds like bug trackers, code repositories, and other data sources. I of course want access to all of this data at any point on one of a number of devices. This makes a web hosted solution pretty much a must. There is no point having the data on my desktop when I'm somewhere else. From my point of view I want it to be open source compatible because if the company hosting now decides it no longer wants to I'll only have to move the data and not break my work-flow.&lt;/p&gt;
&lt;p&gt;It would also be very useful if it had a public API so others can interact with the data. I don't need the solution to be all provided by one company. It's perfectly fine to have multiple 3rd parties sorting out the Android integration. I might even look to doing something to integrate it with my favourite editor (the name of which even my non-geek readers probably know by now). So far my experiment with moving all of IRC and IM into Emacs seems to be working well and should be a subject of another post.&lt;/p&gt;
&lt;p&gt;Are you a Reader user? What are your criteria for it's eventual replacement? Is RSS just a dying protocol or is the need to aggregate and sift through data becoming more important?&lt;/p&gt;
&lt;p&gt;There may well be a much better way of solving this problem around the corner. I certainly am open to persuasion. But don't take away my current preferred solution until I'm convinced I'm ready to switch ;-)&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="floss"></category><category term="google"></category><category term="hosting"></category><category term="rss"></category></entry><entry><title>Edit with Emacs v1.12 now available</title><link href="https://www.bennee.com/~alex/blog/2012/12/03/edit-with-emacs-v1-12-now-available/" rel="alternate"></link><published>2012-12-03T21:58:00+00:00</published><updated>2012-12-03T21:58:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2012-12-03:/~alex/blog/2012/12/03/edit-with-emacs-v1-12-now-available/</id><summary type="html">&lt;p&gt;Apologies for the extended delay in getting out a new release of Edit with Emacs. Real life has been doing a good job keeping me busy that spare hacking time is in short supply. A number of people have submitted pull requests and I've also done a bit of clean-up …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Apologies for the extended delay in getting out a new release of Edit with Emacs. Real life has been doing a good job keeping me busy that spare hacking time is in short supply. A number of people have submitted pull requests and I've also done a bit of clean-up on the code.&lt;/p&gt;
&lt;p&gt;The JavaScript in the extension has had the hacky change tracking code replaced with a modern funky 21st century &lt;a class="reference external" href="https://code.google.com/p/mutation-summary/"&gt;Mutation Observer implementation&lt;/a&gt;. This should solve some of the more obvious performance problems on highly dynamic pages.&lt;/p&gt;
&lt;p&gt;I've also implemented the iterative save method for edit-server.el. Unfortunately it doesn't quite work as intended if the edited region uses encoding (e.g. longlines). In theory the buffer you have saved should have it's contents replaced with the new data from the browser but it just doesn't seem to work. For now I've just ensured the kill-ring has the real data in it so it's not overly painful to restore formatting. Patches and/or explanations are of course welcome!&lt;/p&gt;
&lt;p&gt;So grab it now from &lt;a class="reference external" href="https://chrome.google.com/webstore/detail/edit-with-emacs/ljobjlafonikaiipfkggjbhkghgicgoh"&gt;webstore&lt;/a&gt;. The changes are as follows:&lt;/p&gt;
&lt;p&gt;Extension&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Upgraded manifest to version 2 for future releases of Chrome&lt;/div&gt;
&lt;div class="line"&gt;* Added an &amp;quot;Enable Debug&amp;quot; flag to control logging to console&lt;/div&gt;
&lt;div class="line"&gt;* Use Mutation Observers to better track changes in dynamic DOMs&lt;/div&gt;
&lt;div class="line"&gt;* Fake a keypress when updating the textarea&lt;/div&gt;
&lt;div class="line"&gt;* Bug fix for handling editable DIV elements&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;edit-server.el&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Now available from the MELPA package archive!&lt;/div&gt;
&lt;div class="line"&gt;* Beta support for iterative C-x C-s saving (it works but is ugly, see kill-ring)&lt;/div&gt;
&lt;div class="line"&gt;* Default to using UTF-8 coding for process communication&lt;/div&gt;
&lt;div class="line"&gt;* Raise existing frame consistently on Mac&lt;/div&gt;
&lt;div class="line"&gt;* Tweak the portion of the URL used to name buffers&lt;/div&gt;
&lt;/div&gt;
</content><category term="geek"></category><category term="edit with emacs"></category><category term="emacs"></category></entry><entry><title>Many ways to skin a GNU</title><link href="https://www.bennee.com/~alex/blog/2012/07/24/many-ways-to-skin-a-gnu/" rel="alternate"></link><published>2012-07-24T15:09:00+01:00</published><updated>2012-07-24T15:09:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2012-07-24:/~alex/blog/2012/07/24/many-ways-to-skin-a-gnu/</id><summary type="html">&lt;p&gt;It's time for another examination of Emacs LISP and a selection of ways to solve the same problem. In this case it's the behaviour of the &lt;em&gt;etags-select&lt;/em&gt; package. This handy function will present a selection table when it finds multiple definitions of the same tag. This is handy if your …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It's time for another examination of Emacs LISP and a selection of ways to solve the same problem. In this case it's the behaviour of the &lt;em&gt;etags-select&lt;/em&gt; package. This handy function will present a selection table when it finds multiple definitions of the same tag. This is handy if your global TAGs file contains reference to multiple binaries that might have a common code heritage. It even provides a handy function &lt;em&gt;etags-select-find-tag-at-point&lt;/em&gt; which will check &lt;em&gt;point&lt;/em&gt; to see if that is a tag. However if &lt;em&gt;point&lt;/em&gt; is on a blank line I'd prefer it to just prompt me for a tag name.&lt;/p&gt;
&lt;p&gt;First version:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(defun my-naive-find-tag ()
  &amp;quot;Find at point or fall back&amp;quot;
  (interactive)
  (unless (etags-select-find-tag-at-point)
    (etags-select-find-tag)))
&lt;/pre&gt;
&lt;p&gt;Unfortunately this fails rather badly. I naively assumed &lt;em&gt;etags-select-find-tag-at-point&lt;/em&gt; would return &lt;em&gt;'nil&lt;/em&gt; on failure. Instead it bombs out with an error because &lt;em&gt;etags-select-find&lt;/em&gt; expects a parameter and when &lt;em&gt;find-tag-default&lt;/em&gt; fails it errors out.&lt;/p&gt;
&lt;p&gt;Second version:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(defun my-working-find-tag()
  &amp;quot;Find tag and call etags-select-find-tag-at-point if it will work&amp;quot;
  (interactive)
  (if (find-tag-default)
      (etags-select-find-tag-at-point)
    (etags-select-find-tag)))
&lt;/pre&gt;
&lt;p&gt;This works by checking &lt;em&gt;find-tag-default&lt;/em&gt; will work before calling &lt;em&gt;etags-select-find-tag-at-point&lt;/em&gt;. Of course there is some duplication here because &lt;em&gt;find-tag-default&lt;/em&gt; will get called again once I know it will work. Dissatisfied I asked the &lt;a class="reference external" href="%20http://stackoverflow.com/questions/11578723/whats-the-best-way-in-elisp-to-trap-an-error-case"&gt;stackoverflow&lt;/a&gt; community for suggestions. The first solution is to simply trap the error case.&lt;/p&gt;
&lt;p&gt;Third version:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(defun my-try-except-find-tag()
  &amp;quot;Find at point or fall to etags-select-find-tag on error&amp;quot;
  (interactive)
  (unless (ignore-errors (or (etags-select-find-tag-at-point) 't))
    (etags-select-find-tag)))
&lt;/pre&gt;
&lt;p&gt;This works by utilising deep lisp black magic to stop the error propagating and returning a 'nil if it does. The &lt;em&gt;(or (etags-select-find-tag-at-point) 't)&lt;/em&gt; line is to ensure a successful call returns something so we don't then fall through. Interestingly the comments around &lt;em&gt;subr.el&lt;/em&gt; mentions some of the keywords used may be redefined by common lisp.&lt;/p&gt;
&lt;p&gt;Forth version:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(defun my-efficent-find-tag()
  &amp;quot;Find tag at point, caching find-tag-default&amp;quot;
  (interactive)
  (let ((ftd (find-tag-default)))
    (flet ((find-tag-default () ftd))
      (if (find-tag-default)
          (etags-select-find-tag-at-point)
        (etags-select-find-tag)))))
&lt;/pre&gt;
&lt;p&gt;While I expected something like &lt;em&gt;ignore-errors&lt;/em&gt; to exist this demonstrates the flexibility of dynamic languages like Emacs Lisp. The key is the use of &lt;em&gt;flet&lt;/em&gt; to redefine &lt;em&gt;find-tag-default&lt;/em&gt; so when it gets executed again inside &lt;em&gt;etags-select-find-tag-at-point&lt;/em&gt; it simply returns the cached value.&lt;/p&gt;
&lt;p&gt;So as usual with these posts I try to invite feedback. Which of these forms do you prefer? Would you solve the problem another way? Have you just learnt something new about Emacs Lisp?&lt;/p&gt;
</content><category term="geek"></category><category term="code"></category><category term="elisp"></category><category term="emacs"></category></entry><entry><title>Living la vida ELPA</title><link href="https://www.bennee.com/~alex/blog/2012/07/10/living-la-vida-elpa/" rel="alternate"></link><published>2012-07-10T12:45:00+01:00</published><updated>2012-07-10T12:45:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2012-07-10:/~alex/blog/2012/07/10/living-la-vida-elpa/</id><summary type="html">&lt;p&gt;I've been running Emacs 24 direct from the version control tree (technically a git mirror, bzr still confuses me) for some time now. As many people have mentioned ELPA is one of the big features that helps de-clutter an Emacs users ~/.emacs.d directory. I thought it might be a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been running Emacs 24 direct from the version control tree (technically a git mirror, bzr still confuses me) for some time now. As many people have mentioned ELPA is one of the big features that helps de-clutter an Emacs users ~/.emacs.d directory. I thought it might be a useful exercise to discuss which packages I'm now loading from ELPA and which I still track directly.&lt;/p&gt;
&lt;p&gt;First and formemost is my &lt;a class="reference external" href="https://github.com/stsquad/my-emacs-stuff"&gt;my dotemacs collection&lt;/a&gt;. Weighing in at around 2700 lines of elisp it's small by some standards. I've toyed with moving my config across to things like the &lt;a class="reference external" href="https://github.com/technomancy/emacs-starter-kit/"&gt;Emacs Starter Kit&lt;/a&gt; but I'm not sure if it's worth the transition pain. There is certainly a lot of cruft in my code but there is also quite a lot of muscle memory now invested in it. I have been trying to modularise it a little more but to be honest most of that was driven by a desire to get autoload working nicely which is no longer much of an issue as my session tends to stay up for weeks at an end.&lt;/p&gt;
&lt;p&gt;I'll gloss over edit-server.el surfice it to say I'd hope your not surprised I keep the development version running given it's for &lt;a class="reference external" href="https://github.com/stsquad/emacs_chrome"&gt;my extension&lt;/a&gt; ;-)&lt;/p&gt;
&lt;p&gt;After that we have Johnathan Rockway's &lt;a class="reference external" href="https://github.com/jrockway/eproject"&gt;eproject&lt;/a&gt;. I work with lots of code bases during the day and some sort of sensible project type structure is a must. I've tried a number of different solutions and this one stuck as it was fairly lightweight and easy for my smaller lisp brain to extend. I've even managed to contribute some changes back. As a result I find tracking the bleeding edge of development useful.&lt;/p&gt;
&lt;p&gt;The same reason applies to Stephen Bach's &lt;a class="reference external" href="https://github.com/sjbach/lusty-emacs"&gt;lusty-emacs&lt;/a&gt;. While ido-mode and ibuffer work well for speed nothing matches lusty's lazy file and buffer matching. It can get a little too much once you start dealing with hundreds of buffers at a time (something &lt;em&gt;midnight-mode&lt;/em&gt; is trying to keep on top of). It's still seeing some activitiy on the repository hence the local checkout.&lt;/p&gt;
&lt;p&gt;Finally the biggie but generally unused &lt;a class="reference external" href="http://cedet.sourceforge.net/"&gt;cedet&lt;/a&gt;. There has been some work to make it comparitively easy to run out of a src checkout and as long as it's included early enough it won't conflict with the built in cedet shipping with Emacs 23+. I still haven't really made much use of it although I have managed to get a completion out of it when editing some C. It's basically sitting there until I can commit enough time to figuring out how to use the beast.&lt;/p&gt;
&lt;p&gt;Finally a quick review of the ELPA packages that I've got loaded. Obviously there is the latest &lt;em&gt;org-mode&lt;/em&gt; which I'm spending an increasing amount of time in. I also have my favourite &lt;em&gt;zenburn-theme&lt;/em&gt; for easy on the eyes goodness. The popular GIT interaction mode &lt;em&gt;magit&lt;/em&gt; also sits there which I use every day. &lt;em&gt;js2-mode&lt;/em&gt; and &lt;em&gt;ssh_config_mode&lt;/em&gt; completes the list of modules that I actually use.&lt;/p&gt;
&lt;p&gt;I have a number of additional things in there which I don't actually use at the moment but I plan to try out including &lt;em&gt;nose&lt;/em&gt; (for python unit test), &lt;em&gt;jsshell&lt;/em&gt; (for JavaScript coding) and another one I see a lot of the wizards using &lt;em&gt;yasnippet&lt;/em&gt; but again is awaiting time to play with.&lt;/p&gt;
&lt;p&gt;So what ELPA packages have you discovered and what hidden gems to you track directly in your .emacs.d?&lt;/p&gt;
</content><category term="geek"></category><category term="elpa"></category><category term="emacs"></category><category term="git"></category></entry><entry><title>Edit with Emacs v1.11</title><link href="https://www.bennee.com/~alex/blog/2012/05/23/edit-with-emacs-v1-11/" rel="alternate"></link><published>2012-05-23T15:57:00+01:00</published><updated>2012-05-23T15:57:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2012-05-23:/~alex/blog/2012/05/23/edit-with-emacs-v1-11/</id><summary type="html">&lt;p&gt;I haven't really had much time for hacking at home unless programming my daughters &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Wetware_(brain)"&gt;wetware&lt;/a&gt; counts. However a few enterprising users have been sending me in some pull requests that fix a few minor bugs that slipped through the extensive pre-release testing I did for v1.10 so I thought …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I haven't really had much time for hacking at home unless programming my daughters &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Wetware_(brain)"&gt;wetware&lt;/a&gt; counts. However a few enterprising users have been sending me in some pull requests that fix a few minor bugs that slipped through the extensive pre-release testing I did for v1.10 so I thought it was worth pushing out a bug-fix release:&lt;/p&gt;
&lt;p&gt;Extension&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Fixed some breakage to the &amp;quot;edit focused area&amp;quot; feature&lt;/div&gt;
&lt;div class="line"&gt;* Fixed broken link to embedded edit-server&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;edit-server.el&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* A couple of fixes for Emacs 24 compatibility&lt;/div&gt;
&lt;div class="line"&gt;* Globalize the minor mode so it persists through major-mode changes&lt;/div&gt;
&lt;/div&gt;
</content><category term="geek"></category><category term="edit with emacs"></category><category term="emacs"></category></entry><entry><title>Now a Windows user!</title><link href="https://www.bennee.com/~alex/blog/2012/05/01/now-a-windows-user/" rel="alternate"></link><published>2012-05-01T13:50:00+01:00</published><updated>2012-05-01T13:50:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2012-05-01:/~alex/blog/2012/05/01/now-a-windows-user/</id><summary type="html">&lt;p&gt;I've finally buckled and now have a Windows laptop. It was mainly forced on me by the need to have some sort of access to the intranet during the large number of meetings I'm now involved in at work. I have to say the experience has been enlightening, especially seeing …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've finally buckled and now have a Windows laptop. It was mainly forced on me by the need to have some sort of access to the intranet during the large number of meetings I'm now involved in at work. I have to say the experience has been enlightening, especially seeing all the hacky stuff that has to be done to get things working under Windows. For example by default I couldn't connect to any https (SSL) pages. Luckily I can just hand the laptop back to IT to fix it so I don't have to scratch my head too much.&lt;/p&gt;
&lt;p&gt;I've had only sporadic luck getting Emacs up and running on it though. Having been running the tip-of-tree release on my Linux workstation so long going back to Emacs 23 has been a bit of a retrograde step. It doesn't help there are multiple suggestions for installation. I've been trying to get &lt;a class="reference external" href="http://ourcomments.org/Emacs/EmacsW32.html"&gt;EmacsW32&lt;/a&gt; working but I've run into &lt;a class="reference external" href="http://stackoverflow.com/questions/885793/emacs-error-when-calling-server-start"&gt;problems on start-up&lt;/a&gt;. So far I've been unable to fix the issue as the paths Emacs references don't seem to show up in the system file browser. This seems to be the only avenue by which I can fix the permissions it's complaining about.&lt;/p&gt;
&lt;p&gt;Getting my init file onto the system and in the right place has also proved to be more complex than it should have been (there seems to be two &amp;quot;HOME&amp;quot; directories, one under a Roaming title). The Windows shell has finally gained completion but it's still a shadow of a decent Unix shell. On the positive side I can already run &lt;a class="reference external" href="http://emacswiki.org/emacs/CategoryEshell"&gt;eshell&lt;/a&gt; from within Emacs which provides a nice alternative to the command shell. I've yet to get tramp working though but I suspect that's just a case of getting ssh keys sorted out.&lt;/p&gt;
&lt;p&gt;If there are better solutions to getting a decent Emacs set-up on Windows I'm all ears.&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="windows"></category></entry><entry><title>Switching buffers and Google+</title><link href="https://www.bennee.com/~alex/blog/2012/01/24/switching-buffers-and-google/" rel="alternate"></link><published>2012-01-24T08:36:00+00:00</published><updated>2012-01-24T08:36:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2012-01-24:/~alex/blog/2012/01/24/switching-buffers-and-google/</id><summary type="html">&lt;p&gt;When you do so much of your work in one text editor the efficiency of switching between buffers becomes more important. For a long time I've had two bindings &amp;quot;C-x b&amp;quot; and &amp;quot;C-x C-b&amp;quot; which in days of yore I had bound to &lt;em&gt;bs-show&lt;/em&gt; and a hacked up &lt;em&gt;list-buffers&lt;/em&gt; that …&lt;/p&gt;</summary><content type="html">&lt;p&gt;When you do so much of your work in one text editor the efficiency of switching between buffers becomes more important. For a long time I've had two bindings &amp;quot;C-x b&amp;quot; and &amp;quot;C-x C-b&amp;quot; which in days of yore I had bound to &lt;em&gt;bs-show&lt;/em&gt; and a hacked up &lt;em&gt;list-buffers&lt;/em&gt; that opened another window. These are broadly the &amp;quot;quick switch between working buffers&amp;quot; and &amp;quot;show me all the buffers&amp;quot;.&lt;/p&gt;
&lt;p&gt;For some time I've relegated &lt;em&gt;bs-show&lt;/em&gt; to the longer binding and now use Stephen Bach's excellent &lt;a class="reference external" href="https://github.com/sjbach/lusty-emacs"&gt;Lusty Explorer&lt;/a&gt; which works really well when you know the name of the buffer and it's fairly unique. However when you've been going a while it can get un-manageable with a large number of open buffers, especially if you've opened second copy of a file from another source tree. This is what I would use the old classic &lt;em&gt;bs-show&lt;/em&gt; for.&lt;/p&gt;
&lt;p&gt;A few days ago I discovered &lt;a class="reference external" href="http://www.emacswiki.org/emacs/IbufferMode"&gt;ibuffer-mode&lt;/a&gt; with it's &lt;em&gt;ibuffer-bs-show&lt;/em&gt; buffer navigator. Looking back through the Planet Emacsen history I can see it has been mentioned before and given it's been in Emacs since version 22 I'm surprised I hadn't cottoned on to it earlier.&lt;/p&gt;
&lt;p&gt;One thing that might have put me off is the initial buffer list can be quite sparse. By default you only see buffers with files associated which misses out IRC, Edit with Emacs and *scratch* buffers. However hit &amp;quot;h&amp;quot; and you'll see there are a plethora of quick keys for chaning the view. A quick &amp;quot;//&amp;quot; and all filters are removed and you can quickly filter by different criteria. To get the most out of the mode you'll probably want to set up some custom filters (&amp;quot;/r&amp;lt;completing filter name&amp;quot;&amp;gt;) to make quickly switching to groups of buffers easy. I currently have &amp;quot;work&amp;quot;, &amp;quot;remote&amp;quot;, &amp;quot;irc&amp;quot; and &amp;quot;logs&amp;quot; as filters. You can filter by name as well as major-mode.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;ibuffer-mode&lt;/em&gt; does have the concept of Filter Groups although I'm not sure what they add on top of having normal filters which as far as I can tell can be arbitrarily complex. It also has some quite handy sorting and selection modes e.g. &amp;quot;sv&amp;quot; - sort by last viewing time. Given the amount of space the wiki devotes &lt;a class="reference external" href="http://www.emacswiki.org/emacs/CategoryBufferSwitching"&gt;to the topic&lt;/a&gt; I wish I'd re-examined my buffer switching habits sooner. The change is already paying dividends for my productivity.&lt;/p&gt;
&lt;p&gt;Before I go I thought I'd put in a quick mention of Google+. There is growing community of fellow Emacs users starting to post on it. One thing that attracts me to Google+ over Facebook (too data-miney) and Twitter (too short) is the concept of &amp;quot;Circles&amp;quot;. It makes sharing geeky Emacs posts with people that might actually care easy while sparing them the flood of baby pictures I share with friends and family. If you'd like to &lt;a class="reference external" href="https://plus.google.com/110732415405459842150/posts"&gt;follow me&lt;/a&gt; or my &lt;a class="reference external" href="https://plus.google.com/b/109717789196934058146/"&gt;alter-ego&lt;/a&gt; please do mention Emacs in your profile or in a message so I can assign you to the correct circles.&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="google"></category><category term="ibuffer"></category></entry><entry><title>Getting organised</title><link href="https://www.bennee.com/~alex/blog/2012/01/13/getting-organised/" rel="alternate"></link><published>2012-01-13T10:38:00+00:00</published><updated>2012-01-13T10:38:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2012-01-13:/~alex/blog/2012/01/13/getting-organised/</id><summary type="html">&lt;p&gt;What with becoming a parent and getting promoted I suddenly find myself needing to become a lot more organised. Although I've been using &lt;a class="reference external" href="http://orgmode.org/"&gt;org-mode&lt;/a&gt; for a bit I need to get a lot more organised with it.&lt;/p&gt;
&lt;p&gt;Previously I had two sets of org notes. My personal set where sitting …&lt;/p&gt;</summary><content type="html">&lt;p&gt;What with becoming a parent and getting promoted I suddenly find myself needing to become a lot more organised. Although I've been using &lt;a class="reference external" href="http://orgmode.org/"&gt;org-mode&lt;/a&gt; for a bit I need to get a lot more organised with it.&lt;/p&gt;
&lt;p&gt;Previously I had two sets of org notes. My personal set where sitting on my server which I could access via the terminal. I generally accessed this at home on the odd occasion when I was doing things like the annual round of insurance quote gathering. The second set was a fairly simple time sheet type affair that I was using at work to keep a vague track of where all my time was spent. The big missing part of this is when I'm on the move.&lt;/p&gt;
&lt;p&gt;I've just recently upgraded my phone to the latest &lt;a class="reference external" href="http://www.bennee.com/~alex/blog/2012/01/06/nexus-of-possibilities/"&gt;Galaxy Nexus&lt;/a&gt; which is a fine Google enabled device. I make no apologies for using Google's calendering and shared document services. They work very well and importantly allow me to share things with my wife who doesn't quite share my desire to run everything from a text editor. However for my personal task lists on the move and remembering what's coming up at work it doesn't quite cut it. Besides I like org-mode and I'd heard about &lt;a class="reference external" href="http://mobileorg.ncogni.to/"&gt;MobileOrg&lt;/a&gt; so I endeavoured to set it up.&lt;/p&gt;
&lt;p&gt;MobileOrg has been around some time for the iPhone but the mechanisms it uses for integrating with org-mode are fairly well documented. As a result there is a couple of Android implementations for it. Matthew Jone's &lt;a class="reference external" href="https://github.com/matburt/mobileorg-android"&gt;mobileorg-android&lt;/a&gt; was the first version I tried.&lt;/p&gt;
&lt;p&gt;The original sync method for MobileOrg was to use a service like Dropbox to sync files. Given the history of Dropbox's security I wasn't about to move my files into the proprietary cloud. The alternative is to enable &lt;a class="reference external" href="http://en.wikipedia.org/wiki/WebDAV"&gt;WebDAV&lt;/a&gt; on my web-server and therefor enable two way communication via HTTP. It was a little concerning to see self-signed SSL wasn't supported as this does open up a potential attack vector on my machine. I've mitigated it a little by using digest authentication instead of basic-auth but I'd still prefer to be conducting these read-write operations over something more secure.&lt;/p&gt;
&lt;p&gt;Initial results were a little underwhelming. After some messing around with the format of org-links I eventually got a basic outline summary up. Unfortunately I can't seem to sync notes created on my phone to the server. This seems to be a Apache problem which I shall have to dig into later.&lt;/p&gt;
&lt;p&gt;After perusing the market some more I noticed there is a new project in town. Konstantin's &lt;a class="reference external" href="https://github.com/kvj/mobileorg-android"&gt;MobileOrgNG&lt;/a&gt; was forked some time ago from Matthew's code and on installing I found it looked an awful lot better. I've still be unable to post any locally added notes (due to previously mentioned Apache config issues). However it's presentation is a lot slicker and it shows a lot of potential for being a good MobileOrg client.&lt;/p&gt;
&lt;p&gt;I'm now stuck with a classic open source fork dilemma. The code bases look to have diverged enough that these two projects are essential going their own way. Looking at the two &lt;a class="reference external" href="https://github.com/matburt/mobileorg-android/graphs/impact"&gt;impact&lt;/a&gt; &lt;a class="reference external" href="https://github.com/kvj/mobileorg-android/graphs/impact"&gt;graphs&lt;/a&gt; it looks like they diverged around August 2011 and since then MobileOrgNG looks pretty much like a solo effort albeit with an impressive commit rate of new features.&lt;/p&gt;
&lt;p&gt;So the questions for my readers. Which code base should I jump on? Has anyone got experience with the two different code bases and the reason they split? Are there any other Android clients for org-mode I should be looking at?&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="life"></category><category term="org-mode"></category></entry><entry><title>Edit with Emacs v1.10 released</title><link href="https://www.bennee.com/~alex/blog/2011/11/06/edit-with-emacs-v1-10-released/" rel="alternate"></link><published>2011-11-06T20:25:00+00:00</published><updated>2011-11-06T20:25:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2011-11-06:/~alex/blog/2011/11/06/edit-with-emacs-v1-10-released/</id><summary type="html">&lt;p&gt;I received a bunch of feedback and patches from my last announcement but I think all the outstanding bugs are now squashed. The edit-server.el has seen some love to make it more idiomatically correct for elisp. The main change is new code to handle editable DIV tags beloved of …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I received a bunch of feedback and patches from my last announcement but I think all the outstanding bugs are now squashed. The edit-server.el has seen some love to make it more idiomatically correct for elisp. The main change is new code to handle editable DIV tags beloved of such sites as Google+ (which you are welcome to &lt;a class="reference external" href="https://plus.google.com/u/0/110732415405459842150/posts"&gt;follow me on&lt;/a&gt;, maybe I should have an elisp circle?).&lt;/p&gt;
&lt;p&gt;A big cosmetic change is a brand new settings page which looks less like a web-form from the early 90's and more like part of Chrome. Alas I can take no credit for this but can thank Frank Kohlhepp's &lt;a class="reference external" href="https://github.com/frankkohlhepp/fancy-settings"&gt;fancy-settings&lt;/a&gt; library. In fact a lot of the credit should go to third party libraries like &lt;a class="reference external" href="http://jquery.com/"&gt;jQuery&lt;/a&gt; and of course the growing list of contributors who have submitted code for merging.&lt;/p&gt;
&lt;p&gt;So the final changelog for 1.10 is:&lt;/p&gt;
&lt;p&gt;Extension&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Ignore textareas marked as read only&lt;/div&gt;
&lt;div class="line"&gt;* Don't tag areas that are not visible&lt;/div&gt;
&lt;div class="line"&gt;* General clean-up to use jQuery to find elements&lt;/div&gt;
&lt;div class="line"&gt;* Explicit CSS for edit button to override page settings&lt;/div&gt;
&lt;div class="line"&gt;* Handle editable DIV blocks (e.g. Google+)&lt;/div&gt;
&lt;div class="line"&gt;* Optimise the finding of text areas for highly dynamic pages&lt;/div&gt;
&lt;div class="line"&gt;* Revamp the settings page with &amp;quot;Fancy Settings&amp;quot;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;edit-server.el&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Allow customisation of edit-server-default-major-mode&lt;/div&gt;
&lt;div class="line"&gt;* Allow edit mode to be set by matched URL&lt;/div&gt;
&lt;div class="line"&gt;* Tweak detection of MacOS X Emacsen&lt;/div&gt;
&lt;div class="line"&gt;* Change behaviour of C-x C-s to save to kill-ring&lt;/div&gt;
&lt;div class="line"&gt;* Persist the buffer-local variables beyond mode changes&lt;/div&gt;
&lt;div class="line"&gt;* Setup keymap within defvar&lt;/div&gt;
&lt;div class="line"&gt;* Clean-ups to code to be more idiomatic.&lt;/div&gt;
&lt;/div&gt;
</content><category term="geek"></category><category term="chrome"></category><category term="chromium"></category><category term="edit with emacs"></category><category term="emacs"></category><category term="javascript"></category><category term="jquery"></category></entry><entry><title>Call for testing for Edit with Emacs</title><link href="https://www.bennee.com/~alex/blog/2011/10/30/call-for-testing-for-edit-with-emacs/" rel="alternate"></link><published>2011-10-30T22:55:00+00:00</published><updated>2011-10-30T22:55:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2011-10-30:/~alex/blog/2011/10/30/call-for-testing-for-edit-with-emacs/</id><summary type="html">&lt;p&gt;I've been doing a bunch of house-keeping on Edit with Emacs recently in preparation for a new release. I can only apologise to those people who have submitted patches and merge requests for my tardiness. I'm afraid Real Life &lt;sup&gt;tm&lt;/sup&gt; has been taking precedence.&lt;/p&gt;
&lt;p&gt;As regular readers of the non-emacs …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been doing a bunch of house-keeping on Edit with Emacs recently in preparation for a new release. I can only apologise to those people who have submitted patches and merge requests for my tardiness. I'm afraid Real Life &lt;sup&gt;tm&lt;/sup&gt; has been taking precedence.&lt;/p&gt;
&lt;p&gt;As regular readers of the non-emacs sections of my blog will be aware my recreational coding time is about to be severely curtailed. As it's been a while since the last release and a number of new features have been added it would be nice to get some wider testing. I therefor am hoping to elicit the help of the Emacs community to &lt;a class="reference external" href="https://github.com/stsquad/emacs_chrome"&gt;check out the code&lt;/a&gt; and give the tires a bit of a kick before I push out the final release to &amp;quot;the cloud&amp;quot;. I'd rather not regress behaviour for the 1917 users who get Edit with Emacs from the Chrome store just before I disappear into a haze of nappies and parental responsibilities. The current changes over the last release are:&lt;/p&gt;
&lt;p&gt;Extension&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Ignore textareas marked as read only&lt;/div&gt;
&lt;div class="line"&gt;* Don't tag areas that are not visible&lt;/div&gt;
&lt;div class="line"&gt;* General clean-up to use jQuery to find elements&lt;/div&gt;
&lt;div class="line"&gt;* Explicit CSS for edit button to override page settings&lt;/div&gt;
&lt;div class="line"&gt;* Handle editable DIV blocks (e.g. Google+)&lt;/div&gt;
&lt;div class="line"&gt;* Optimise the finding of text areas for highly dynamic pages&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;edit-server.el&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Allow customisation of edit-server-default-major-mode&lt;/div&gt;
&lt;div class="line"&gt;* Allow edit mode to be set by matched URL&lt;/div&gt;
&lt;div class="line"&gt;* Tweak detection of MacOS X Emacsen&lt;/div&gt;
&lt;div class="line"&gt;* Change behaviour of C-x C-s to save to kill-ring&lt;/div&gt;
&lt;/div&gt;
</content><category term="geek"></category><category term="edit with emacs"></category><category term="emacs"></category></entry><entry><title>org-mode and clocking in</title><link href="https://www.bennee.com/~alex/blog/2011/09/20/org-mode-and-clocking-in/" rel="alternate"></link><published>2011-09-20T17:06:00+01:00</published><updated>2011-09-20T17:06:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2011-09-20:/~alex/blog/2011/09/20/org-mode-and-clocking-in/</id><summary type="html">&lt;p&gt;I've recently started using &lt;a class="reference external" href="http://orgmode.org/"&gt;org-mode&lt;/a&gt;'s time tracking to keep track of what I spend my time doing at work. This was in response to being asked by one of my managers what I spend my time doing and basically being forced to guess.&lt;/p&gt;
&lt;p&gt;Setting up a clock page is …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've recently started using &lt;a class="reference external" href="http://orgmode.org/"&gt;org-mode&lt;/a&gt;'s time tracking to keep track of what I spend my time doing at work. This was in response to being asked by one of my managers what I spend my time doing and basically being forced to guess.&lt;/p&gt;
&lt;p&gt;Setting up a clock page is fairly simple. It's then just a case of C-c C-x C-i and C-c C-x C-o on the appropriate sub tasks. Dynamic blocks can then be added to your org-document to generate &lt;a class="reference external" href="http://orgmode.org/manual/The-clock-table.html#The-clock-table"&gt;weekly, monthly or annual reports&lt;/a&gt; based on the clock lines in the document.&lt;/p&gt;
&lt;p&gt;So far the results have been illuminating and certainly shows how optimistic I can be in predicting how much time I spend doing my core job hacking on the code. However one thing that is captured but hard to summarise is interruption cost. I've taken to switching task every-time I'm interrupted in person or by phone call (I'm not counting IM/IRC as it's less disruptive). I can eyeball the raw data and see that some weeks are exceptionally bad for task switching. However what would useful is a break-down of mean and median clock lengths against each task to give some sort of indication of how much straight line hacking I've gotten done. I have a feeling the :formula and :formatter options could be used for this but I've been struggling to find any example. Does anyone do a similar analysis with their org-mode clock data?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATED&lt;/strong&gt;: fixed keystrokes.&lt;/p&gt;
</content><category term="geek"></category><category term="clocks"></category><category term="emacs"></category><category term="org-mode"></category><category term="time"></category></entry><entry><title>Perils of bleeding edge</title><link href="https://www.bennee.com/~alex/blog/2011/07/27/perils-of-bleeding-edge/" rel="alternate"></link><published>2011-07-27T16:55:00+01:00</published><updated>2011-07-27T16:55:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2011-07-27:/~alex/blog/2011/07/27/perils-of-bleeding-edge/</id><summary type="html">&lt;p&gt;I've taken to running the latest &lt;em&gt;emacs&lt;/em&gt; from a source tree install. It works well enough and additional modes I use have been liberally ${VC} fetched into my &lt;em&gt;.emacs.d&lt;/em&gt;. However there are still a number of packages I'd like to use from Debian's emacs version agnostic site-lisp directories. I …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've taken to running the latest &lt;em&gt;emacs&lt;/em&gt; from a source tree install. It works well enough and additional modes I use have been liberally ${VC} fetched into my &lt;em&gt;.emacs.d&lt;/em&gt;. However there are still a number of packages I'd like to use from Debian's emacs version agnostic site-lisp directories. I came up with this:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
 ;; Add site-lisp to search path
;
; This is a work-around function for when I'm running bleeding
; emacs from the source tree but still want Debian's developer
; tools. I'd caution about having too many extra packages about that
; have been merged into the source tree (cedet etc) lest it get
; confused.
(defun load-debian-site-lisp()
&amp;quot;Attempt to load Debian's site-lisp if it's there&amp;quot;
  (interactive)
  (when (and (not (member &amp;quot;/usr/share/emacs/site-lisp&amp;quot; load-path))
             (fboundp 'normal-top-level-add-subdirs-to-load-path))
          (let* ((default-directory &amp;quot;/usr/share/emacs/site-lisp&amp;quot;))
      (normal-top-level-add-subdirs-to-load-path))))

(load-debian-site-lisp)
&lt;/pre&gt;
&lt;p&gt;Which seems to work well enough to give me my &lt;em&gt;debian-changelog-mode&lt;/em&gt; back. However it's still not seamless as I have to manually &lt;em&gt;(require 'debian-changelog-mode)&lt;/em&gt; before loading a changelog which forces the issue with local variables. I suspect I'll have to replicate the boilerplate that &lt;em&gt;/usr/share/emacs/site-lisp/debian-startup.el&lt;/em&gt; does but I can't use because it doesn't degrade gracefully if no &lt;em&gt;debian-emacs-flavour&lt;/em&gt; is defined. Suggestions for making this behaviour neater would be useful....&lt;/p&gt;
</content><category term="geek"></category><category term="elisp"></category><category term="emacs"></category></entry><entry><title>completion-ignored-extensions</title><link href="https://www.bennee.com/~alex/blog/2011/04/13/completion-ignored-extensions/" rel="alternate"></link><published>2011-04-13T16:27:00+01:00</published><updated>2011-04-13T16:27:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2011-04-13:/~alex/blog/2011/04/13/completion-ignored-extensions/</id><summary type="html">&lt;p&gt;I've been using the rather spiffy &lt;a class="reference external" href="http://www.emacswiki.org/emacs/LustyExplorer"&gt;Lusty Explorer&lt;/a&gt; for some time for my buffer and file finding. However it (I thought) had a rather annoying bug where I could never tab directly into some of the repositories I was hacking on. Eventually I figured out that the problem was down …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been using the rather spiffy &lt;a class="reference external" href="http://www.emacswiki.org/emacs/LustyExplorer"&gt;Lusty Explorer&lt;/a&gt; for some time for my buffer and file finding. However it (I thought) had a rather annoying bug where I could never tab directly into some of the repositories I was hacking on. Eventually I figured out that the problem was down to the way I name them.&lt;/p&gt;
&lt;p&gt;My naming scheme for any repository is generally to add the version control extension to the directory. This is more for my benefit than emacs as it's quite capable of working this out for itself in any given repo. However it turns out that Lusty was being a good emacs citizen and using the variable &lt;em&gt;completion-ignored-extensions&lt;/em&gt; which included the pattern &amp;quot;.git/&amp;quot; and duly hiding my repo directories from completion. In fact there are a number of patterns in there which should probably be more specific. I wrote this to fix the problem:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(setq completion-ignored-extensions
      (mapcar '(lambda (ext)
                 (if (string-equal &amp;quot;/&amp;quot; (substring ext -1 nil))
                     (concat &amp;quot;^&amp;quot; ext)
                   ext)) completion-ignored-extensions))
&lt;/pre&gt;
&lt;p&gt;It still seems a little ugly to me so given the &lt;a class="reference external" href="http://www.bennee.com/~alex/blog/2010/08/10/looping-in-lisp/"&gt;last time I berated elisp's style&lt;/a&gt; gained so many useful suggestions I'd welcome improvements.&lt;/p&gt;
</content><category term="geek"></category><category term="code"></category><category term="elisp"></category><category term="emacs"></category><category term="examples"></category></entry><entry><title>Edit with Emacs v1.9</title><link href="https://www.bennee.com/~alex/blog/2011/03/09/edit-with-emacs-v1-9/" rel="alternate"></link><published>2011-03-09T22:22:00+00:00</published><updated>2011-03-09T22:22:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2011-03-09:/~alex/blog/2011/03/09/edit-with-emacs-v1-9/</id><summary type="html">&lt;p&gt;It's been a while so I thought I'd push out a new version of &lt;a class="reference external" href="https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh/publish-accepted"&gt;Edit with Emacs&lt;/a&gt;to the interwebs. Unfortunately I wasn't able to &lt;a class="reference external" href="https://github.com/stsquad/emacs_chrome/commits/interactive_rebase/"&gt;wrangle the edit-server.el&lt;/a&gt; to reliably handle keeping the current frame open for iterative editing. For now this feature is only available via the python …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It's been a while so I thought I'd push out a new version of &lt;a class="reference external" href="https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh/publish-accepted"&gt;Edit with Emacs&lt;/a&gt;to the interwebs. Unfortunately I wasn't able to &lt;a class="reference external" href="https://github.com/stsquad/emacs_chrome/commits/interactive_rebase/"&gt;wrangle the edit-server.el&lt;/a&gt; to reliably handle keeping the current frame open for iterative editing. For now this feature is only available via the python server. Patches are of course welcome!&lt;/p&gt;
&lt;p&gt;v1.9&lt;/p&gt;
&lt;p&gt;Extension&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Support for iterative editing (python server only currently)&lt;/div&gt;
&lt;div class="line"&gt;* Add context menu while in text area box&lt;/div&gt;
&lt;div class="line"&gt;* Fix reference to Alt-E, it's actually Alt-Enter&lt;/div&gt;
&lt;div class="line"&gt;* Trigger a DOM change() event when we update the text area&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;edit-server.el&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Actively encode responses as UTF-8&lt;/div&gt;
&lt;div class="line"&gt;* Make edit-server-edit-mode a minor mode instead of a derived mode&lt;/div&gt;
&lt;/div&gt;
</content><category term="geek"></category><category term="emacs"></category></entry><entry><title>2010 In Memorium</title><link href="https://www.bennee.com/~alex/blog/2011/01/02/2010-in-memorium/" rel="alternate"></link><published>2011-01-02T15:25:00+00:00</published><updated>2011-01-02T15:25:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2011-01-02:/~alex/blog/2011/01/02/2010-in-memorium/</id><summary type="html">&lt;p&gt;2010 has been a pretty good year for us, it seems like is has packed a lot in.&lt;/p&gt;
&lt;p&gt;Professionally I've been doing really well. The &lt;a class="reference external" href="http://cbnl.com/"&gt;company I work for&lt;/a&gt; has had yet another record breaking year which has triggered my bonus again (although I don't find out how much until …&lt;/p&gt;</summary><content type="html">&lt;p&gt;2010 has been a pretty good year for us, it seems like is has packed a lot in.&lt;/p&gt;
&lt;p&gt;Professionally I've been doing really well. The &lt;a class="reference external" href="http://cbnl.com/"&gt;company I work for&lt;/a&gt; has had yet another record breaking year which has triggered my bonus again (although I don't find out how much until I get back). It continues to grow in both revenue and &lt;a class="reference external" href="http://cbnl.com/jobs/"&gt;size&lt;/a&gt;. I finally feel comfortable with the code base I'm working with. At the same time the ever growing feature list means I've still got plenty of interesting things to do with it. Although the internal code is proprietary to the company I've got a fairly wide latitude to work with FLOSS code and it makes a significant portion of the NMS product. Pretty much anything that I hack on that is useful to the wider community outside the application specific task is fed upstream which is good for both the company and the wider world.&lt;/p&gt;
&lt;p&gt;Aside from my work based hacking 2010 was also the year I became a real open source project maintainer. I've been &lt;a class="reference external" href="https://github.com/stsquad"&gt;publishing code&lt;/a&gt; I write and use for a long time and have done maintenance work on some niche &lt;a class="reference external" href="http://stonx.sourceforge.net/"&gt;projects&lt;/a&gt; as well as contributing to other projects as normal. However at the start of 2010 I released &lt;a class="reference external" href="http://www.bennee.com/~alex/blog/2010/01/25/finally-public/"&gt;Edit with Emacs&lt;/a&gt; to an unsuspecting world. It started as a simple exercise in learning some Chrome Javascript and kicking me to delve deeper into elisp coding. However since then it has grown to something that gets regular contributions and is used by &lt;a class="reference external" href="https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh"&gt;over a thousand people&lt;/a&gt;. To quote Blur it gives me an enormous sense of well being :-)&lt;/p&gt;
&lt;p&gt;This year has also been an interesting year politically. While there is plenty of debate about the economics of some of the choices made by the coalition I'm personally fairly happy with the approach being taken given the fairly dire conditions they inherited. From my geek point of view it's heartening to see the pre-election commitment that was made to open data seems to be being lived up to. I'm hoping the changes to openness will get embedded into the way government does business permanently.&lt;/p&gt;
&lt;p&gt;The big thing that dwarfed all other things this year of course was getting married to the wonderful Fliss. Saving up all my holidays for the honeymoon meant we didn't have many extended breaks and of course as the logistical tasks approached there was much running around and controlled panics. In the end everything went like a dream and the wedding itself was a blur of happy memories. It was a fantastic day and made all the better for all the friends and family that came along to share in the celebration. Getting married to Fliss is quite possibly the best thing I've ever done.&lt;/p&gt;
&lt;p&gt;I do occasionally have pangs of guilt considering how lucky we have been especially when so many are struggling with the uncertainty of the economic situation and the stress that causes. All I can do is wish the best of lucky to everyone for the next year. I hope it exceeds the positive expectations and under-performs on the negative ones!&lt;/p&gt;
</content><category term="geek, general"></category><category term="2010"></category><category term="emacs"></category><category term="life"></category><category term="review"></category></entry><entry><title>Almost there</title><link href="https://www.bennee.com/~alex/blog/2010/11/19/almost-there/" rel="alternate"></link><published>2010-11-19T22:48:00+00:00</published><updated>2010-11-19T22:48:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-11-19:/~alex/blog/2010/11/19/almost-there/</id><summary type="html">&lt;p&gt;I thought I might just mention the current state of the development for &lt;a class="reference external" href="https://github.com/stsquad/emacs_chrome"&gt;Edit with Emacs&lt;/a&gt;. A number of useful contributions have come in but I want to be able the &amp;quot;incremental edit&amp;quot; feature in the elisp edit server. I had a go but got stuck (marvel at &lt;a class="reference external" href="https://github.com/stsquad/emacs_chrome/commits/iterative_edit_expr/"&gt;hack in …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;I thought I might just mention the current state of the development for &lt;a class="reference external" href="https://github.com/stsquad/emacs_chrome"&gt;Edit with Emacs&lt;/a&gt;. A number of useful contributions have come in but I want to be able the &amp;quot;incremental edit&amp;quot; feature in the elisp edit server. I had a go but got stuck (marvel at &lt;a class="reference external" href="https://github.com/stsquad/emacs_chrome/commits/iterative_edit_expr/"&gt;hack in progress&lt;/a&gt;). So if anyone fancies having a go be my guest ;-)&lt;/p&gt;
&lt;p&gt;The rest is as follows:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
Ryszard Szopa (1):
      Allow the server to send correct Unicode to Chrome.

gfxmonk (4):
      trigger a DOM change() event when textarea content has changed
      clarify that the shortcut key is Enter, not &amp;quot;E&amp;quot;
      only re-request edit when &amp;quot;x-open&amp;quot; header is &amp;quot;true&amp;quot;, not merely present
      Made indentation consistent across all source files
&lt;/pre&gt;
</content><category term="geek"></category><category term="development"></category><category term="edit with emacs"></category><category term="emacs"></category><category term="help"></category></entry><entry><title>A step towards reducing Emacs Pinky</title><link href="https://www.bennee.com/~alex/blog/2010/11/03/a-step-towards-reducing-emacs-pinky/" rel="alternate"></link><published>2010-11-03T15:33:00+00:00</published><updated>2010-11-03T15:33:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-11-03:/~alex/blog/2010/11/03/a-step-towards-reducing-emacs-pinky/</id><summary type="html">&lt;p&gt;As someone who spends most of the day attached to their keyboard I'm fairly sensitive to RSI inducing things. One thing I do suffer from is what's colloquially known as &amp;quot;Emacs Pinky&amp;quot;. As the Ctrl is the start of practically every editing command in Emacs it's the left little finger …&lt;/p&gt;</summary><content type="html">&lt;p&gt;As someone who spends most of the day attached to their keyboard I'm fairly sensitive to RSI inducing things. One thing I do suffer from is what's colloquially known as &amp;quot;Emacs Pinky&amp;quot;. As the Ctrl is the start of practically every editing command in Emacs it's the left little finger that spends most of it's time stretched out and after a long heavy coding session can be more than a little sore.&lt;/p&gt;
&lt;p&gt;I've made adaptations including re-binding the useless Caps Lock key to being an alternative to Ctrl (although my use of it is sporadic). However one other culprit is the incredibly useful &lt;a class="reference external" href="http://en.wikipedia.org/wiki/GNU_Screen"&gt;GNU Screen&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I've been running with the default bindings for some time which use the Ctrl-A sequence as the command sequence. This is especially troubling when you have multiple nested screens. Today I finally cracked and made the decision to &lt;a class="reference external" href="https://github.com/stsquad/dotfiles/commit/61a201d930f9919143a607b11d9840481cf7e172"&gt;break out of this bad habit&lt;/a&gt;. So starting today I've chosen the backtick (`) character for the escape sequence. This makes the normal (and most frequent) screen action of switching screens a two stroke press without having to hold any control key down. We shall see how long it takes to retrain my muscle memory.&lt;/p&gt;
&lt;p&gt;Does anyone have any tips for reducing strain on the little finger inside Emacs itself? Sometimes I wonder if it would be easier to replace Ctrl actions with a double tap on the space bar before going for the modifier key. Is that even possible?&lt;/p&gt;
&lt;p&gt;I found &lt;a class="reference external" href="http://superuser.com/questions/74492/whats-the-best-prefix-escape-sequence-for-screen-or-tmux"&gt;this entry on superuser&lt;/a&gt; useful for other screen config tips.&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="screen"></category></entry><entry><title>More on TRAMP</title><link href="https://www.bennee.com/~alex/blog/2010/10/29/more-on-tramp/" rel="alternate"></link><published>2010-10-29T12:10:00+01:00</published><updated>2010-10-29T12:10:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-10-29:/~alex/blog/2010/10/29/more-on-tramp/</id><summary type="html">&lt;p&gt;I've mentioned &lt;a class="reference external" href="http://www.bennee.com/~alex/blog/2010/07/29/the-power-of-tramp/"&gt;TRAMP before&lt;/a&gt;. It's a very handy way of editing remote files. However I've been having a few problems with it today.&lt;/p&gt;
&lt;p&gt;The most common access method used by TRAMP to access files these days is via &lt;em&gt;ssh&lt;/em&gt;. It basically uses a remote terminal session to navigate the remote …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've mentioned &lt;a class="reference external" href="http://www.bennee.com/~alex/blog/2010/07/29/the-power-of-tramp/"&gt;TRAMP before&lt;/a&gt;. It's a very handy way of editing remote files. However I've been having a few problems with it today.&lt;/p&gt;
&lt;p&gt;The most common access method used by TRAMP to access files these days is via &lt;em&gt;ssh&lt;/em&gt;. It basically uses a remote terminal session to navigate the remote file system and fetch files back and forth. However it does take a few things for granted and one of those is the shell environment on the far end. For most *nix users this will be &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Bash_(Unix_shell)"&gt;Bash&lt;/a&gt;. Long time command line hackers like myself usually have a rather &lt;a class="reference external" href="http://github.com/stsquad/dotfiles"&gt;heavily customised&lt;/a&gt; shell environment which can cause problems for TRAMP, especially if you pull tricks with customising the command prompt. In an effort to handle this a little better I &lt;a class="reference external" href="http://github.com/stsquad/dotfiles/commit/126f32ff538214e3de4b40993a3406a15379ec45"&gt;modified&lt;/a&gt; my .bashrc to treat 'dumb' terminals as non-interactive. It works but it still seems a little hacky. I would welcome any better suggestions for detecting TRAMP sessions my start-up files.&lt;/p&gt;
&lt;p&gt;I was still experiencing a problem navigating to one of the directories on my remote machine. Whatever I did when I got to the root of my code tree I couldn't navigate into the correct directory. The prompt would only offer me an old (since moved away) directory. Tricks like opening &lt;a class="reference external" href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html"&gt;dired mode&lt;/a&gt; and navigating in would cause the session to spin consuming 100% cpu. In the end I tracked it down to &lt;a class="reference external" href="http://www.emacswiki.org/emacs/InteractivelyDoThings"&gt;IDO&lt;/a&gt; and the old directory existing in my ~/.ido.last file. Once removed and emacs restarted the problem went away. I'm hoping this is just a peculiarity of the interaction between ido and TRAMP but is was certainly annoying.&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="tramp"></category></entry><entry><title>Edit with Emacs v1.8</title><link href="https://www.bennee.com/~alex/blog/2010/08/19/edit-with-emacs-v1-8/" rel="alternate"></link><published>2010-08-19T11:10:00+01:00</published><updated>2010-08-19T11:10:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-08-19:/~alex/blog/2010/08/19/edit-with-emacs-v1-8/</id><summary type="html">&lt;p&gt;After a relatively quiet period a number of patches have flowed my way so I thought it was worth pushing out a new version. Perhaps the most &amp;quot;important&amp;quot; feature is the edit box flashing and fading from yellow after being updated (like &lt;a class="reference external" href="http://trac.gerf.org/itsalltext"&gt;It's All Text&lt;/a&gt;). It wasn't that hard to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;After a relatively quiet period a number of patches have flowed my way so I thought it was worth pushing out a new version. Perhaps the most &amp;quot;important&amp;quot; feature is the edit box flashing and fading from yellow after being updated (like &lt;a class="reference external" href="http://trac.gerf.org/itsalltext"&gt;It's All Text&lt;/a&gt;). It wasn't that hard to do given &lt;a class="reference external" href="http://jquery.com/"&gt;jQuery&lt;/a&gt; and the &lt;a class="reference external" href="http://plugins.jquery.com/project/color"&gt;colour animation plugin&lt;/a&gt; do all the heavy lifting.&lt;/p&gt;
&lt;p&gt;We've added a new hook to the edit-server for pre-edit customisation. If anyone has some nice examples of using the various hooks it would great if you could add examples at the &lt;a class="reference external" href="http://www.emacswiki.org/emacs/Edit_with_Emacs"&gt;emacs wiki&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As ever the extension can be found at the &lt;a class="reference external" href="https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh"&gt;Chrome Extensions site&lt;/a&gt;. Development versions are hosted at &lt;a class="reference external" href="http://github.com/stsquad/emacs_chrome"&gt;github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Full Change Log&lt;/p&gt;
&lt;p&gt;v1.8&lt;/p&gt;
&lt;p&gt;Extension&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Added option to enable/disable visual edit boxes&lt;/div&gt;
&lt;div class="line"&gt;* Improved feedback as editable elements come in and out of focus&lt;/div&gt;
&lt;div class="line"&gt;* Updated text box will now fade from yellow after an update&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;edit-server.el&lt;/p&gt;
&lt;p&gt;* Added edit-server-start-hook for additional customisation when edit starts&lt;/p&gt;
</content><category term="geek"></category><category term="chrome"></category><category term="chromium"></category><category term="development"></category><category term="elisp"></category><category term="emacs"></category><category term="extension"></category><category term="javascript"></category></entry><entry><title>Looping in LISP</title><link href="https://www.bennee.com/~alex/blog/2010/08/10/looping-in-lisp/" rel="alternate"></link><published>2010-08-10T09:04:00+01:00</published><updated>2010-08-10T09:04:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-08-10:/~alex/blog/2010/08/10/looping-in-lisp/</id><summary type="html">&lt;p&gt;Loops are a fairly important part of any programming language and fairly fundamental to a language that is purported to be all about manipulating lists. However it's not something I use that often in my .emacs code so I thought it might be useful to discuss the various options with …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Loops are a fairly important part of any programming language and fairly fundamental to a language that is purported to be all about manipulating lists. However it's not something I use that often in my .emacs code so I thought it might be useful to discuss the various options with some examples.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; I run emacs on a number of machines, each with a different set of sound sets. I want to set up set up a valid sound for erc but I don't want an overly verbose set of cases depending on what machine I'm on. Instead a given a list of sound files I want a function that will return the first one that actually exists.&lt;/p&gt;
&lt;p&gt;This problem can be easily generalised into return the first valid path from a list of paths.&lt;/p&gt;
&lt;div class="section" id="first-version-pure-emacs-lisp"&gt;
&lt;h2&gt;First version: pure emacs lisp&lt;/h2&gt;
&lt;pre class="literal-block"&gt;
; the 'elisp' way
(defun find-valid-file-elisp-way (list-of-files)
  &amp;quot;Go though a list of files and return the first one that is present&amp;quot;
  (let (r '())
    (mapc '(lambda (f)
             (if (file-exists-p f) (add-to-list 'r f)))
          list-of-files)
    (car r)))
&lt;/pre&gt;
&lt;p&gt;First impressions aren't good. The lisp parenthesis do seem to get in the way of making what is happening clear. However it's using one of common &lt;a class="reference external" href="http://www.gnu.org/s/emacs/manual/html_node/elisp/Mapping-Functions.html"&gt;mapping functions&lt;/a&gt; you see a lot of in lisp. A mapping function essentially takes a list, applies a function to each element of the list and eventually returns a result. The most common of the mapping functions is &lt;em&gt;mapcar&lt;/em&gt; which returns a modified list as a result. In this case that isn't what we want so we use &lt;em&gt;mapc&lt;/em&gt; where the only value that is built up is the result &lt;em&gt;r&lt;/em&gt; as we identify each valid file. The final return value is just the first entry in that list. This does mean we have processed the whole list of alternatives which is sub-optimal.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="second-version-common-lisp-version"&gt;
&lt;h2&gt;Second version: Common Lisp Version&lt;/h2&gt;
&lt;pre class="literal-block"&gt;
(defun find-valid-file-clisp-way (list-of-files)
  &amp;quot;Go though a list of files and return the first one that is present&amp;quot;
  (loop for path in list-of-files
        until (file-exists-p path)
        finally return path))
&lt;/pre&gt;
&lt;p&gt;This version probably is the easiest to read for people familiar with other programming languages. The intention of the code jumps out at you. However the actual implementation is done with a macro. If you look at the help for &lt;em&gt;loop&lt;/em&gt; you'll see it can take a number of different forms - follow that to the code and you'll see a fairly complex elisp implementation. However to my mind still easier to follow than the pure elisp version with mapc.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="third-version-using-the-dolist-macro"&gt;
&lt;h2&gt;Third Version: Using the dolist macro&lt;/h2&gt;
&lt;pre class="literal-block"&gt;
; using 'cl-macs
(defun find-valid-file-dolist-way (list-of-files)
  &amp;quot;Go though a list of files and return the first one that is present&amp;quot;
  (dolist (f list-of-files)
    (if (file-exists-p f)
        (return f))))
&lt;/pre&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;This is yet another version using an LISP macro but this one has considerably less potential forms to cause confusion. It's fairly comprehensible what is going on and even follows the traditional parenthesis happy form. It also takes advantage of the common LISP &lt;em&gt;return&lt;/em&gt; to early return from the loop when we detect a valid file. If it makes it to the end of the list it evaluates the 3rd optional form to calculate the result which in this case will be 'nil.&lt;/div&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;So what do you think? What version do you prefer? Where does the balance lie between writing code is LISPy ways and for code comprehension? Are there any other ways to solve this particular problem? I'll be looking forward to your comments.&lt;/p&gt;
&lt;/div&gt;
</content><category term="geek"></category><category term="code"></category><category term="elisp"></category><category term="emacs"></category><category term="examples"></category><category term="lisp"></category></entry><entry><title>Edit with Emacs v1.7</title><link href="https://www.bennee.com/~alex/blog/2010/07/29/edit-with-emacs-v1-7/" rel="alternate"></link><published>2010-07-29T15:31:00+01:00</published><updated>2010-07-29T15:31:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-07-29:/~alex/blog/2010/07/29/edit-with-emacs-v1-7/</id><summary type="html">&lt;p&gt;It's been a while so I released a new version of &lt;a class="reference external" href="https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh?hl=en"&gt;Edit with Emacs&lt;/a&gt; for Google Chrome(ium). To be honest most of the changes are to edit-server.el. The most major change is moving all the frame configuration options into a single &lt;em&gt;edit-server-new-frame-alist&lt;/em&gt; which might cause confusion if people …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It's been a while so I released a new version of &lt;a class="reference external" href="https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh?hl=en"&gt;Edit with Emacs&lt;/a&gt; for Google Chrome(ium). To be honest most of the changes are to edit-server.el. The most major change is moving all the frame configuration options into a single &lt;em&gt;edit-server-new-frame-alist&lt;/em&gt; which might cause confusion if people don't read the change log which is:&lt;/p&gt;
&lt;p&gt;Extension&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* New icon state. Blue=Waiting, Green=In Progress, Red=Error&lt;/div&gt;
&lt;div class="line"&gt;* Improved mouse-over text for icon to give more useful feedback&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;edit-server.el&lt;/p&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;* Move all frame customisation into edit-server-new-frame-alist&lt;/div&gt;
&lt;div class="line"&gt;* Don't ask user before closing emacs and network process&lt;/div&gt;
&lt;div class="line"&gt;* Just skip creating new network process if it's already running&lt;/div&gt;
&lt;div class="line"&gt;* Make sure edit buffer is selected on new frames&lt;/div&gt;
&lt;div class="line"&gt;* Prompt window manager to bring new frames to the top of the stack (X windows only)&lt;/div&gt;
&lt;div class="line"&gt;* Enable multi-byte mode on edit buffers for better unicode handling&lt;/div&gt;
&lt;div class="line"&gt;* Explicitly fail on XEmacs if make-network-process isn't found (XEmacs patches welcome)&lt;/div&gt;
&lt;/div&gt;
</content><category term="geek"></category><category term="chrome"></category><category term="chromium"></category><category term="emacs"></category></entry><entry><title>The power of Tramp</title><link href="https://www.bennee.com/~alex/blog/2010/07/29/the-power-of-tramp/" rel="alternate"></link><published>2010-07-29T08:06:00+01:00</published><updated>2010-07-29T08:06:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-07-29:/~alex/blog/2010/07/29/the-power-of-tramp/</id><summary type="html">&lt;p&gt;The project I've been working on at work the last few weeks has involved bringing up a brand new embedded system. As part of that I've been tweaking a lot of start-up scripts and configuration files on the new system.&lt;/p&gt;
&lt;p&gt;For part of that task I've installed &lt;a class="reference external" href="http://www.gnu.org/software/zile/"&gt;GNU Zile&lt;/a&gt; which …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The project I've been working on at work the last few weeks has involved bringing up a brand new embedded system. As part of that I've been tweaking a lot of start-up scripts and configuration files on the new system.&lt;/p&gt;
&lt;p&gt;For part of that task I've installed &lt;a class="reference external" href="http://www.gnu.org/software/zile/"&gt;GNU Zile&lt;/a&gt; which provides a nice Emacs-like experience for quick edits where you would usually fire-up &lt;em&gt;vi&lt;/em&gt;. Despite the fact the new platform has a considerably larger backing store I'm not going to install the full-fat Emacs just to satisfy my editing needs.&lt;/p&gt;
&lt;p&gt;Fortunately the full-fat Emacs has long carried a feature called TRAMP (standing for &amp;quot;Transparent Remote (file) Access, Multiple Protocol&amp;quot;) which is incredibly useful in this and other use cases. TRAMP allows you to edit files on remote machines in your normal home Emacs environment. &lt;em&gt;find-file&lt;/em&gt; and friends all behave as if you are editing local files while behind the scenes Emacs pulls directory listings and files from the remote machine with ssh (or ftp or whatever actually works). I use TRAMP all the time to edit files on the rather ancient build machine rather the using the relatively ancient Emacs it has installed on it.&lt;/p&gt;
&lt;p&gt;There was one minor wrinkle getting TRAMP working with my new embedded system. As some of the methods used to move files back and forth are designed for transferring text files Emacs goes to great pains to ensure the files are moved across un-mangled. Typically this involves some sort of encode/decode utility. The tramp code is actually quite a good example of using elisp in an extensible way and if you look at &lt;em&gt;tramp-remote-coding-commands&lt;/em&gt; you'll see it will even fall back to running remote in-line perl if it has to. As it happens we don't have perl running on the embedded platform and as it would be a little overkill to put perl on the remote machine so I added the recode utility.&lt;/p&gt;
&lt;p&gt;I consider TRAMP to be one of Emacs' killer features. Next time you sigh at the prospect of being consigned to an inferior editor on some remote box consider visiting the file with TRAMP straight from your current Emacs session.&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="remote-editing"></category><category term="tramp"></category></entry><entry><title>Emacs Daemon and Handling Projects</title><link href="https://www.bennee.com/~alex/blog/2010/07/05/emacs-daemon-and-handling-projects/" rel="alternate"></link><published>2010-07-05T11:16:00+01:00</published><updated>2010-07-05T11:16:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-07-05:/~alex/blog/2010/07/05/emacs-daemon-and-handling-projects/</id><summary type="html">&lt;p&gt;All my machines have been running persistent Emacs daemons for some time now. Every time I edit a web-page text area or a tweak a configuration file the Emacs client whizzes me to the file with efficient enthusiasm.&lt;/p&gt;
&lt;p&gt;However I'm still running individual sessions for each &amp;quot;project&amp;quot; I work on …&lt;/p&gt;</summary><content type="html">&lt;p&gt;All my machines have been running persistent Emacs daemons for some time now. Every time I edit a web-page text area or a tweak a configuration file the Emacs client whizzes me to the file with efficient enthusiasm.&lt;/p&gt;
&lt;p&gt;However I'm still running individual sessions for each &amp;quot;project&amp;quot; I work on. For example at work I currently have one for the main source tree, one for the standalone Java project and one for a kernel I'm working on. This is in no small part due to the rather basic &lt;a class="reference external" href="http://github.com/stsquad/my-emacs-stuff/blob/master/my-devel.el#L6"&gt;project support I hacked up&lt;/a&gt; some time ago.&lt;/p&gt;
&lt;p&gt;While conceptually switching my various project variables to be buffer locals would solve a lot of problems there would be a mess of smarts to improve on and I currently can't justify the diversion. I've attempted to get things like &lt;a class="reference external" href="http://cedet.sourceforge.net/"&gt;CEDET&lt;/a&gt; and &lt;a class="reference external" href="http://jdee.sourceforge.net/"&gt;JDEE&lt;/a&gt; working before but with limited success. They all seem overly heavy-weight solutions to the things I'd like it to achieve:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class="first"&gt;Associate new open files with the &amp;quot;project&amp;quot; they are in&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Make M-x compile do the right thing:&lt;/p&gt;
&lt;/p&gt;&lt;ul class="simple"&gt;
&lt;li&gt;Select compile command from per-project compile history&lt;/li&gt;
&lt;li&gt;Separate compile window for each project&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Make M-x find-tag behave in the project context&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As I say simple needs. Once I have all that working then current pain points like having multiple IRC channels over multiple instances of Emacs can go away and everything is literately only a few key-strokes away.&lt;/p&gt;
&lt;p&gt;Dear lazyweb, what lightweight project management tools exist out there and which are really good?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT TO ADD:&lt;/strong&gt; I'm going to have a look at &lt;a class="reference external" href="http://github.com/jrockway/eproject"&gt;eproject&lt;/a&gt;. Other suggestions still welcome though :-)&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="ide"></category><category term="projects"></category></entry><entry><title>On the nature of Planets</title><link href="https://www.bennee.com/~alex/blog/2010/07/01/on-the-nature-of-planets/" rel="alternate"></link><published>2010-07-01T16:26:00+01:00</published><updated>2010-07-01T16:26:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-07-01:/~alex/blog/2010/07/01/on-the-nature-of-planets/</id><summary type="html">&lt;p&gt;I upgraded my Wordpress install yesterday which inadvertently broke the 'emacs' tagged feed to &lt;a class="reference external" href="http://planet.emacsen.org/"&gt;Planet Emacsen&lt;/a&gt;. The aim of having a sub-feed from my blog was so I didn't pollute the planet feed with my rambling life story which is probably of more interest(?) to my friends and family. They …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I upgraded my Wordpress install yesterday which inadvertently broke the 'emacs' tagged feed to &lt;a class="reference external" href="http://planet.emacsen.org/"&gt;Planet Emacsen&lt;/a&gt;. The aim of having a sub-feed from my blog was so I didn't pollute the planet feed with my rambling life story which is probably of more interest(?) to my friends and family. They tend to read the other &lt;a class="reference external" href="http://syndicated.livejournal.com/stsquad_real/profile"&gt;syndicated feed&lt;/a&gt; on LiveJournal which has no filtering and as a result often generates confusion from my less technically inclined friends when I start talking about esoteric editor features.&lt;/p&gt;
&lt;p&gt;However one of my non emacs related &lt;a class="reference external" href="http://www.bennee.com/~alex/blog/2010/06/30/phone-home/"&gt;posts&lt;/a&gt; did generate a number of useful replies pointing me towards the useful &lt;a class="reference external" href="http://www.harding.motd.ca/autossh/"&gt;autossh&lt;/a&gt; tool. This made me wonder if sticking to purely emacs related posts was being a little too limiting. I'd be interested in hearing from Planet Emacsen subscribers what they actually expect from the feed? I'll assume non-techie posts should be off limits but is there value in reading technical posts by emacs users that are not actually related to emacs? Or do people prefer the planet feed to be all about our favourite editor and the things we can do with it? Are we just a community of like-minded individuals with a penchant for octipedal key-strokes?&lt;/p&gt;
</content><category term="geek"></category><category term="community"></category><category term="emacs"></category><category term="planet"></category></entry><entry><title>Learning to love the snake</title><link href="https://www.bennee.com/~alex/blog/2010/03/31/learning-to-love-the-snake/" rel="alternate"></link><published>2010-03-31T10:47:00+01:00</published><updated>2010-03-31T10:47:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-03-31:/~alex/blog/2010/03/31/learning-to-love-the-snake/</id><summary type="html">&lt;p&gt;Yesterday I finished of what is hopefully the last testing release of the product I'm responsible for, assuming no major problems it will go gold soon. This means I can start on doing some new development work. The thing I'm working on next will be done in a scripting language …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Yesterday I finished of what is hopefully the last testing release of the product I'm responsible for, assuming no major problems it will go gold soon. This means I can start on doing some new development work. The thing I'm working on next will be done in a scripting language as basically the task of ensuring configurations are correct and properly setup is a) not performance critical and b) a hell of a lot easier than wrangling strings in C.&lt;/p&gt;
&lt;p&gt;While most of the scripting stuff on the product is written in perl I've been contemplating doing something a bit more major with &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Python_(programming_language)"&gt;Python&lt;/a&gt;. While the perl I write (&lt;a class="reference external" href="http://github.com/stsquad/ps3enc/blob/master/ps3enc.pl"&gt;example&lt;/a&gt;) probably looks more like C with extra punction marks compared to the code of a seasoned perl wrangler I still occasionaly get tripped up by it. In contrast my experience with Python so far has been much more pleasent, no doubt helped by the ability to experiment in an &lt;a class="reference external" href="http://ipython.scipy.org/moin/"&gt;interactive python shell&lt;/a&gt;. So far it's behaviour has been unsurprising. We shall see how I feel about it after this piece of work :-)&lt;/p&gt;
&lt;p&gt;Of course the first thing to do before starting out on this course is to see if my editor is configured and ready. I've immediately walked into the &lt;em&gt;python.el&lt;/em&gt; and &lt;em&gt;python-mode.el&lt;/em&gt; &lt;a class="reference external" href="http://www.emacswiki.org/emacs/PythonMode"&gt;schism&lt;/a&gt;. I'm going with &lt;em&gt;python-mode.el&lt;/em&gt; for the time being but at the moment I'm not doing much more than run iPython as a inferior shell within Emacs.&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="perl"></category><category term="python"></category></entry><entry><title>Adding Google Juice to mutt</title><link href="https://www.bennee.com/~alex/blog/2010/03/17/adding-google-juice-to-mutt/" rel="alternate"></link><published>2010-03-17T07:35:00+00:00</published><updated>2010-03-17T07:35:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-03-17:/~alex/blog/2010/03/17/adding-google-juice-to-mutt/</id><summary type="html">&lt;p&gt;As I've been mailing out invites I discovered a minor problem with my data.&lt;/p&gt;
&lt;p&gt;My main email client is the fantastically functional &lt;a class="reference external" href="http://www.mutt.org"&gt;mutt&lt;/a&gt;. It's terminal based but incredibly flexible. When it comes to mass sorting/searching your email it leaves GUI based clients standing. However now I'm a roving around …&lt;/p&gt;</summary><content type="html">&lt;p&gt;As I've been mailing out invites I discovered a minor problem with my data.&lt;/p&gt;
&lt;p&gt;My main email client is the fantastically functional &lt;a class="reference external" href="http://www.mutt.org"&gt;mutt&lt;/a&gt;. It's terminal based but incredibly flexible. When it comes to mass sorting/searching your email it leaves GUI based clients standing. However now I'm a roving around with a Google Phone the majority of my contact data is &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Gmail"&gt;in the cloud&lt;/a&gt;. While I have a small address file used by mutt it only has a few oft-mailed addresses in it.&lt;/p&gt;
&lt;p&gt;Luckily thanks to &lt;a class="reference external" href="http://code.google.com/apis/gdata/"&gt;Google's data APIs&lt;/a&gt; &lt;strong&gt;your information&lt;/strong&gt; is only a few &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_web_services"&gt;RESTful&lt;/a&gt; requests away. The &lt;a class="reference external" href="http://code.google.com/p/goobook/"&gt;goobook&lt;/a&gt; program provides a handy mutt compatible address book interface to this cloud data.&lt;/p&gt;
&lt;p&gt;There is one wrinkle however. The &lt;a class="reference external" href="http://code.google.com/p/goobook/source/browse/trunk/README.txt#59"&gt;configuration&lt;/a&gt; of the script involves putting some rather valuable login details in a plain text file on your home partition. While I like to think my machines are pretty secure and maintained you can always do more. Good security is defence in depth. A &lt;a class="reference external" href="http://groups.google.com/group/goobook/browse_thread/thread/f632e3d5c4fcaf25"&gt;quick patch later&lt;/a&gt; and I can store those details in an &lt;a class="reference external" href="http://en.wikipedia.org/wiki/GNU_Privacy_Guard"&gt;GPG&lt;/a&gt; encrypted file that can be decrypted on the fly when required.&lt;/p&gt;
&lt;p&gt;The final piece of the puzzle is creating these encrypted config files in the first place. Although you can do this by hand from the command line I find the best method is using &lt;a class="reference external" href="http://www.emacswiki.org/emacs/EasyPG"&gt;EasyPG&lt;/a&gt; (now part of Emacs 23). This will automatically cause any files with a .gpg extension to be encrypted. You can control the Emacs mode selection and default encryption key to use by using &lt;a class="reference external" href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables"&gt;file variables&lt;/a&gt; in the header comments of the file.&lt;/p&gt;
&lt;p&gt;It's not all perfect though, when enabling EasyPG I had to do the following:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(if (maybe-load-library &amp;quot;epa-file&amp;quot;)
    (progn
      (setenv &amp;quot;GPG_AGENT_INFO&amp;quot; nil) ; gpg-agent confuses epa when getting passphrase
      (epa-file-enable)))
&lt;/pre&gt;
&lt;p&gt;The problem seems to be that when GPG agent runs in terminal mode it confuses Emacs/EasyPG. By suppressing the GPG_AGENT_INFO environment variable EasyPG will fall back to requesting your passphrase in the mode line. While it takes care to flush the value as soon as possible it does open a small window of attack if an attacker can cause emacs to crash and dump core.&lt;/p&gt;
</content><category term="geek"></category><category term="data"></category><category term="emacs"></category><category term="encryption"></category><category term="google"></category><category term="gpg"></category><category term="mutt"></category></entry><entry><title>Thoughts on Java</title><link href="https://www.bennee.com/~alex/blog/2010/02/12/thoughts-on-java/" rel="alternate"></link><published>2010-02-12T11:18:00+00:00</published><updated>2010-02-12T11:18:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-02-12:/~alex/blog/2010/02/12/thoughts-on-java/</id><summary type="html">&lt;p&gt;I've been spending the last week hacking around in Java. One of the components of the product I develop is the open source &lt;a class="reference external" href="http://www.opennms.org/wiki/Main_Page"&gt;OpenNMS&lt;/a&gt;. As I've mentioned before it's been lightly modified by myself to blend in better with our code mainly in the JSP department for it's web interface …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been spending the last week hacking around in Java. One of the components of the product I develop is the open source &lt;a class="reference external" href="http://www.opennms.org/wiki/Main_Page"&gt;OpenNMS&lt;/a&gt;. As I've mentioned before it's been lightly modified by myself to blend in better with our code mainly in the JSP department for it's web interface. Last week I discovered I needed to make a slightly deeper change to the code to export some more data to it's scripting interface.&lt;/p&gt;
&lt;p&gt;While I was exploring the code base and scratching my head at some of the exceptions being thrown I thought I'd have yet another go at making my Java development environment a little more integrated than binding the build script to &amp;quot;C-c c&amp;quot;.&lt;/p&gt;
&lt;p&gt;So far I have a couple of observations about Java code. The first is that it never seems to do very much. As you navigate the code base you tend to find a lot of simple skeleton classes, usually working as simple adaptors between one framework and the next. Thanks to Java's strong support for &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Generic_programming"&gt;generics&lt;/a&gt; and &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Interface_(Java)"&gt;interfaces&lt;/a&gt; you often find yourself looking at a class wondering what else it might do. None of this is helped by Java's standard/deep/directory/naming/strategy/of/doom. My usual tools of a decent programmers editor and grep start to show their limitations. Java is a language that is designed to be serviced by a full &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Integrated_development_environment"&gt;IDE&lt;/a&gt; to help you make sense of the whole system.&lt;/p&gt;
&lt;p&gt;Having previously tried and failed to get &lt;a class="reference external" href="http://jdee.sourceforge.net/"&gt;JDEE&lt;/a&gt; working I thought I would capitulate and try &lt;a class="reference external" href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt;. I blithely thought that given the fact it's the standard Java developers tool with a long development history it would Just Work (tm). I was to be sorely disappointed.&lt;/p&gt;
&lt;p&gt;I tried several different versions on both my home Gentoo machine as well as various PPA based versions on my work Ubuntu setup. A lot of times it failed to start up due to some Mozilla dependency issues and when I did finally get it started I couldn't get any of the plugins to install. The entire Eclipse stack is designed around the concept of plugins and it seems every Java framework comes with it's own additional plugin for Eclipse. Without the plugins I wasn't able to get a working build or any sort of source level debugging. Eventually I had to concede defeat and bin the IDE approach and return to some tedious grep work and piece together the structure of the software by hand so I could finally crank out what in the end was a &lt;a class="reference external" href="http://marc.info/?l=opennms-devel&amp;amp;m=126582776211008&amp;amp;w=2"&gt;fairly simple patch&lt;/a&gt;. I doubt I shall return to Eclipse.&lt;/p&gt;
&lt;p&gt;I did have a brief tinker with JDEE which at least installed better from it's SVN repo (needing a one line patch). However the documentation is a little sparse on how to import an existing large project into it's view of the world. Annoyingly potentially useful links like the FAQ referenced on the &lt;a class="reference external" href="http://jdee.sourceforge.net/"&gt;main site&lt;/a&gt; lead to &lt;a class="reference external" href="http://sunsite.auc.dk/fom/jde/cache/1.html"&gt;dead ends&lt;/a&gt;. I never got to the point of seeing if I had a working Java &lt;a class="reference external" href="http://www.emacswiki.org/emacs/GrandUnifiedDebugger"&gt;GUD&lt;/a&gt; integration. I hope to revisit JDEE in the future when I'm a little less pressed for time at work. It's hard to work up the enthusiasm for plumbing in support for a language you never intend to use for fun in your own time.&lt;/p&gt;
</content><category term="geek"></category><category term="development"></category><category term="eclipse"></category><category term="emacs"></category><category term="java"></category><category term="jdee"></category><category term="opennms"></category></entry><entry><title>Finally public</title><link href="https://www.bennee.com/~alex/blog/2010/01/25/finally-public/" rel="alternate"></link><published>2010-01-25T12:41:00+00:00</published><updated>2010-01-25T12:41:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-01-25:/~alex/blog/2010/01/25/finally-public/</id><summary type="html">&lt;p&gt;After much faffing about with repeated sending of faxes to multiple numbers I finally proved I was human and accountable enough for &amp;quot;Edit with Emacs&amp;quot; to appear on the &lt;a class="reference external" href="https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh"&gt;Chrome Extension Gallery&lt;/a&gt;. This almost immediately showed up some documentation and usage usability issues so I spent some of my spare …&lt;/p&gt;</summary><content type="html">&lt;p&gt;After much faffing about with repeated sending of faxes to multiple numbers I finally proved I was human and accountable enough for &amp;quot;Edit with Emacs&amp;quot; to appear on the &lt;a class="reference external" href="https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh"&gt;Chrome Extension Gallery&lt;/a&gt;. This almost immediately showed up some documentation and usage usability issues so I spent some of my spare time at the weekend creating an options page. I've also got a growing number of &lt;a class="reference external" href="http://github.com/stsquad/emacs_chrome/network"&gt;feature branches&lt;/a&gt; coming in from other github users so I merged some more contributions into the v1.4 release.&lt;/p&gt;
&lt;p&gt;I have to say the usage of &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Git_(software)"&gt;git&lt;/a&gt; as an SCM tool as well as &lt;a class="reference external" href="https://github.com/"&gt;github's&lt;/a&gt; non-fussy functional website makes managing contributions a lot easier. It's nice to see the world has moved on since the venerable &lt;a class="reference external" href="http://en.wikipedia.org/wiki/SourceForge"&gt;SourceForge&lt;/a&gt; was the only option for those who didn't want to bother maintaining their own project infrastructure.&lt;/p&gt;
&lt;p&gt;One of the feature branches being &lt;a class="reference external" href="http://github.com/wh5a/emacs_chrome/commit/b319b05d7854632551301acad34b6bb7fdfeeac9"&gt;proposed&lt;/a&gt; is changing the interface to the &amp;quot;Edit Server&amp;quot; to pass a richer set of information about the text area being edited. This would allow the server to do clever things like position the frame near the position of the text area on the browser and possibly manipulate fonts. So far I'm trying to keep the current edit server calling conventions similar to those offered by &lt;a class="reference external" href="https://chrome.google.com/extensions/detail/ppoadiihggafnhokfkpphojggcdigllp"&gt;other similar&lt;/a&gt; &lt;a class="reference external" href="https://chrome.google.com/extensions/detail/cdkefpgghindmmclchkbcdgikbpnbiaj"&gt;extensions&lt;/a&gt; that need to do a similar thing. Although for Emacs users &lt;em&gt;edit-server.el&lt;/em&gt; will surely be the default and most used method it seems churlish to break compatibility for those that prefer to run/hack other servers. I've been &lt;a class="reference external" href="http://github.com/stsquad/emacs_chrome/blob/master/servers/README"&gt;documenting&lt;/a&gt; the URL conventions so it would be nice if I got some feedback how to maintain a useful extensible &amp;quot;API&amp;quot; for the broadest range of solutions.&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="git"></category><category term="github"></category></entry><entry><title>Today's Ubuntu Emacs PPA tip</title><link href="https://www.bennee.com/~alex/blog/2010/01/19/todays-ubuntu-emacs-ppa-tip/" rel="alternate"></link><published>2010-01-19T10:56:00+00:00</published><updated>2010-01-19T10:56:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-01-19:/~alex/blog/2010/01/19/todays-ubuntu-emacs-ppa-tip/</id><summary type="html">&lt;p&gt;Like many Emacs users I use the excellent &lt;a class="reference external" href="https://launchpad.net/~ubuntu-elisp/+archive/ppa"&gt;Ubuntu Elisp PPA&lt;/a&gt; to get a more recent Emacs than the main distro repos package. However I'd been puzzled as to why &lt;em&gt;emacs-snapshot&lt;/em&gt; hadn't been updated in ages. The was doubly confusing as the &lt;a class="reference external" href="http://emacs.orebokech.com/"&gt;orebokech&lt;/a&gt; packages on which they are based and …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Like many Emacs users I use the excellent &lt;a class="reference external" href="https://launchpad.net/~ubuntu-elisp/+archive/ppa"&gt;Ubuntu Elisp PPA&lt;/a&gt; to get a more recent Emacs than the main distro repos package. However I'd been puzzled as to why &lt;em&gt;emacs-snapshot&lt;/em&gt; hadn't been updated in ages. The was doubly confusing as the &lt;a class="reference external" href="http://emacs.orebokech.com/"&gt;orebokech&lt;/a&gt; packages on which they are based and I use on my server had seen a couple of version bumps.&lt;/p&gt;
&lt;p&gt;Turns out &lt;em&gt;emacs-snapshot&lt;/em&gt; is no longer packaged by the PPA, but &lt;em&gt;emacs23&lt;/em&gt; is. Once I'd installed that my little (make-frame-on-display) &lt;a class="reference external" href="http://github.com/stsquad/emacs_chrome/issues/closed#issue/2"&gt;problem&lt;/a&gt; went away.&lt;/p&gt;
</content><category term="general"></category><category term="emacs"></category><category term="linkedin"></category><category term="ppa"></category><category term="ubuntu"></category></entry><entry><title>First elisp patch for emacs chrome</title><link href="https://www.bennee.com/~alex/blog/2010/01/09/first-elisp-patch-for-emacs-chrome/" rel="alternate"></link><published>2010-01-09T12:40:00+00:00</published><updated>2010-01-09T12:40:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2010-01-09:/~alex/blog/2010/01/09/first-elisp-patch-for-emacs-chrome/</id><summary type="html">&lt;p&gt;One of the nice things about putting your coding experiments up early and under a permissive license is people can submit patches. I'd been trying to get the native elisp &lt;a class="reference external" href="http://github.com/stsquad/emacs_chrome/blob/master/servers/edit_server.el"&gt;edit server&lt;/a&gt; working but I'd fallen back to the working python script as I've been busy at work. However along …&lt;/p&gt;</summary><content type="html">&lt;p&gt;One of the nice things about putting your coding experiments up early and under a permissive license is people can submit patches. I'd been trying to get the native elisp &lt;a class="reference external" href="http://github.com/stsquad/emacs_chrome/blob/master/servers/edit_server.el"&gt;edit server&lt;/a&gt; working but I'd fallen back to the working python script as I've been busy at work. However along comes Riccardo Murri who cleaned up the code and got it working. I've pushed the changes to the &lt;a class="reference external" href="http://github.com/stsquad/emacs_chrome"&gt;repo&lt;/a&gt; and with a little extra glue spawn it when emacs is in &lt;em&gt;--daemon&lt;/em&gt; mode:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
;; Do we want an edit-server?
(if (and (daemonp) (maybe-load-library &amp;quot;edit_server&amp;quot;))
    (edit-server-start))
&lt;/pre&gt;
&lt;p&gt;And bingo you save the cost of 2 unnecessary fork/execve's to get emacs editing your Google Chrome(ium) hosted &amp;lt;textarea&amp;gt;. It seems to have an odd interaction with longlines-mode though which I need to investigate, perhaps longlines mode does magic stuff with the buffer text on save which gets skipped when the edit server does it's thing?&lt;/p&gt;
&lt;p&gt;I've submitted the extension to the Google extension gallery although it's currently held up in actual physical paperwork. As my content script needs fairly liberal permissions to work I have to at least demonstrate I'm not an evil hacker/spammer intent on creating browser malware. I may take advantage of the delay to some clean ups to the browser feedback as we will likely be housebound sheltering from the weather. That is of course unless anyone else beats me to it :-)&lt;/p&gt;
</content><category term="general"></category><category term="chrome"></category><category term="elisp"></category><category term="emacs"></category><category term="extensions"></category></entry><entry><title>Update on Emacs Chrome</title><link href="https://www.bennee.com/~alex/blog/2009/12/21/update-on-emacs-chrome/" rel="alternate"></link><published>2009-12-21T13:49:00+00:00</published><updated>2009-12-21T13:49:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-12-21:/~alex/blog/2009/12/21/update-on-emacs-chrome/</id><summary type="html">&lt;p&gt;In my spare time I've been mostly bashing away at trying to implement an edit server for the Emacs Chrome extension in Emacs Lisp. It's taking longer than I hoped mainly as it's the first time I've ever tried to use the Emacs Lisp Debugger and it's fairly alien compared …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In my spare time I've been mostly bashing away at trying to implement an edit server for the Emacs Chrome extension in Emacs Lisp. It's taking longer than I hoped mainly as it's the first time I've ever tried to use the Emacs Lisp Debugger and it's fairly alien compared to the usual functional GDB's of the world which I'm used to. The &lt;a class="reference external" href="http://github.com/stsquad/emacs_chrome/blob/master/servers/edit_server.el"&gt;current version&lt;/a&gt; should be pushing canned response back to every edit request but for some reason it's not working. Once the basics are working the rest is just cleanup :-)&lt;/p&gt;
&lt;p&gt;In the meantime I've pushed a few additional updates to the repo. The first makes the extension usable on multiple tabs by passing the &amp;quot;port&amp;quot; back to the XmlHttp handler. You would think being an Emacs user I'd be used to the &lt;a class="reference external" href="http://en.wikipedia.org/wiki/First-class_function"&gt;first class function&lt;/a&gt; paradigm by now but it's not something I really get a chance to use much in the day job. I'm not sure if:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
function contentTalking(port)
{
    port.onMessage.addListener(function(msg, port) {
        handleContentMessages(msg,port);
    });
}
&lt;/pre&gt;
&lt;p&gt;is the correct way way to pass parameters from the local function's scope to the listener function's scope but I'm not sure how else you'd do it. Certainly the pattern of declaring functions in-line seems to be very common in the world of Javascript (as well as Emacs Lisp via the &lt;em&gt;lambda ()&lt;/em&gt; directive). If you look at the earlier &lt;a class="reference external" href="http://github.com/stsquad/emacs_chrome/commit/a642737b39f38f36507485588ad22b4dabd6eaf2"&gt;version of the code&lt;/a&gt; you'll see my C habits come through, after all it's just a pointer :-).&lt;/p&gt;
&lt;p&gt;I've also tweaked the pycl.py edit server code to handle running on Python 2.5 as my work box is running a fairly old Hardy Heron. Anyway the latest results of my hacking can, as always be seen &lt;a class="reference external" href="http://github.com/stsquad/emacs_chrome"&gt;on github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT TO ADD&lt;/strong&gt;: Well that seems to be working now. I was getting confused in my use of car/cdr which is probably a result of too much &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Forth_(programming_language)"&gt;Forth&lt;/a&gt; when I was younger. They are not equivalent to grabbing the first and next bits off the stack. Specifically cdr returns a list, so you had better munge it to what you want if it's not a list.&lt;/p&gt;
</content><category term="geek"></category><category term="chrome"></category><category term="chromium"></category><category term="emacs"></category><category term="javascript"></category></entry><entry><title>End to End Connectivity</title><link href="https://www.bennee.com/~alex/blog/2009/12/16/end-to-end-connectivity/" rel="alternate"></link><published>2009-12-16T23:22:00+00:00</published><updated>2009-12-16T23:22:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-12-16:/~alex/blog/2009/12/16/end-to-end-connectivity/</id><summary type="html">&lt;p&gt;We had a slight degree of excitement this evening when we got home. All the power was out and the refrigerating appliances were slowing defrosting. Due to the randomness of the breakers tripping we thought it was the boiler. As it happened it was a earth-neutral leakage that was causing …&lt;/p&gt;</summary><content type="html">&lt;p&gt;We had a slight degree of excitement this evening when we got home. All the power was out and the refrigerating appliances were slowing defrosting. Due to the randomness of the breakers tripping we thought it was the boiler. As it happened it was a earth-neutral leakage that was causing the craziness. Once that was all sorted out I sacked off doing the washing-up to do a little more tweaking.&lt;/p&gt;
&lt;p&gt;I'm almost there with the &lt;a class="reference external" href="http://github.com/stsquad/emacs_chrome"&gt;Chromium extension&lt;/a&gt;. I based it on the work done by &lt;a class="reference external" href="http://www.thegibson.org/blog/archives/689"&gt;David Hilley&lt;/a&gt; and basically further hacked it about to make it work more like &lt;a class="reference external" href="http://trac.gerf.org/itsalltext"&gt;It's All Text&lt;/a&gt; on Firefox. I'm still using David's Python 2.6 shim layer to handle the edit requests until I can get around to implementing an elisp one for Emacs. Don't let my intention to do write one stop any readers from doing so in the meantime should you wish :-).&lt;/p&gt;
&lt;p&gt;It works if you stick to one page, currently it gets confused if you have multiple pages open which have sent edit requests. This is because the xmlcomms.js function which handles farming out the edit requests has a single reply_port parameter which will point to the port of the last page to connect to the master extension. I'll need to come up with a slightly neater solution but I'm fairly crusty on Javascript.&lt;/p&gt;
&lt;p&gt;Hopefully I'll get around to packaging it up properly in the next few days. In the meantime you can run it from a git checkout by pointing the Extensions page at it via &amp;quot;Load Unpacked Extension&amp;quot;.&lt;/p&gt;
&lt;p&gt;Still it's my first Chromium extension so I feel quite proud of myself :-)&lt;/p&gt;
</content><category term="general"></category><category term="chromium"></category><category term="emacs"></category><category term="extensions"></category><category term="house"></category><category term="javascript"></category></entry><entry><title>Chrome and Emacsclient</title><link href="https://www.bennee.com/~alex/blog/2009/12/12/chrome-and-emacsclient/" rel="alternate"></link><published>2009-12-12T13:24:00+00:00</published><updated>2009-12-12T13:24:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-12-12:/~alex/blog/2009/12/12/chrome-and-emacsclient/</id><summary type="html">&lt;p&gt;I had a number of things planned to do today, one of which was to go pick up some parcels that the local delivery service failed to do. However some workmen started digging up the road opposite my house. As the un-controlled single lane alternating between inbound and outbound traffic …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I had a number of things planned to do today, one of which was to go pick up some parcels that the local delivery service failed to do. However some workmen started digging up the road opposite my house. As the un-controlled single lane alternating between inbound and outbound traffic is right outside my drive I decided I couldn't face the horror and stayed in to tinker.&lt;/p&gt;
&lt;p&gt;I've switched my default browser settings to Chromium on all my machines. It's just so much faster to launch and get around. I've sacrificed the security of NoScript but I'm less worried about Flash on my netbook now as each tab kills any CPU sucking plugins when deleted. The only major problem left is finding an alternative to It's All Text so I don't have to fire up Firefox every time I post something to the web (like this blog entry).&lt;/p&gt;
&lt;p&gt;I decided to have a look into what was involved in getting a Chrome extension running that can call an external editor. I checked the group before I started and stumbled on Dave Hilley's &lt;a class="reference external" href="http://www.thegibson.org/blog/archives/689"&gt;rough cut solution&lt;/a&gt;. It's almost exactly what I need so I've started toying with it.&lt;/p&gt;
&lt;p&gt;Due to the way Chrome works it doesn't seem possible to spawn additional processes from Chrome itself (unless you want to use the NSAPI sledgehammer). Dave's solution is a simple server script that the Chrome extension can make calls to using XMLHttpRequest's. The server is written in Python but my first thought is there is no reason why the local &lt;em&gt;emacs --daemon&lt;/em&gt; couldn't terminate the calls directly. Certainly the &lt;a class="reference external" href="http://www.emacswiki.org/emacs-se/EmacsEchoServer"&gt;example echo server&lt;/a&gt; on the Emacs Wiki doesn't look too complicated to hack up.&lt;/p&gt;
&lt;p&gt;The other thing that could be improved is the detection of text areas. Currently the Javascript just searches the DOM for text areas and selects the first one as a candidate for editing. I'm fairly sure it would be possible to detect either which text area currently has focus or do something more akin to It's All Text and wrap unique &amp;lt;div&amp;gt;'s around each text area and have a edit content button.&lt;/p&gt;
&lt;p&gt;Unfortunately I seem to be having trouble getting the Chrome side to work. Trying to set breakpoints in the extension scripts keeps causing the extension to &amp;quot;crash&amp;quot; so it's hard to follow the sequence and tweak it. I also have to wrap my mind around Chrome's distinction between &amp;quot;content&amp;quot; and extension scripts. Still at least it's something to work from. Of course if anyone else wants to jump in with ideas (or even better a pointer to a better piece of emacs server code for handling XMLHttpRequests) then don't let my stumbling hack attempts hold you back :-)&lt;/p&gt;
</content><category term="geek"></category><category term="chrome"></category><category term="editor"></category><category term="emacs"></category><category term="extensions"></category><category term="javascript"></category></entry><entry><title>Post Travel Slump</title><link href="https://www.bennee.com/~alex/blog/2009/12/07/post-travel-slump/" rel="alternate"></link><published>2009-12-07T13:51:00+00:00</published><updated>2009-12-07T13:51:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-12-07:/~alex/blog/2009/12/07/post-travel-slump/</id><summary type="html">&lt;p&gt;I got back from my Hungarian adventures at a slightly more reasonable time than Wednesday mornings departure. Never the less I find travel still zaps the energy out of me. On Friday night I managed to eat dinner before crawling upstairs and passing out.&lt;/p&gt;
&lt;p&gt;Saturday has been &lt;a class="reference external" href="http://www.whereislittlebear.com/uncategorized/bunch-of-krull/"&gt;ably documented elsewhere …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;I got back from my Hungarian adventures at a slightly more reasonable time than Wednesday mornings departure. Never the less I find travel still zaps the energy out of me. On Friday night I managed to eat dinner before crawling upstairs and passing out.&lt;/p&gt;
&lt;p&gt;Saturday has been &lt;a class="reference external" href="http://www.whereislittlebear.com/uncategorized/bunch-of-krull/"&gt;ably documented elsewhere&lt;/a&gt; and basically involved a large amount of DVD watching. I was twiddling with my nascent &lt;a class="reference external" href="http://www.android.com/"&gt;Android&lt;/a&gt; application in the background but until I can make sense out of JDB and it's associated emacs GUD bindings it's going to be slow progress. Once I've figured out how to make breakpoints actually work as well as show position in the Android base code hopefully things will progress faster.&lt;/p&gt;
&lt;p&gt;Sunday involved much de-construction as we took down the metal fencing at the back of the property. We are planning on replacing the boundary with more aesthetically pleasing (and fruitful) bushes. Once that was done I was minded to have a final push at &lt;a class="reference external" href="http://www.rockbox.org/tracker/task/9677?project=1&amp;amp;only_watched=1"&gt;getting my playlist patch&lt;/a&gt; into Rockbox. I also did my bit testing another outside contributors &lt;a class="reference external" href="http://www.rockbox.org/tracker/task/10832?project=1&amp;amp;only_watched=1"&gt;better solution&lt;/a&gt; to my stale hacky &lt;a class="reference external" href="http://www.rockbox.org/tracker/task/10160?project=1&amp;amp;only_watched=1"&gt;m4a mdat patch&lt;/a&gt;. I can appreciate Juliusz' frustrations with getting things into &lt;a class="reference external" href="http://www.rockbox.org/"&gt;Rockbox&lt;/a&gt;. It's a great project and it's amazing we have truly free firmware we can install on a variety of bits of hardware. However it's by far and away one of the hardest communities I've had to deal with as a casual contributor. I don't know if the project suffers as a result, it's one of those hard to quantify things. I suspect the bar is pretty high anyway as the embedded nature probably rules out a lot of people used to desktop development unless they are really keen to dig into and learn the code.&lt;/p&gt;
</content><category term="geek"></category><category term="android"></category><category term="emacs"></category><category term="gud"></category><category term="rockbox"></category><category term="travel"></category></entry><entry><title>What's in your Browser?</title><link href="https://www.bennee.com/~alex/blog/2009/11/26/whats-in-your-browser/" rel="alternate"></link><published>2009-11-26T11:16:00+00:00</published><updated>2009-11-26T11:16:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-11-26:/~alex/blog/2009/11/26/whats-in-your-browser/</id><summary type="html">&lt;p&gt;The official &lt;a class="reference external" href="http://code.google.com/chrome/extensions/index.html"&gt;Chrome Extensions&lt;/a&gt; page is coming and soon I'll be seriously considering making a switch to my default browser setting. While &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Chromium_%28web_browser%29"&gt;Chromium&lt;/a&gt; (the open source component of Chrome) is a fantastically speedy, low memory and nimble browser it's lack of extensions if the main thing holding me back from …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The official &lt;a class="reference external" href="http://code.google.com/chrome/extensions/index.html"&gt;Chrome Extensions&lt;/a&gt; page is coming and soon I'll be seriously considering making a switch to my default browser setting. While &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Chromium_%28web_browser%29"&gt;Chromium&lt;/a&gt; (the open source component of Chrome) is a fantastically speedy, low memory and nimble browser it's lack of extensions if the main thing holding me back from making the fully committed switch. I already use it to access my various Google applications and it's also useful for accessing &lt;a class="reference external" href="http://www.last.fm/listen"&gt;last.fm radio&lt;/a&gt; as when the Flash plugin goes mad I don't have to kill my entire browsing session. With the discovery of the &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Greasemonkey"&gt;Greasemonkey&lt;/a&gt; based &lt;a class="reference external" href="http://userscripts.org/scripts/show/40933"&gt;AdSweep&lt;/a&gt; I can even move my Google Reader browsing across to Chromium without suffering from animated banner induced madness.&lt;/p&gt;
&lt;p&gt;However Firefox still has a number of killer Add-On's which would need to be ported before I can throw the switch. These include:&lt;/p&gt;
&lt;div class="section" id="firebug"&gt;
&lt;h2&gt;Firebug&lt;/h2&gt;
&lt;p&gt;&lt;a class="reference external" href="http://getfirebug.com/"&gt;Firebug&lt;/a&gt; has become an indispensable tool as I've done more JavaScript based hacking. I literally would not attempt to develop anything client side scripting based without this tool by my side.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="it-s-all-text"&gt;
&lt;h2&gt;It's All Text&lt;/h2&gt;
&lt;p&gt;This simple &lt;a class="reference external" href="http://trac.gerf.org/itsalltext"&gt;tool&lt;/a&gt; allows me to spawn an Emacs client to edit any text area on a web-page. It's what I use when I'm making blog posts and pretty much any non-trivial amount of web based text entry. While it might be tempting to do the Greasemonkey treatment to something like &lt;a class="reference external" href="http://www.ymacs.org/"&gt;Ymacs&lt;/a&gt; to get something close to the Emacs experience there is really no substitute for the real thing. Especially, as you may have noticed, when you want to insert code snippets into your posts.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
&amp;lt;h3&amp;gt;It's All Text&amp;lt;/h3&amp;gt;
This simple &amp;lt;a href=&amp;quot;http://trac.gerf.org/itsalltext&amp;quot;&amp;gt;tool&amp;lt;/a&amp;gt; allows
me to spawn an Emacs client to edit any text area on a web-page. It's
what I use when I'm making blog posts and pretty much any non-trivial
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="section" id="no-script"&gt;
&lt;h2&gt;No Script&lt;/h2&gt;
&lt;p&gt;The Web 2.0 experience is certainly a good thing, browsers have certainly moved from being a presenter of static pages to being a platform where all sorts of fantastic stuff can be done. However I still like to have &lt;a class="reference external" href="http://noscript.net/"&gt;control over who gets to run code in my browser&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I used to have &lt;a class="reference external" href="http://www.bugmenot.com/"&gt;Bug Me Not&lt;/a&gt; in my list of must-have extensions but to be honest I just skip stuff that requires registration these days. I'm looking forward to &lt;a class="reference external" href="http://www.bbc.co.uk/blogs/technology/2009/11/microsoft_and_murdoch_teaming.html"&gt;Murdoch's content&lt;/a&gt; dropping off the search engines radar when he finally learns to use &lt;a class="reference external" href="http://www.robotstxt.org/robotstxt.html"&gt;robots.txt&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So are there any extensions essential to your Firefox experience? Or have you already made the jump to Chrome(ium)? Or do you still see something in &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Opera_%28web_browser%29"&gt;Opera&lt;/a&gt; that I never could?&lt;/p&gt;
&lt;/div&gt;
</content><category term="geek"></category><category term="browsers"></category><category term="chromium"></category><category term="emacs"></category><category term="firefox"></category></entry><entry><title>Thinking about email</title><link href="https://www.bennee.com/~alex/blog/2009/11/17/thinking-about-email/" rel="alternate"></link><published>2009-11-17T12:49:00+00:00</published><updated>2009-11-17T12:49:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-11-17:/~alex/blog/2009/11/17/thinking-about-email/</id><summary type="html">&lt;p&gt;I saw a &lt;a class="reference external" href="http://keithp.com/blogs/notmuch/"&gt;post on my feeds&lt;/a&gt; today discussing a new email client called &lt;a class="reference external" href="http://notmuchmail.org/"&gt;notmuch&lt;/a&gt; which set me thinking about my own use of email.&lt;/p&gt;
&lt;p&gt;I have three primary ways of accessing email at the moment. On my domain I run &lt;a class="reference external" href="http://www.mutt.org/"&gt;Mutt&lt;/a&gt; in a screen session. At work I have …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I saw a &lt;a class="reference external" href="http://keithp.com/blogs/notmuch/"&gt;post on my feeds&lt;/a&gt; today discussing a new email client called &lt;a class="reference external" href="http://notmuchmail.org/"&gt;notmuch&lt;/a&gt; which set me thinking about my own use of email.&lt;/p&gt;
&lt;p&gt;I have three primary ways of accessing email at the moment. On my domain I run &lt;a class="reference external" href="http://www.mutt.org/"&gt;Mutt&lt;/a&gt; in a screen session. At work I have the GUI behemoth that is &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Evolution_%28software%29"&gt;Evolution&lt;/a&gt; and most of my mailing list subscriptions run through a &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Gmail"&gt;Gmail&lt;/a&gt; account I have set aside for the very purpose.&lt;/p&gt;
&lt;p&gt;I'm quite happy with Mutt for my main personal email. As I don't use my personal email to subscribe to mailing lists the volume is low, it's fairly quick and snappy to write email (in an emacsclient naturally) and searching is only a &amp;quot;/&amp;quot; away. However it is intrinsically a folder based email client which works fine as I only have two folders: Inbox and Oldmail. I periodically (~annually) move email into Oldmail when Mutt starts to slow down on start-up.&lt;/p&gt;
&lt;p&gt;The main bugbear is my work email. I mainly run evolution through inertia and 2 features:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;It connects to the work Exchange server, although calendering doesn't really work properly as I can't Accept/Decline meeting invites.&lt;/li&gt;
&lt;li&gt;The vFolder concept allows me to easily separate company emails from the bug tracker and CVS commits and the odd work related mailing list while still offering a quick eyeball indication of what pending emails there are.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Other than those features Evolution sucks balls in every other way. It takes an age to compose a new email, I have to shut it down every night to avoid swap death and it's certainly not keyboard operable.&lt;/p&gt;
&lt;p&gt;The GMail account I have to live with as there isn't really anywhere else I can easily index and search the 4gb (and growing) of mailing lists I subscribe to. Of course it is accessible via IMAP so it would be nice if I could access it from the same client, especially as the web interface tends to munge in-line patches.&lt;/p&gt;
&lt;p&gt;The obvious choice would be to look into one of the many many modes for handling email in emacs. However the plethora of choices is one that makes selecting one to try even harder. Some people at work have fetchmail tasks setup to mirror the email on the server which sounds a little clunky but I guess must work well enough. I don't think it would be practical for Gmail though, I usually just browse through various tags for mailing lists, including the very handy 'mythreads' which marks any email list thread I'm involved in.&lt;/p&gt;
&lt;p&gt;I think the key feature I need will be something like Evolutions vFolders for the quick eyeball along with a decent way to interact with Gmail. Any suggestions?&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="email"></category><category term="gmail"></category><category term="imap"></category><category term="mail"></category></entry><entry><title>Avoiding RSI one keypress at a time</title><link href="https://www.bennee.com/~alex/blog/2009/11/04/avoiding-rsi-one-keypress-at-a-time/" rel="alternate"></link><published>2009-11-04T12:04:00+00:00</published><updated>2009-11-04T12:04:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-11-04:/~alex/blog/2009/11/04/avoiding-rsi-one-keypress-at-a-time/</id><summary type="html">&lt;p&gt;Much as I love emacs some of the key combinations it expects of you to a) remember b) use are don't help when your trying to ameliorate the effects of RSI. As I spend an lot of time in compilation mode the following quick win helps:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(define-key compilation-mode-map (kbd &amp;quot;n …&lt;/pre&gt;</summary><content type="html">&lt;p&gt;Much as I love emacs some of the key combinations it expects of you to a) remember b) use are don't help when your trying to ameliorate the effects of RSI. As I spend an lot of time in compilation mode the following quick win helps:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(define-key compilation-mode-map (kbd &amp;quot;n&amp;quot;) 'compilation-next-error)
(define-key compilation-mode-map (kbd &amp;quot;p&amp;quot;) 'compilation-previous-error)
&lt;/pre&gt;
&lt;p&gt;If you try executing (self-insert-command) the buffer would complain it's read-only anyway. I took this single keypress approach to the next level when I was doing a lot of patch merging and &lt;a class="reference external" href="http://github.com/stsquad/my-emacs-stuff/blob/master/my-diff-mode.el"&gt;tweaked diff-mode&lt;/a&gt; to be a little less multi-finger.&lt;/p&gt;
</content><category term="general"></category><category term="emacs"></category><category term="rsi"></category></entry><entry><title>Migrated to Wordpress</title><link href="https://www.bennee.com/~alex/blog/2009/11/02/migrated-to-wordpress/" rel="alternate"></link><published>2009-11-02T11:34:00+00:00</published><updated>2009-11-02T11:34:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-11-02:/~alex/blog/2009/11/02/migrated-to-wordpress/</id><summary type="html">&lt;p&gt;I've finally gotten around to migrating the blog to Wordpress. While I'm still very happy with Personal Weblog it was getting a little long in the tooth and given &lt;a class="reference external" href="http://www.livejournal.com/support/"&gt;Livejournal's ongoing problems with syndicated feeds&lt;/a&gt; I thought it would be easier to host everything (including comments) on my site. You …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've finally gotten around to migrating the blog to Wordpress. While I'm still very happy with Personal Weblog it was getting a little long in the tooth and given &lt;a class="reference external" href="http://www.livejournal.com/support/"&gt;Livejournal's ongoing problems with syndicated feeds&lt;/a&gt; I thought it would be easier to host everything (including comments) on my site. You can see the very ugly migration script &lt;a class="reference external" href="http://github.com/stsquad/Personal-Weblog-to-Wordpress"&gt;on github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The one remaining thing to do is code up some re-directs in the original news.php page so the syndicated feed still slurps up something, but there is no rush I guess seeing as LJ isn't currently paying attention.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT TO ADD:&lt;/strong&gt;Well LJ may not be paying attention but I've implemented the redirect for both normal pages and RSS feeds. Old permalinks should continue to the old page.&lt;/p&gt;
</content><category term="general"></category><category term="blog"></category><category term="emacs"></category><category term="meta"></category><category term="site"></category><category term="wordpress"></category></entry><entry><title>Should have been obvious...</title><link href="https://www.bennee.com/~alex/blog/2009/09/15/1295/" rel="alternate"></link><published>2009-09-15T13:04:00+01:00</published><updated>2009-09-15T13:04:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-09-15:/~alex/blog/2009/09/15/1295/</id><summary type="html">&lt;p&gt;I recently turned on longlines-mode for my &lt;a class="reference external" href="https://addons.mozilla.org/en-US/firefox/addon/4125"&gt;It's All Text&lt;/a&gt; buffers as that is generally what I want (especially for this blog). However when I'm editing email for GMail I want to be able to switch between modes as I may be writing a simple message or inserting a patch …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I recently turned on longlines-mode for my &lt;a class="reference external" href="https://addons.mozilla.org/en-US/firefox/addon/4125"&gt;It's All Text&lt;/a&gt; buffers as that is generally what I want (especially for this blog). However when I'm editing email for GMail I want to be able to switch between modes as I may be writing a simple message or inserting a patch which shouldn't get mangled.&lt;/p&gt;
&lt;p&gt;It took me a bit longer than it should because I was scratching my head trying to work out how to tell if a mode was on. Once I actually read the code it was obvious there is both &lt;em&gt;longlines-mode&lt;/em&gt; the variable and &lt;em&gt;(longlines-mode)&lt;/em&gt; the function, hence &lt;a class="reference external" href="http://github.com/stsquad/my-emacs-stuff/commit/b015520c888412d5f898a802da8d681f0223731b"&gt;this tweak&lt;/a&gt;. I guess it's an idiom enforced by the define-minor-mode macro but I have to admit there is some unfamiliar syntax which I didn't follow. I shall put exploring the elisp macro syntax on my list of things to do once the house is sorted.&lt;/p&gt;
</content><category term="misc"></category><category term="emacs"></category></entry><entry><title>Updates and clarifications</title><link href="https://www.bennee.com/~alex/blog/2009/08/26/updates-and-clarifications/" rel="alternate"></link><published>2009-08-26T13:19:00+01:00</published><updated>2009-08-26T13:19:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-08-26:/~alex/blog/2009/08/26/updates-and-clarifications/</id><summary type="html">&lt;p&gt;My &lt;a class="reference external" href="http://www.bennee.com/~alex/news.php?wl_mode=more&amp;amp;wl_eid=1292"&gt;previous post&lt;/a&gt; regarding the frustrations of a slow frame update when &lt;em&gt;emacsclient&lt;/em&gt; was spawning frames wasn't helped by a gotcha I've walked into a couple of times regarding the if function. In my haste to debug problems I'd added a &lt;em&gt;message&lt;/em&gt; in some code:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
 (if I-am-emacs-22+
+    (message &amp;quot;loading color-theme …&lt;/pre&gt;</summary><content type="html">&lt;p&gt;My &lt;a class="reference external" href="http://www.bennee.com/~alex/news.php?wl_mode=more&amp;amp;wl_eid=1292"&gt;previous post&lt;/a&gt; regarding the frustrations of a slow frame update when &lt;em&gt;emacsclient&lt;/em&gt; was spawning frames wasn't helped by a gotcha I've walked into a couple of times regarding the if function. In my haste to debug problems I'd added a &lt;em&gt;message&lt;/em&gt; in some code:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
 (if I-am-emacs-22+
+    (message &amp;quot;loading color-theme at %s&amp;quot; (current-time-string))
     (if (maybe-load-library &amp;quot;color-theme&amp;quot;)
&lt;/pre&gt;
&lt;p&gt;As my eyes are used to scanning indentation and considerably sparser use of {}'s I never twigged that I'd completely changed the meaning of the code. As &lt;em&gt;C-f h if&lt;/em&gt; will tell you:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
if is a special form in `C source code'.

(if cond then else...)

If cond yields non-nil, do then, else do else...
Returns the value of then or the value of the last of the else's.
then must be one expression, but else... can be zero or more expressions.
If cond yields nil, and there are no else's, the value is nil.
&lt;/pre&gt;
&lt;p&gt;If we ever want to have multiple line of functions in the &amp;quot;true&amp;quot; case you always need to wrap them up using something like &lt;em&gt;progn&lt;/em&gt;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(if &amp;quot;true&amp;quot;
    (progn
      (message &amp;quot;It's true&amp;quot;)
      (message &amp;quot;I wanted to say something else&amp;quot;))
  (message &amp;quot;No it's not&amp;quot;))
&lt;/pre&gt;
&lt;p&gt;Of course this makes things a little messier (even more parenthesis!) and you'll notice a lot of LISP code strives to be as dense as possible. However it's a worthwhile gotcha to keep in mind if your just starting with LISP.&lt;/p&gt;
&lt;p&gt;In the meantime I've made a &lt;a class="reference external" href="http://github.com/stsquad/dotfiles/commit/7d90254c7619476558f61aed1f53b47c5e602d2d"&gt;few changes&lt;/a&gt; to my &lt;em&gt;.bashrc_emacs&lt;/em&gt; when I realised having &lt;em&gt;emacsclient&lt;/em&gt; called with -n makes no sense in &lt;strong&gt;EDITOR&lt;/strong&gt; and &lt;strong&gt;VISUAL&lt;/strong&gt; environment variables. These variables are typically used by tools such as &lt;em&gt;crontab&lt;/em&gt; or &lt;em&gt;git&lt;/em&gt; which get confused when the editor they spawned for a user input returns straight away.&lt;/p&gt;
&lt;p&gt;I also solved (or at least mitigated) the slow drawing of new frames by &lt;a class="reference external" href="http://github.com/stsquad/my-emacs-stuff/commit/c3fcdf1fd5a5af472e798fc5c996ca120bbb66c5"&gt;caching the colour theme&lt;/a&gt; so it doesn't get set every time I bring up a new frame. Notice the use of &lt;em&gt;progn&lt;/em&gt; in the code ;-)&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(defvar my-last-theme 'nil
  &amp;quot;Last color theme we set&amp;quot;)

(defun my-color-theme-set (theme)
  &amp;quot;Set colour theme but don't bother if we already have&amp;quot;
  (if (eq my-last-theme theme)
      (message &amp;quot;my-color-theme-set: theme already set&amp;quot;)
    (if (fboundp theme)
        (progn
          (funcall theme)
          (setq my-last-theme theme)))))

(defun my-set-tty-colours ()
  &amp;quot;Set the colours for tty mode&amp;quot;
  (my-color-theme-set 'color-theme-midnight)
  ; some tweaks
  (set-face-attribute 'show-paren-match-face nil :weight 'extra-bold)
  (set-face-background 'region &amp;quot;blue&amp;quot;))

(defun my-set-x-colours()
  &amp;quot;Set the colours for X windows mode&amp;quot;
  (my-color-theme-set 'color-theme-gnome2))

(defun my-new-frame-colours(frame)
  &amp;quot;Set the colour scheme of a new frame&amp;quot;
  (if (frame-parameter frame 'tty)
      (my-set-tty-colours)
    (my-set-x-colours)))

; Lets hook into the frame function
(add-hook 'after-make-frame-functions 'my-new-frame-colours)
&lt;/pre&gt;
</content><category term="geek"></category><category term="emacs"></category></entry><entry><title>The curious case of (make-frame) delays</title><link href="https://www.bennee.com/~alex/blog/2009/08/22/the-curious-case-of-make-frame-delays/" rel="alternate"></link><published>2009-08-22T16:32:00+01:00</published><updated>2009-08-22T16:32:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-08-22:/~alex/blog/2009/08/22/the-curious-case-of-make-frame-delays/</id><summary type="html">&lt;p&gt;I had a problem on my home machine with the way emacs created new X frames. New frames would appear but then pause for 4-8 seconds before I could type any text. My question to the &lt;a class="reference external" href="http://thread.gmane.org/gmane.emacs.help/67364"&gt;mailing list&lt;/a&gt; was met with a comment to get a faster graphics card. This …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I had a problem on my home machine with the way emacs created new X frames. New frames would appear but then pause for 4-8 seconds before I could type any text. My question to the &lt;a class="reference external" href="http://thread.gmane.org/gmane.emacs.help/67364"&gt;mailing list&lt;/a&gt; was met with a comment to get a faster graphics card. This seemed a little silly so this morning I put on my debugging head and tried to figure out what was going on.&lt;/p&gt;
&lt;p&gt;First up was &lt;a class="reference external" href="http://oprofile.sourceforge.net/news/"&gt;OProfile&lt;/a&gt; which confirmed that the problem wasn't CPU bound anywhere in the system. Then I threw the &lt;a class="reference external" href="http://www.python.org/emacs/elp.el"&gt;Emacs Lisp Profiler&lt;/a&gt; at the problem:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(load-library &amp;quot;elp&amp;quot;)
(elp-instrument-function 'make-frame)
(elp-instrument-package &amp;quot;frame&amp;quot;)
(make-frame)
(elp-results)
&lt;/pre&gt;
&lt;p&gt;This confirmed that the &amp;quot;make-frame&amp;quot; function was indeed taking between 8-12 seconds to complete. However none of the other frame functions where taking that long. Time for another tack and breaking out strace. This did show that emacs was getting a lot of -EAGAIN's while reading from a Unix socket. Unfortunately it seems impossible to find out what the other end of the socket is connected to on Linux. I had some guesses but couldn't narrow it down.&lt;/p&gt;
&lt;p&gt;Then I started emacs with &amp;quot;-q --daemon&amp;quot; so I could use &lt;a class="reference external" href="http://gnufans.net/~deego/pub/emacspub/lisp-mine/dope/"&gt;Dope&lt;/a&gt; to profile by .emacs. A quick test showed that new frames popped up straight away before my init file was loaded. This really should have been the first thing I checked as often configurations can break things.&lt;/p&gt;
&lt;p&gt;After some radical M-x comment-region surgery on the .emacs I found that unsurprisingly my &lt;a class="reference external" href="http://github.com/stsquad/my-emacs-stuff/blob/0ce1e494802eb7696bc218e65d0fafbdb13bec43/dotemacs#L504"&gt;display hacks&lt;/a&gt; seemed to be the culprit. I wasn't sure why so I started adding some (message) calls to the various functions to see if I could track down the delay. After instrumenting I found the problem had gone away which was very unexpected. In fact I tracked down the minimum diff to the following:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
diff --git a/dotemacs b/dotemacs
index 55609aa..6948e3c 100644
--- a/dotemacs
+++ b/dotemacs
&amp;#64;&amp;#64; -511,9 +511,11 &amp;#64;&amp;#64; on the command line&amp;quot;
 ; First we need the colour-theme package

 (if I-am-emacs-22+
+    (message &amp;quot;loading color-theme at %s&amp;quot; (current-time-string))
     (if (maybe-load-library &amp;quot;color-theme&amp;quot;)
        (if (fboundp 'color-theme-initialize)
-           (color-theme-initialize))))
+           (color-theme-initialize)))
+    (message &amp;quot;loading color-theme done at %s&amp;quot; (current-time-string)))

 ; Define the default frames sizes, shouldn't apply to a tty invocation
 ; TODO: handle remote sessions better, probably by probing remote X
&lt;/pre&gt;
&lt;p&gt;This doesn't make any sense to me. For starters the colour-theme library is only loaded on start-up not for every frame. Besides why would an additional message change this behaviour? Have I just triggered some sort of weird racyness? And what an earth could this have to do with all the -EAGAIN's I saw emacs suffering from when talking to the unknown Unix socket?&lt;/p&gt;
&lt;p&gt;One additional interesting data point from my investigation. Without the change the syscall count for a new frame looks like this:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
11:22 alex&amp;#64;danny/x86_64 [elisp.git] &amp;gt;strace -c -p 6369
Process 6369 attached - interrupt to quit
^CProcess 6369 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 42.11    0.000435           0      6692           writev
 40.08    0.000414           0     13674           poll
  9.68    0.000100           0     16940     10341 read
  4.55    0.000047           0      6637         1 rt_sigreturn
  3.58    0.000037           0      3700      3696 open
  0.00    0.000000           0         4           close
  0.00    0.000000           0         4           stat
  0.00    0.000000           0         2           fstat
  0.00    0.000000           0        17           brk
  0.00    0.000000           0        72           rt_sigprocmask
  0.00    0.000000           0       269         1 select
  0.00    0.000000           0         1           setitimer
  0.00    0.000000           0        41           kill
  0.00    0.000000           0         1           uname
  0.00    0.000000           0        10           getdents
------ ----------- ----------- --------- --------- ----------------
100.00    0.001033                 48064     14039 total
&lt;/pre&gt;
&lt;p&gt;And with the change we get this:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
11:24 alex&amp;#64;danny/x86_64 [elisp.git] &amp;gt;strace -c -p 6441
Process 6441 attached - interrupt to quit
^CProcess 6441 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00    0.000040           0      1189           poll
  0.00    0.000000           0      1135       706 read
  0.00    0.000000           0       268       264 open
  0.00    0.000000           0         4           close
  0.00    0.000000           0         4           stat
  0.00    0.000000           0         2           fstat
  0.00    0.000000           0        16           brk
  0.00    0.000000           0       114           rt_sigprocmask
  0.00    0.000000           0       433         2 rt_sigreturn
  0.00    0.000000           0       445           writev
  0.00    0.000000           0       140         2 select
  0.00    0.000000           0         3           setitimer
  0.00    0.000000           0        18           kill
  0.00    0.000000           0         1           uname
  0.00    0.000000           0        10           getdents
------ ----------- ----------- --------- --------- ----------------
100.00    0.000040                  3782       974 total
&lt;/pre&gt;
&lt;p&gt;It's all very curious.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT TO ADD:&lt;/strong&gt; Doh! It's all the fault of color theme. I was spending so much time being confused why the (message) patch changed everything and it's obvious when you look at it cleanly. The first (message) passes the (if I-am-emacs-22+ stanza and the else leg which loads color-theme is never executed. It then become very clear where the delay is coming from when you profile color-theme:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(load-library &amp;quot;elp&amp;quot;)
(elp-instrument-package &amp;quot;color&amp;quot;)
(elp-instrument-function 'modify-frame-parameters)

Function Name                                   Call Count  Elapsed Time  Average Time
==============================================  ==========  ============  ============
color-theme-gnome2                              1           6.949076      6.949076
color-theme-install                             6           6.9489930000  1.1581655000
modify-frame-parameters                         28          6.8929370000  0.2461763214
color-theme-install-frame-params                6           6.8865859999  1.1477643333
color-theme-blue-gnus                           1           1.707156      1.707156
color-theme-salmon-font-lock                    1           1.06505       1.06505
color-theme-blue-erc                            1           1.045608      1.045608
color-theme-salmon-diff                         1           1.041382      1.041382
color-theme-blue-eshell                         1           1.040324      1.040324
color-theme-install-faces                       6           0.062013      0.0103355
color-theme-spec-compat                         218         0.0012549999  5.756...e-06
color-values                                    21          0.000656      3.123...e-05
color-theme-filter                              18          0.000298      1.655...e-05
color-theme-install-variables                   6           9.7e-05       1.616...e-05
color-theme-plist-delete                        58          9.099...e-05  1.568...e-06
color-theme-alist-reduce                        12          3.9e-05       3.25e-06
color-theme-canonic                             6           3.700...e-05  6.166...e-06
color-theme-alist                               12          1.100...e-05  9.166...e-07
color-theme-variables                           6           9e-06         1.5e-06
color-theme-frame-params                        6           5.999...e-06  1e-06
color-theme-faces                               6           5.999...e-06  1e-06
color-theme-spec-filter                         1           2e-06         2e-06
&lt;/pre&gt;
&lt;p&gt;And it's very obvious that the extra eye candy is expensive, especially when applied to every frame.&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category></entry><entry><title>Using daemon mode</title><link href="https://www.bennee.com/~alex/blog/2009/08/09/1273/" rel="alternate"></link><published>2009-08-09T13:23:00+01:00</published><updated>2009-08-09T13:23:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-08-09:/~alex/blog/2009/08/09/1273/</id><summary type="html">&lt;p&gt;Now the Fedora 11 has &lt;a class="reference external" href="https://bugzilla.redhat.com/show_bug.cgi?id=487615"&gt;pushed Emacs 23&lt;/a&gt; into it's testing repository I can now have 23.1 goodness on all the machines I regularly interact with (although having checked my Gentoo box is still 23.0.96.1, must fix that). I've previously implemented &lt;a class="reference external" href="http://github.com/stsquad/my-emacs-stuff/blob/2939e6b33943baebc706676daefa5b5cbf467ec1/my-emacs-server.el"&gt;rather painful hacks&lt;/a&gt; to make …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Now the Fedora 11 has &lt;a class="reference external" href="https://bugzilla.redhat.com/show_bug.cgi?id=487615"&gt;pushed Emacs 23&lt;/a&gt; into it's testing repository I can now have 23.1 goodness on all the machines I regularly interact with (although having checked my Gentoo box is still 23.0.96.1, must fix that). I've previously implemented &lt;a class="reference external" href="http://github.com/stsquad/my-emacs-stuff/blob/2939e6b33943baebc706676daefa5b5cbf467ec1/my-emacs-server.el"&gt;rather painful hacks&lt;/a&gt; to make a --server mode work well but now the mainline supported --daemon mode is the new shizzle. I had a quick play with my .bashrc shell scripts and came up with:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
#!/bin/bash
#
# Alex's .bashrc_emacs
#
# Emacs Specific setup
#
# There is only one editor (although I can get to it in different ways).
# For most stuff I want to use emacsclient to spawn a quick shell and
# for emacs 23 I want to ensure the daemon is always running for the user.
#
# Luckily this is covered by specifying -a '' which will spawn a daemon if
# one is not running
#

if [[ &amp;quot;$DISPLAY&amp;quot; == &amp;quot;&amp;quot; ]]; then
    # Can we use muti-tty?
    emacsclient --help | grep &amp;quot;\-\-tty&amp;quot; &amp;gt; /dev/null
    if [[ &amp;quot;$?&amp;quot; == &amp;quot;0&amp;quot; ]]; then
        # Thats a yes
        EMACS_CMD=&amp;quot;emacsclient -a '' -t&amp;quot;
    else
        # Hmmm, opening in another pane would be a pain?
        EMACS_CMD=&amp;quot;emacs -nw &amp;quot;
    fi
else
    # otherwise don't wait and open a new frame
    EMACS_CMD=&amp;quot;emacsclient -n -a '' -c&amp;quot;
fi

# Set the environment variables for the editors
export EDITOR=${EMACS_CMD}
export VISUAL=${EMACS_CMD}
export ALTERNATE_EDITOR=emacs

# shortcut
alias ec=&amp;quot;${EMACS_CMD}&amp;quot;

# And finally lets get the status of the emacs server
DT=`emacsclient -a '' -e &amp;quot;(server-running-p)&amp;quot; 2&amp;gt; /dev/null`
echo &amp;quot;loading .bashrc_emacs (server-running-p)=${DT}&amp;quot;
&lt;/pre&gt;
&lt;p&gt;The &amp;quot;emacs -nw&amp;quot; fallback is a little redundant but I suppose it's worth keeping for the day someone gives me shell access without the latest goodies :-)&lt;/p&gt;
</content><category term="misc"></category><category term="emacs"></category></entry><entry><title>longlines-mode</title><link href="https://www.bennee.com/~alex/blog/2009/06/16/1251/" rel="alternate"></link><published>2009-06-16T15:06:00+01:00</published><updated>2009-06-16T15:06:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-06-16:/~alex/blog/2009/06/16/1251/</id><summary type="html">&lt;p&gt;I use a fantastic little Firefox add-on called &lt;a class="reference external" href="https://addons.mozilla.org/en-US/firefox/addon/4125"&gt;It's all Text&lt;/a&gt; to spawn an Emacs client when editing text boxes. However up until recently I kept having problems with formatting of my posts. Even though HTML doesn't really care about white space most blog software tends to treat them as …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I use a fantastic little Firefox add-on called &lt;a class="reference external" href="https://addons.mozilla.org/en-US/firefox/addon/4125"&gt;It's all Text&lt;/a&gt; to spawn an Emacs client when editing text boxes. However up until recently I kept having problems with formatting of my posts. Even though HTML doesn't really care about white space most blog software tends to treat them as though they mean something. This can lead to some ugly formatting because hidden HTML elements still count towards &lt;em&gt;auto-fill-mode&lt;/em&gt; when flowing text. Yes I can turn off auto-fill mode but then lines wrap at the full width of my emacs window.&lt;/p&gt;
&lt;p&gt;Enter &lt;em&gt;longlines-mode&lt;/em&gt; which still wraps the text pleasingly on my display but only puts the real &amp;quot;hard returns&amp;quot; in the final text. As a bonus it even shows me the real returns as special glyphs.&lt;/p&gt;
&lt;pre class="literal-block"&gt;
; I don't want all text-mode stuff to be auto-fill as editing text
; boxes can screw with the formatting (especially if html is involved)
(add-hook 'text-mode-hook
          '(lambda ()
             (if (string-match &amp;quot;itsalltext&amp;quot; (buffer-file-name))
                 (progn
                   (message &amp;quot;enabling long lines for itsalltext&amp;quot;)
                   (longlines-mode 1)
                   (longlines-show-hard-newlines))
               (turn-on-auto-fill))))
&lt;/pre&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="line"&gt;I can finally remove the horrible /r /n gobbling hack in my blog script and post code snippets formatted the way I want them :-)&lt;/div&gt;
&lt;/div&gt;
</content><category term="misc"></category><category term="emacs"></category></entry><entry><title>Getting it</title><link href="https://www.bennee.com/~alex/blog/2009/06/08/1246/" rel="alternate"></link><published>2009-06-08T22:50:00+01:00</published><updated>2009-06-08T22:50:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-06-08:/~alex/blog/2009/06/08/1246/</id><summary type="html">&lt;div class="line-block"&gt;
&lt;div class="line"&gt;Apparently according to href=&amp;quot;&lt;a class="reference external" href="http://c2.com/cgi/wiki?LispUsersAreArrogant"&gt;http://c2.com/cgi/wiki?LispUsersAreArrogant&lt;/a&gt;&amp;quot;&amp;gt;some learning&lt;/div&gt;
&lt;div class="line"&gt;Lisp is a path to programming enlightenment. Although I'm not in that&lt;/div&gt;
&lt;div class="line"&gt;school (elisp is about a better editor for me, not a way of life) I&lt;/div&gt;
&lt;div class="line"&gt;did have a slight light-bulb illuminating moment today.&lt;/div&gt;
&lt;/div&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;One of the …&lt;/div&gt;&lt;/div&gt;</summary><content type="html">&lt;div class="line-block"&gt;
&lt;div class="line"&gt;Apparently according to href=&amp;quot;&lt;a class="reference external" href="http://c2.com/cgi/wiki?LispUsersAreArrogant"&gt;http://c2.com/cgi/wiki?LispUsersAreArrogant&lt;/a&gt;&amp;quot;&amp;gt;some learning&lt;/div&gt;
&lt;div class="line"&gt;Lisp is a path to programming enlightenment. Although I'm not in that&lt;/div&gt;
&lt;div class="line"&gt;school (elisp is about a better editor for me, not a way of life) I&lt;/div&gt;
&lt;div class="line"&gt;did have a slight light-bulb illuminating moment today.&lt;/div&gt;
&lt;/div&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;One of the jobs I have at the moment is maintaining some href=&amp;quot;&lt;a class="reference external" href="http://en.wikipedia.org/wiki/Simple_Network_Management_Protocol"&gt;http://en.wikipedia.org/wiki/Simple_Network_Management_Protocol&lt;/a&gt;&amp;quot;&amp;gt;SNMP&lt;/div&gt;
&lt;div class="line"&gt;agent software. It's written in C with a hand hacked GTK GUI and very&lt;/div&gt;
&lt;div class="line"&gt;sparsely documented. One of the tasks has been converting a bunch of&lt;/div&gt;
&lt;div class="line"&gt;the code to abstract some of the SNMP tables into proper structures&lt;/div&gt;
&lt;div class="line"&gt;which is a massive improvement on the dense mixture of sparsely commented OID&lt;/div&gt;
&lt;div class="line"&gt;parsing/GUI update code. However I caught myself Copy &amp;amp; Pasting a lot of the&lt;/div&gt;
&lt;div class="line"&gt;boiler plate code because most of it is identical apart from the&lt;/div&gt;
&lt;div class="line"&gt;actual object parsing which looks like:&lt;/div&gt;
&lt;/div&gt;
&lt;pre class="literal-block"&gt;
if (snmp_oid_compare(oid, oid_entry_A))
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;obj-&amp;gt;valueA = oid-&amp;gt;val-&amp;gt;integer;
}
else if (snmp_oid_compare(oid, oid_entry_B))
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;obj-&amp;gt;stringB = g_memdup(oid-&amp;gt;val-&amp;gt;string)
}
&lt;/pre&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;Clearly something has gone wrong when you find yourself copying and&lt;/div&gt;
&lt;div class="line"&gt;pasting code. Really it should be possible to describe the mapping in&lt;/div&gt;
&lt;div class="line"&gt;a data structure and have one common set of code for iterating a&lt;/div&gt;
&lt;div class="line"&gt;table. I started wondering how such a structure would work:&lt;/div&gt;
&lt;/div&gt;
&lt;pre class="literal-block"&gt;
myMagicMappingTable[]= {
    {oid_a, INT, offset(&amp;amp;magicObj-&amp;gt;objA)},
    {oid_b, STRING, offset(&amp;amp;magicObj-&amp;gt;objB)},
}
&lt;/pre&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;Well that would work OK, except the munging code isn't quite all that&lt;/div&gt;
&lt;div class="line"&gt;boiler plate. The existing code isn't all straight mapping of SNMP&lt;/div&gt;
&lt;div class="line"&gt;types to the C structure. Also using offsets into anonymous structures&lt;/div&gt;
&lt;div class="line"&gt;is the sort of old-school C trick that one should try to avoid in&lt;/div&gt;
&lt;div class="line"&gt;maintainable code.&lt;/div&gt;
&lt;/div&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;As I thought on I considered a formulation involving C function&lt;/div&gt;
&lt;div class="line"&gt;pointers in the table. This would have involved a lot of typing to&lt;/div&gt;
&lt;div class="line"&gt;declare each function snippet before some shady casting tricks could&lt;/div&gt;
&lt;div class="line"&gt;be pulled. &amp;quot;What I really need&amp;quot;, I thought, &amp;quot;is some way to add&lt;/div&gt;
&lt;div class="line"&gt;anonymous functions to my data structure&amp;quot;. That's when the light bulb&lt;/div&gt;
&lt;div class="line"&gt;went off and I recalled the meaning of href=&amp;quot;&lt;a class="reference external" href="http://en.wikipedia.org/wiki/First-class_function"&gt;http://en.wikipedia.org/wiki/First-class_function&lt;/a&gt;&amp;quot;&amp;gt;first class&lt;/div&gt;
&lt;div class="line"&gt;functions and the world made a little more sense.&lt;/div&gt;
&lt;/div&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;So I can't recode this application into Lisp (or even elisp) but as an&lt;/div&gt;
&lt;div class="line"&gt;exercise I coded up an approach to the problem in emacs to see if&lt;/div&gt;
&lt;div class="line"&gt;things are making more sense. I ended up with:&lt;/div&gt;
&lt;/div&gt;
&lt;pre class="literal-block"&gt;
(setq snmp-results (list
                    (list &amp;quot;.1.2.3.4.5&amp;quot; &amp;quot;value A&amp;quot;)
                    (list &amp;quot;.1.2.3.4.6&amp;quot; &amp;quot;value B&amp;quot;)
                    (list &amp;quot;.1.2.3.4.7&amp;quot; &amp;quot;value C&amp;quot;)
                    (list &amp;quot;.1.2.3.4.8&amp;quot; &amp;quot;value D&amp;quot;)))

(setq magic-object (make-hash-table :test 'equal))

(setq magic-map   '(
                    (&amp;quot;.1.2.3.4.5&amp;quot; . (lambda (val obj)
                                      (puthash &amp;quot;thingA&amp;quot; val obj)))
                    (&amp;quot;.1.2.3.4.6&amp;quot; . (lambda (val obj)
                                      (message &amp;quot;skipping thing B&amp;quot;)))
                    (&amp;quot;.1.2.3.4.7&amp;quot; . (lambda (val obj)
                                      (puthash &amp;quot;thingC&amp;quot;
                                               (format &amp;quot;value is %s&amp;quot; val)
                                               obj)))))


(let ((results snmp-results))
  (while results
    (let ((pdu (pop results))
          (magic))
      (setq magic (assoc (car pdu) magic-map))
      (if magic
          (funcall (cdr magic) (cdr pdu) magic-object)
        (message &amp;quot;Couldn't map:%s&amp;quot; pdu)))))

(maphash (lambda (k v) (message &amp;quot;k:%s v:%s&amp;quot; k v)) magic-object)
=&amp;gt;
 k:thingA v:(value A)
 k:thingC v:value is (value C)
 nil
&lt;/pre&gt;
&lt;p&gt;And that code makes sense to me. I wonder if that means I'm starting to &amp;quot;get lisp&amp;quot;?&lt;/p&gt;
</content><category term="misc"></category><category term="emacs"></category></entry><entry><title>Messing about with emacs server</title><link href="https://www.bennee.com/~alex/blog/2009/06/02/1243/" rel="alternate"></link><published>2009-06-02T17:11:00+01:00</published><updated>2009-06-02T17:11:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-06-02:/~alex/blog/2009/06/02/1243/</id><summary type="html">&lt;p&gt;I've been messing around with some weird-ass behaviour with my emacs-server. I had some code in it to deal with automatically opening a fresh frame (while in X) which I had plugged from the &lt;a class="reference external" href="http://www.emacswiki.org/emacs/EmacsClient#toc14"&gt;emacsclient wiki page&lt;/a&gt;. In one of my more recent updates the bleeding edge emacs I run …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been messing around with some weird-ass behaviour with my emacs-server. I had some code in it to deal with automatically opening a fresh frame (while in X) which I had plugged from the &lt;a class="reference external" href="http://www.emacswiki.org/emacs/EmacsClient#toc14"&gt;emacsclient wiki page&lt;/a&gt;. In one of my more recent updates the bleeding edge emacs I run on most (but not all) of my boxes gained -c option to create a new frame for editing.&lt;/p&gt;
&lt;p&gt;This caused all sorts of confusion and I started seeing inconsistent behaviour between invocations of emacsclient causing new frames to maybe appear or multiple frames being created. A bunch of (message)'s latter I started making the code more defencive and detecting the case when the current frame was the original server frame.&lt;/p&gt;
&lt;p&gt;It was at this point the inconsistent behaviour disappeared and I was able to reliably bring up a fresh focused frame for everything I was editing. Calls without the -c parameter will cause the code to spawn a new frame automatically although it doesn't benefit from correct workspace focus -c will give you. I can only think that the code as it was would break at some subtle point (I'm guessing the server-edit-hook) and at that point not be able to recover. Still the &lt;a class="reference external" href="http://github.com/stsquad/my-emacs-stuff/commit/95c3569e0f55d51150b42bc4382b516885b972dc"&gt;changes I've made&lt;/a&gt; do seem to have improved things for now. Now all I need to do is test it on the other boxen with emacsen.&lt;/p&gt;
</content><category term="misc"></category><category term="emacs"></category></entry><entry><title>Desktop Save Mode</title><link href="https://www.bennee.com/~alex/blog/2009/06/01/desktop-save-mode/" rel="alternate"></link><published>2009-06-01T18:56:00+01:00</published><updated>2009-06-01T18:56:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-06-01:/~alex/blog/2009/06/01/desktop-save-mode/</id><summary type="html">&lt;p&gt;While browsing &lt;a class="reference external" href="http://stackoverflow.com/questions/847962/what-alternate-session-managers-are-available-for-emacs"&gt;stackoverflow&lt;/a&gt; I (re)discovered &lt;a class="reference external" href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html"&gt;Desktop Save Mode&lt;/a&gt; which I must of &lt;a class="reference external" href="http://github.com/stsquad/my-emacs-stuff/commit/b2b7428026ea8cae4964d6bc6debe77d148f7cc1"&gt;played with&lt;/a&gt; in an earlier emacs version and then disabled. My only gripe at the moment is watching emacs load everything in it's old face style before my magic new frame starts up. I suspect this is …&lt;/p&gt;</summary><content type="html">&lt;p&gt;While browsing &lt;a class="reference external" href="http://stackoverflow.com/questions/847962/what-alternate-session-managers-are-available-for-emacs"&gt;stackoverflow&lt;/a&gt; I (re)discovered &lt;a class="reference external" href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html"&gt;Desktop Save Mode&lt;/a&gt; which I must of &lt;a class="reference external" href="http://github.com/stsquad/my-emacs-stuff/commit/b2b7428026ea8cae4964d6bc6debe77d148f7cc1"&gt;played with&lt;/a&gt; in an earlier emacs version and then disabled. My only gripe at the moment is watching emacs load everything in it's old face style before my magic new frame starts up. I suspect this is probably a hangover from the funny hacks I have to ensure the default frame appears as I want it.&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category></entry><entry><title>New Feed: Emacs Stuff</title><link href="https://www.bennee.com/~alex/blog/2009/05/29/1239/" rel="alternate"></link><published>2009-05-29T12:59:00+01:00</published><updated>2009-05-29T12:59:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-05-29:/~alex/blog/2009/05/29/1239/</id><summary type="html">&lt;p&gt;I've created a new &lt;a class="reference external" href="http://www.bennee.com/~alex/news.php?wl_topic=6&amp;amp;wl_mode=rss"&gt;feed&lt;/a&gt; for my emacs related posts (there are &lt;a class="reference external" href="http://bennee.com/~alex/feeds.php"&gt;more&lt;/a&gt;) with an eye to getting it syndicated on &lt;a class="reference external" href="http://planet.emacsen.org/"&gt;Planet Emacs&lt;/a&gt; and joining the wider emacs blogging community. Of course this means I'll have to blog about emacs more often which may throw the &amp;quot;all topics&amp;quot; &lt;a class="reference external" href="http://syndicated.livejournal.com/stsquad_real/"&gt;syndicated livejournal …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've created a new &lt;a class="reference external" href="http://www.bennee.com/~alex/news.php?wl_topic=6&amp;amp;wl_mode=rss"&gt;feed&lt;/a&gt; for my emacs related posts (there are &lt;a class="reference external" href="http://bennee.com/~alex/feeds.php"&gt;more&lt;/a&gt;) with an eye to getting it syndicated on &lt;a class="reference external" href="http://planet.emacsen.org/"&gt;Planet Emacs&lt;/a&gt; and joining the wider emacs blogging community. Of course this means I'll have to blog about emacs more often which may throw the &amp;quot;all topics&amp;quot; &lt;a class="reference external" href="http://syndicated.livejournal.com/stsquad_real/"&gt;syndicated livejournal feed&lt;/a&gt; people, but they are probably use to the wild swings between general trivia and geek overload already :-)&lt;/p&gt;
&lt;p&gt;As soon as I have a working solution for my &amp;quot;emacsclient frames keep jumping to the wrong workspace&amp;quot; problem I'll be sure to post it up here.&lt;/p&gt;
</content><category term="misc"></category><category term="emacs"></category></entry><entry><title>Bunker mentality</title><link href="https://www.bennee.com/~alex/blog/2009/02/06/bunker-mentality/" rel="alternate"></link><published>2009-02-06T09:58:00+00:00</published><updated>2009-02-06T09:58:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2009-02-06:/~alex/blog/2009/02/06/bunker-mentality/</id><summary type="html">&lt;p&gt;True to &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Hofstadter's_law"&gt;Hofstader's law&lt;/a&gt; it took a few extra days to finish of my (unpaid) work at Essex University. You can see the final results &lt;a class="reference external" href="http://github.com/stsquad/same-diff-colour-test/tree/master"&gt;here&lt;/a&gt;. It was essentially tweaking a psychology experiment to work in a different colour space and with some funky high dynamic colour range hardware. After …&lt;/p&gt;</summary><content type="html">&lt;p&gt;True to &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Hofstadter's_law"&gt;Hofstader's law&lt;/a&gt; it took a few extra days to finish of my (unpaid) work at Essex University. You can see the final results &lt;a class="reference external" href="http://github.com/stsquad/same-diff-colour-test/tree/master"&gt;here&lt;/a&gt;. It was essentially tweaking a psychology experiment to work in a different colour space and with some funky high dynamic colour range hardware. After the first day of struggling with Python IDLE editor I caved in and installed a &lt;a class="reference external" href="http://ourcomments.org/Emacs/EmacsW32.html"&gt;Windows aware copy of Emacs&lt;/a&gt; and fiddled with getting python-mode working in Windows. It removed a lot of the pain apart from every time the keymap randomly switched and whenever I had to use the browser which didn't have an awesome bar. And I certainly don't miss the constant reboots and bad crashes.&lt;/p&gt;
&lt;p&gt;The last few days we have been hunkered in at home as the weather decides how much snow it will dump each day. The trains to London are basically broken so Fliss has been working from home. I'm also working from home and onto my next project of generating smart playlists for Rhythmbox. Luckily it seems someone has &lt;a class="reference external" href="http://www.mail-archive.com/rhythmbox-devel&amp;#64;gnome.org/msg05606.html"&gt;already done some work&lt;/a&gt; on this so I can concentrate on plumbing the existing code into Rhythmbox and cleaning up the UI.&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="windows"></category><category term="work"></category></entry><entry><title>More emacs server support</title><link href="https://www.bennee.com/~alex/blog/2008/11/03/more-emacs-server-support/" rel="alternate"></link><published>2008-11-03T19:05:00+00:00</published><updated>2008-11-03T19:05:00+00:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2008-11-03:/~alex/blog/2008/11/03/more-emacs-server-support/</id><summary type="html">&lt;p&gt;I found that one of the &lt;a class="reference external" href="http://emacs.orebokech.com/"&gt;Debian developers&lt;/a&gt; packages emacs-snapshot for Debian stable. A little bit of &lt;a class="reference external" href="http://github.com/stsquad/dotfiles/commit/ecb4e99a697e63f71f069222482a812cd72cb09e"&gt;shell script&lt;/a&gt; later and my &lt;a class="reference external" href="http://www.mutt.org/"&gt;Mutt&lt;/a&gt; is firing off a &lt;a class="reference external" href="http://www.enigmacurry.com/2007/05/24/multi-tty-emacs-on-gentoo-and-ubuntu/"&gt;muti-tty emacsclients&lt;/a&gt; whenever I need to edit a mail. It shaves literally seconds off the time it takes me to compose an email …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I found that one of the &lt;a class="reference external" href="http://emacs.orebokech.com/"&gt;Debian developers&lt;/a&gt; packages emacs-snapshot for Debian stable. A little bit of &lt;a class="reference external" href="http://github.com/stsquad/dotfiles/commit/ecb4e99a697e63f71f069222482a812cd72cb09e"&gt;shell script&lt;/a&gt; later and my &lt;a class="reference external" href="http://www.mutt.org/"&gt;Mutt&lt;/a&gt; is firing off a &lt;a class="reference external" href="http://www.enigmacurry.com/2007/05/24/multi-tty-emacs-on-gentoo-and-ubuntu/"&gt;muti-tty emacsclients&lt;/a&gt; whenever I need to edit a mail. It shaves literally seconds off the time it takes me to compose an email!&lt;/p&gt;
</content><category term="geek"></category><category term="emacs"></category><category term="mutt"></category></entry><entry><title>Lisp Service</title><link href="https://www.bennee.com/~alex/blog/2008/08/29/1102/" rel="alternate"></link><published>2008-08-29T11:49:00+01:00</published><updated>2008-08-29T11:49:00+01:00</updated><author><name>alex</name></author><id>tag:www.bennee.com,2008-08-29:/~alex/blog/2008/08/29/1102/</id><summary type="html">&lt;p&gt;I finally figured out the correct magic to pass custom command line arguments to my emacs. This has allowed me to get the emacs-server running in a way more tuned to the way I work.&lt;/p&gt;
&lt;p&gt;A lot of emacs people only run one instance of emacs and therefor take the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I finally figured out the correct magic to pass custom command line arguments to my emacs. This has allowed me to get the emacs-server running in a way more tuned to the way I work.&lt;/p&gt;
&lt;p&gt;A lot of emacs people only run one instance of emacs and therefor take the start-up hit and leave it at that. I however tend to run several (one per project) so I can keep a certain amount of state in each session. All the solutions involving shell scripting to optionally use emacs client weren't quite what I wanted. Instead I want to start up one emacs at the start of my windows session that handles all the emacsclient stuff (like editing web-forms) and leave everything as is. It will be no surprise to emacs users that there is a hook for processing custom command line options so now my emacs is &amp;quot;-server&amp;quot; enabled. The only wrinkle is the command line options are processed after you .emacs is loaded so I can't define a &amp;quot;-skip-stuff-for-mutts-edits&amp;quot; flag for invoking from mutt. I don't really want to start messing with the Muti-TTY stuff just yet so I suspect rather than custom flags I may well start parsing the command line to detect mutt temp files.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; My emacs commit is mirrored &lt;a class="reference external" href="http://github.com/stsquad/my-emacs-stuff/commit/16f86aa4bb0bd1be55479085dce514d759a07426"&gt;here&lt;/a&gt;.&lt;/p&gt;
</content><category term="misc"></category><category term="emacs"></category></entry></feed>