<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/1999/html" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Prosthetic Conscience</title><link>http://www.carcosa.net/jason/blog</link><description>Jason McBrayer's weblog; occasional personal notes and commentary</description><language>en</language><ttl>60</ttl><dc:creator>Jason F. McBrayer</dc:creator><admin:generatorAgent rdf:resource="http://pyblosxom.sourceforge.net/"/><admin:errorReportsTo rdf:resource="mailto:jmcbray-blog@carcosa.net"/><item><title>Running Emacs on an Android tablet</title><guid isPermaLink="false">computing/emacs/2012-07-19-21-31-emacs-on-android</guid><link>http://www.carcosa.net/jason/blog/computing/emacs/2012-07-19-21-31-emacs-on-android</link><description>One of the things I've always wanted in a portable computer is the ability to run Emacs . The main ...</description><content:encoded><![CDATA[

<p><a href="/jason/images/shot_000002.png">
<img src="/jason/images/shot_000002_t.png"
     style="float: left; margin: 1em;"/>
</a></p>

<p>One of the things I've always wanted in a portable computer is the
ability to run <a href="http://www.gnu.org/emacs/">Emacs</a>. The main reason is that since 2005 or so,
my whole life has been run in <a href="http://www.orgmode.org/">org-mode</a>, and, slightly before
that, in <a href="http://howm.sourceforge.jp/">howm</a>. So, of course, when I got a low-end <a href="https://developer.android.com/index.html">Android</a>
tablet, an <a href="https://www.archos.com/products/ta/archos_70it/index.html?lang=en">Archos 70</a>, of course, I...didn't install Emacs on
it. As <a href="http://www.emacswiki.org/emacs/EmacsOnAndroid">EmacsWiki</a> implies, there's no perfectly obvious way to do
so. And, there's <a href="https://github.com/matburt/mobileorg-android/">MobileOrg-Android</a>. When I first got my tablet,
MobileOrg-Android was pretty bad. But it got better. Today, it's got a
great user interface, syncing is fast and generally reliable, and
there's an active core group of developers who are constantly adding
features and contributing back to org-mode itself.</p>

<p>But...after quite a bit of trying, I still haven't made the MobileOrg
workflow work for me. I keep my org files in a <a href="http://mercurial.selenic.com/">Mercurial</a>
repository on my home machine, and carry a clone with me. I run
<a href="http://orgmode.org/manual/MobileOrg.html#MobileOrg">org-mobile-push and org-mobile-pull</a> from the home repository,
which requires it to be up to date, which <em>usually</em> can be done
without manual intervention, but not always. And both pushing and
pulling can make changes, which have to be committed. And you really
have to sync on the mobile device twice: once before you push/pull,
and once after, if you want the desired effect of pushing all your
changes and captures to the repository, and having them all reflected
on your device. The MobileOrg workflow is based on the idea that your
mobile device doesn't have the horsepower to compute agendas on the
fly. But is that true these days? I'll return to that issue later.</p>

<p>After seeing that some people had successfully run an <a href="http://ubuntu.com/ubuntu/">Ubuntu</a>
user environment <a href="http://forum.xda-developers.com/showthread.php?t=1533037">in a chrooted loopback filesystem</a> on a similar
tablet, I decided to try to get my Emacs that way. It didn't exactly
work out right a way, and it took me quite a while to make time for
the <a href="http://sethgodin.typepad.com/seths_blog/2005/03/dont_shave_that.html">yak-shaving</a> involved. Finally, I did, but with my preferred
<a href="https://www.gnu.org/gnu/linux-and-gnu">GNU/Linux</a> distribution, <a href="https://fedoraproject.org/">Fedora</a>.</p>

<h4>Overview (the short version, aka tl;dr)</h4>

<p>My sdcard is formatted ext3, and has the <a href="https://fedoraproject.org/wiki/Architectures/ARM/Archive/Releases">Fedora 13 rootfs</a>
unpacked into it. From a root prompt in <a href="https://code.google.com/p/connectbot/">ConnectBot</a>, I bind-mount
some required special filesystems under Fedora's root, then chroot
into it, and start sshd. Then I can ssh into localhost with ConnectBot
and run Emacs (and other things).</p>

<p><a href="/jason/images/shot_000003.png">
<img src="/jason/images/shot_000003_t.png"
     style="float: right; margin: 1em;"/>
</a></p>

<h4>Longer version</h4>

<p>Don't take this as a step-by-step instruction guide. What works and
doesn't work on my device is likely to be quite different from what
works and doesn't work on yours (unless yours is an Archos Gen8). This
is really more to give you an idea of the kind of yak-shaving involved
in getting this working.</p>

<p>First I <a href="http://forum.xda-developers.com/showthread.php?t=930197">rooted my tablet</a>. I would have done this even if I
weren't planning on running Emacs. For reference, the tablet is an
Archos 70, running the latest version of the stock (<a href="https://en.wikipedia.org/wiki/Android_version_history#Android_2.2.x_Froyo">Froyo</a>)
firmware, with a rooted initramfs.</p>

<p>Then, I tried installing the Ubuntu loopback images mentioned
above. This didn't work for me, because the stock Archos kernel
doesn't include the loop device, and for some reason, even when I
built custom kernels with the loop device enabled, I couldn't get it
to work.</p>

<p>Fortunately, my device has a microSD card slot, which is above and
beyond the internal storage that the Archos firmware treats as an
sdcard for the purposes of App2SD and so forth. I formatted a card as
ext3, and tried to unpack the Ubuntu image onto it. This should have
worked, but for some reason, my tablet didn't like having so much data
pushed onto it over USB, and I lost the enthusiasm I needed to work on
it.</p>

<p>Later, I unpacked the Fedora 14 ARM root filesystem more successfully, and
tried chrooting into it, only to find that my kernel was too old for
the version of <a href="http://gnu.org/s/libc/">glibc</a> in Fedora 14. This also tragically sapped
my motivation, causing me to stop working on it again for a while.</p>

<p>When I got another round tuit, I started with the Fedora 13 ARM root
filesystem, and it worked pretty straightforwardly. This is what I
did:</p>

<pre><code># umount /mnt/storage/sdcard
# mount -o noatime,nodiratime /dev/block/mmcblk2p1 /mnt/storage/sdcard
</code></pre>

<p>The sdcard is mounted with the options nodev,noexec,fmode=0666, and
several other options that would make running it as the root
filesystem of a normal linux slightly inconvenient. Some of the other
parameters could be reset with mount -o remount,blah,noblah, but
there doesn't seem to be a way to do that for fmode and dmode, so
unmount and remount it is.</p>

<pre><code># cd /mnt/storage/sdcard/fedora
# mount --bind /dev dev
# mount --bind /dev/pts dev/pts
# mount --bind /proc proc
# mount --bind /sys sys
</code></pre>

<p>Now mount the various special filesystems that Fedora is going to
need, that are provided by the kernel.</p>

<pre><code># chroot . /bin/bash -
# service sshd start
</code></pre>

<p>Now chroot into the Fedora environment, and start sshd. I've omitted
some other stuff, like setting a (new?) password on the root account,
and so forth. Technically, even starting sshd isn't necessary. You can
just chroot into Fedora and run what you want to. Having sshd running
makes it easier to reconnect to the Fedora environment without having
to go through the process of cd'ing and chrooting to the Fedora
directory.</p>

<p>From here on out, it's just installing stuff with <a href="http://yum.baseurl.org/">yum</a>. I've tried to
avoid installing anything except what I particularly need.</p>

<pre><code># yum install -y emacs-nox git mercurial aspell aspell-en \
  diffutils patch man screen
</code></pre>

<h4>What works</h4>

<ul>
<li><p>Installing things with yum!</p>

<p>There are things in the Fedora repositories that aren't supported
on ARM, but I haven't had cause to install them yet.</p></li>
</ul>

<ul>
<li><p>Emacs!</p>

<p>Fedora 13 had Emacs 23.2.1, which is not exactly the latest and
greatest, but it's not old enough to cause serious compatibility
problems, either. I used hg to pull in my emacs startup code from
my desktop, then created a mobile branch to strip it down and
remove features I wouldn't be using, and to change paths to work
with my mobile setup. Everything works as expected.</p>

<p>Emacs startup is surprisingly snappy. I had slower emacs startup
times on my desktop as recently as 5 or 6 years ago, and this
isn't exactly a fast tablet.</p>

<p>You might think it would be hard to use Emacs with a mobile
keyboard, but <a href="https://code.google.com/p/hackerskeyboard/">Hacker's Keyboard</a> takes care of that, by and
large. It's still an onscreen keyboard, but it's an onscreen
keyboard with all the keys you'd expect on a standard PC
keyboard.</p>

<p>Color themes work, as long as they would work under
xterm-256color. Sorry for not including a nice one in the
screenshots, but those were taken right after I got emacs
running.</p></li>
</ul>

<ul>
<li><p>Org-mode!</p>

<p>This was where I had some concerns going in. The design of
org-mobile was premised on the idea that mobile devices didn't
have enough oomph to generate agendas on the fly, so emacs pushes
pre-generated agendas. I have fairly large org-mode files. They'd
be smaller if I archived to file more often, but I don't. So, is
emacs on my tablet able to generate my agendas?</p>

<p>The answer is yes, mostly. The first time I run org-agenda, emacs
spends a very long time reading in my org-mode files; I suspect
that the slow sdcard I'm running this from may be part of the
problem. The first time, it was 30s, but similar 'cold' agenda
startups have been around 10s since then. Subsequently, however,
the agendas are generated perfectly quickly.</p>

<p>All in all, my orgmode workflow works perfectly on the tablet,
with the exception that hg tries to use <a href="http://vimdoc.sourceforge.net/htmldoc/diff.html">vimdiff</a> to do
merges, for some reason!</p>

<p>Also, one other issue is that since I am using emacs in a (local)
terminal window, I have to use the <a href="http://orgmode.org/manual/TTY-keys.html#TTY-keys">alternate tty keys</a>.</p></li>
</ul>

<h4>What doesn't work well</h4>

<ul>
<li><p>Writing a lot.</p>

<p>This is not exactly a surprise. Unless I go to another machine and
ssh into my tablet (and what would be the point?), I'm constrained
to use the onscreen keyboard. And not only that, it's worse trying
to write with the onscreen keyboard in a regular Android app,
because the predictive text is not active in ConnectBot.</p>

<p>If I had a small hardware keyboard, I'd be more inclined to do
actual writing on this setup.</p>

<p>Another alternative is to let Emacs do the text completion, using
either <a href="http://www.emacswiki.org/emacs/PredictiveMode">Predictive Mode</a> or <a href="http://emacswiki.org/emacs/AutoComplete">auto-complete</a>. However,
while both of those do prose completion fairly well (different
strengths), neither does autocorrection, which is just as
important with a soft keyboard.</p></li>
</ul>

<ul>
<li><p>Leaving an Emacs session running all the time</p>

<p>I'm used to never exiting Emacs. On my desktop/home-server
machine, Emacs is started for me by <a href="http://www.freedesktop.org/wiki/Software/systemd/">systemd</a>, which runs it
with --daemon, and restarts it if it should ever crash. On my
tablet, I started out by running it under <a href="http://www.gnu.org/software/screen/">screen</a>, and
switching back to it as needed. It turns out that this is fine, as
long as I want to stay in the Fedora environment, but it doesn't
leave enough memory for my usual set of Android apps to perform
normally.</p></li>
</ul>

<h4>Conclusion</h4>

<p>I haven't tried the next logical step, which would be to install Xvnc
and its dependencies, and to run a local X session, to be displayed in
an Android VNC client. I may not do so, because it looks like the
keyboard situation in the main free Android VNC clients is not much
better (if at all) than in the terminal, in terms of having the full
set of keysyms available. And it is worse, in that in ConnectBot,
Emacs's screen gets resized to accommodate the soft keyboard, whereas
in VNC, the soft keyboard sits on top of part of the display area,
which is not resized.</p>

<p>On the whole I'm happy with this experiment. I don't think it will
replace my use of <a href="http://code.google.com/p/jota-text-editor/">Jota</a> for note taking, because of the text
auto-completion and auto-correction issue. I'm not sure whether it
will completely replace MobileOrg for me. I'm enjoying finding out.</p>
]]></content:encoded><category domain="http://www.carcosa.net">/emacs</category><dc:date>2012-07-20T01:50:55Z</dc:date></item><item><title>Instapaper client for Emacs</title><guid isPermaLink="false">computing/emacs/instapaper-el-2011-04-18-17-00</guid><link>http://www.carcosa.net/jason/blog/computing/emacs/instapaper-el-2011-04-18-17-00</link><description>I'm a serious user of Instapaper , a web site that describes itself as &quot;a simple tool to save web ...</description><content:encoded><![CDATA[

<p>I'm a serious user of <a href="https://www.instapaper.com/">Instapaper</a>, a web site that describes
itself as "a simple tool to save web pages for reading later". It's
rather more than that, though: it will also reformat pages for
distraction-free reading, much like the now-defunct Readability
bookmarklet, it works as a social bookmarking service (though I
don't really use this functionality), and it will bundle your
pending reads into an ePub or Mobipocket ebooklet. There is an
official freedom-hating iOS app, and several unofficial Android
apps; the one I use is <a href="https://market.android.com/details?id=org.hijava.instapaper&amp;feature=search_result">iPaper</a>, which is still a little
freedom-hating, but provides offline reading, which just using the
website doesn't, barring a strict ePub export/sync routine or some
futzing around with <a href="http://www.gedanken.demon.co.uk/wwwoffle/">wwwoffle</a> or similar.</p>

<p>I use Instapaper to push articles that would otherwise cut into my
productive time into my less productive time: adding
them from my browser, syncing with iPaper once or twice a day, and
reading mostly in the evenings. For saving articles, I mostly use
the Firefox add-on <a href="https://addons.mozilla.org/en-US/firefox/addon/instaright-social-bookmarks/">Instaright</a>, which is handy because I can
add links without following them. Most of the articles I save for
later come from Google Reader, which I use mainly from Firefox, so
that works well. What didn't work so well was my other main source
of linkspam: <a href="https://identi.ca/">identi.ca</a>. I use <a href="http://blog.nethazard.net/identica-mode-for-emacs/">identica-mode</a> for my
microblogging needs, so saving a link from identi.ca means a trip
from emacs -> follow link to dent or site in Firefox ->
Instaright. Obviously this is far too much opportunity to be
tempted to read the article now rather than later, so I wrote an
Instapaper client for Emacs.</p>

<p>The code is on <a href="https://bitbucket.org/jfm/emacs-instapaper">bitbucket</a>, and the instructions for using it
are in the source header. It should be fairly self-explanatory. It
saves URLs to your Instapaper account, and can get them either
manually, by url-at-point, or, if you have w3m installed, from the
current w3m page's URL or selected link. It doesn't provide any
services for <em>reading</em> from Instapaper (offline or otherwise), and
because of the terms of service on the official API and my lack of
desire to do screen-scraping in Emacs Lisp, I don't plan on adding
any. A combination of w3m and wwwoffle or <a href="http://www.pps.jussieu.fr/~jch/software/polipo/">polipo</a> is
probably your best bet if you need to read Instapaper in Emacs.</p>

<p><strong>Edited to add</strong>: Naturally, when I released this, it contained a
significant bug, to whit: due to changes in url.el, it only worked in
Emacs 24. This has been fixed, though if you byte-compile it under
Emacs &lt;= 23, you will get a compile warning.</p>
]]></content:encoded><category domain="http://www.carcosa.net">/emacs</category><dc:date>2011-04-18T21:00:00Z</dc:date></item><item><title>Todochiku notifications in identica-mode</title><guid isPermaLink="false">computing/identica-mode-notification-2011-01-04-12-00</guid><link>http://www.carcosa.net/jason/blog/computing/identica-mode-notification-2011-01-04-12-00</link><description>Just a quick response to Gabriel Saldaña's recent post on identica-mode notifications: the code for using todochiku for identica-mode notifications ...</description><content:encoded><![CDATA[

<p>Just a quick response to <a href="http://blog.nethazard.net/emacs-identica-mode-notifications/">Gabriel Saldaña's recent post</a> on
identica-mode notifications: the code for using todochiku for
identica-mode notifications is as follows:</p>

<div class="codeblock">
<pre>
(add-hook \'identica-new-dents-hook
  (lambda nil
    (let ((n identica-new-dents-count))
      (todochiku-message \"Emacs Identica-mode New dents\"
                         (format \"You have %d new dent%s.\" n (if (> n 1) \"s\" \"\"))
                         (todochiku-icon \'social)))))
</pre>
</div>

<p>The advantage of using todochiku here is that you can let it handle
talking to different notification systems (KDE vs. Gnome vs.Growl on
MacOS vs Snarl on MS Windows), and have the same configuration
everywhere.</p>
]]></content:encoded><dc:date>2011-01-04T17:00:00Z</dc:date></item><item><title>bbcode-mode.el: a simple emacs mode for editing bbcode</title><guid isPermaLink="false">computing/2010-04-07-emacs-bbcode</guid><link>http://www.carcosa.net/jason/blog/computing/2010-04-07-emacs-bbcode</link><description>A couple of years ago, I looked for a bbcode mode for Emacs, and, not finding one, wrote a very ...</description><content:encoded><![CDATA[

<p>A couple of years ago, I looked for a bbcode mode for Emacs, and, not finding one, wrote a very simple derived-mode for it. For some reason, syntax highlighting only worked intermittently, which I didn't have time to put too much effort into trying to fix, and so I didn't actually release the code for public consumption. Recently, though, I saw on Planet Emacsen an explanation for why it wasn't working; I've tried to find that post to link to it and credit the author, but unfortunately, I can't.</p>

<p>Anyway, having fixed the font-locking issue, I've released bbcode-mode.el <a href="http://bitbucket.org/jfm/emacs-bbcode/">at bitbucket</a>. In the process of releasing it, I searched for other bbcode modes to make sure I wasn't taking a name that was in use. It turns out that in the meantime while I wasn't releasing my bbcode mode, Xah Lee released another, <a href="http://xahlee.org/emacs/xbbcode-mode.html">xbbcode-mode</a>. The two modes are rather different in design, so depending on your tastes, you might reasonably prefer either one or the other.</p>

<p>A side note: I wish bitbucket supported org-mode README files like github does.</p>
]]></content:encoded><dc:date>2010-04-07T10:43:15Z</dc:date></item><item><title>Fedora 12 upgrade</title><guid isPermaLink="false">computing/fedora-12-2009-11-29-10-00</guid><link>http://www.carcosa.net/jason/blog/computing/fedora-12-2009-11-29-10-00</link><description>So, I upgraded from Fedora 10 to Fedora 12 over Thanksgiving weekend. I had skipped the Fedora 11 upgrade because ...</description><content:encoded><![CDATA[

<p>So, I upgraded from Fedora 10 to Fedora 12 over Thanksgiving
   weekend.  I had skipped the Fedora 11 upgrade because of a bug in
   either preupgrade or the F11 install images used by preupgrade.  By
   the time I got a round tuit to try upgrading to F11 again, F12 was
   a week from being out, so I just waited, then used the F12
   preupgrade.  It went very quickly, and fairly smoothly.  These are
   the problems the upgrade caused me, sorted into fixed and
   not-yet-fixed.</p>

<h4>Problems fixed:</h4>

<ul>
<li>Had to reinstall lots of python libraries (had been built for
2.5, needed in 2.6) in order to get my websites to work.  This
was expected, though more packages were affected than I had
expected. </li>
<li>I had quite a few problems merging my old dovecot and postfix
config files with the new ones, which resulted in the household
not getting any mail for a few days.  This was mostly my fault,
though. </li>
<li>Any sound played through pulseaudio was accompanied by a
horrifying hissing noise except when the volume was at a single
specific value.  This turned out to be a problem with my sound
device's ALSA driver and the "glitch-free" playback in
pulseaudio.  This is despite the fact that I have snd_via82xx,
which is supposed to work.  Changing pulseaudio's settings to
add 'tsched=0' to anything that might load a hardware module
solved it, but not until after a reboot.  Probably an old
pulseaudio process was hanging around from one or another user
and keeping the old settings active.</li>
<li>Gnome menus have old legacy things in them that they're not
supposed to.  I have to fix this with every dist-upgrade.</li>
</ul>

<h4>Not fixed yet</h4>

<ul>
<li>Old VMWare doesn't work with the new kernel.  On the laptop,
which runs Ubuntu, I'd already run into this and upgraded VMWare
to solve it.  I'll have to do this here in the next week or so. </li>
<li>Some of my policy settings (like letting sound continue playing
when you switch users) have been lost, and since there is no
longer any admin GUI for PolicyKit, there's no obvious way to
fix this.  I find this annoying, because my audio is played by
mpd, the whole point of which is to play music when run as
someone other than the active logged-in user.  Adding some group
memberships may fix it... have to see after restarting some
services. </li>
</ul>

<h4>Conclusions</h4>

<p>Fedora 12 seems nicely put together, and the upgrade was, though
   not the smoothest, smoother than many others I've gone through in
   the past.</p>
]]></content:encoded><dc:date>2009-11-29T15:00:00Z</dc:date></item><item><title>Getting html articles in Gnus to obey browse-url-browser-function</title><guid isPermaLink="false">computing/gnus-w3m-2009-07-02-07-30</guid><link>http://www.carcosa.net/jason/blog/computing/gnus-w3m-2009-07-02-07-30</link><description>I use Gnus for email, and frequently get emails with an html part. In some cases, I even want to ...</description><content:encoded><![CDATA[

<p>I use Gnus for email, and frequently get emails with an html part.  In
some cases, I even <em>want</em> to receive emails with an html part, as with
RSS feeds that have been translated to Gnus groups via <a href="http://rss2email.infogami.com/">rss2email</a>,
in which I sometimes want to see images inline so I don't have to
click through to the original article.  Like most people viewing html
emails in Gnus, I let emacs-w3m handle the translation of html to
text.  The problem with this is that then hitting return on a link
will use w3m to follow the link, <em>not</em> the browser you have specified
in <code>browse-url-browser-function</code>.</p>

<p>This little code snippet fixes that.  I'm not sure it's ideal in all
ways.  But it works for me currently.</p>

<pre><code>(eval-after-load "w3m"
  '(progn
     (defun jfm/open-url-dwim (&amp;optional url)
       (interactive)
       (if (equal browse-url-browser-function 'w3m-browse-url)
           (w3m-browse-url url)
         (if (equal (face-at-point) 'w3m-anchor-face)
             (w3m-view-url-with-external-browser url)
           (browse-url url))))
     (define-key gnus-article-mode-map (kbd "&lt;return&gt;") 'jfm/open-url-dwim)))
</code></pre>
]]></content:encoded><dc:date>2009-07-02T11:30:00Z</dc:date></item><item><title>Random system beep sounds for Fancy beeper</title><guid isPermaLink="false">computing/fancy-beeper-in-wild-2009-06-18-06-30</guid><link>http://www.carcosa.net/jason/blog/computing/fancy-beeper-in-wild-2009-06-18-06-30</link><description>Akkana Peck writes about her approach to using Fancy Beeper to provide random system beeps on a system with no ...</description><content:encoded><![CDATA[

<p><a href="http://shallowsky.com/blog/linux/randombeeps.html">Akkana Peck writes</a> about her approach to using <a href="http://www.carcosa.net/jason/software/beep/">Fancy Beeper</a>
to provide random system beeps on a system with no built-in system
beep.  I'm thrilled to see that people are actually using Fancy Beeper
in the wild and are building their own solutions around it.</p>
]]></content:encoded><dc:date>2009-06-18T10:30:00Z</dc:date></item><item><title>stockphoto on bitbucket </title><guid isPermaLink="false">computing/django/stockphoto-2009-06-17-12-15</guid><link>http://www.carcosa.net/jason/blog/computing/django/stockphoto-2009-06-17-12-15</link><description>So, development of stockphoto , my Django-based photo gallery application has been languishing for a long time. Like, three years ...</description><content:encoded><![CDATA[

<p>
So, development of <a href="http://www.carcosa.net/jason/software/django/stockphoto/">stockphoto</a>,
my Django-based photo gallery application has been languishing for
a long time.  Like, three years long.  Like since Django 0.96
long.  Mostly, that was kind of okay, because it is a tiny
application, and it was working perfectly within its limited
domain, until the release of Django 1.0.  I had been wanting to fix
it up before the Django 1.0 release, but never got a round tuit.  
</p>

<p>
After my daughter was born, I needed to use it to show baby pictures to
our family, so I had the motivation to at least fix stockphoto up
to work with a current Django release.  This is done; it mainly
involved fixing up the model code, switching to forms from
oldforms, fixing up the URLs, and fixing zipfile import to work
with the new upload API.  I have put the fixed code on <a href="http://bitbucket.org/jfm/django-stockphoto/">bitbucket</a>.
If you pull from tip at that repository, or download a snapshot of
tip from the downloads page, you will have a stockphoto package
that works on Django 1.0.
</p>

<p>
This isn't quite a release though; it needs a few cleanups before I
can push out an 0.3 release:
</p>

<ol>
<li>
Update documentation
</li>
<li>
Since there were some small model changes, I need to provide a
way of migrating from 0.2.1.  I am leaning towards <a href="http://south.aeracode.org/">South</a> for
providing this.
</li>
<li>
Remove dead code

</li>
</ol>

<p>There won't be any new features in stockphoto 0.3 except for
non-browseable galleries (which is already in bitbucket, since I
wanted it for my daughter's site).  I'm tentatively planning a 0.4
release that will have the features originally intended (since so
many years ago) for 0.3, plus some suggested to me in email.
</p>

<p>
If you're interested in using stockphoto, please follow it on
bitbucket, and send me any patches you find useful.
</p>
]]></content:encoded><category domain="http://www.carcosa.net">/django</category><dc:date>2009-06-17T16:15:00Z</dc:date></item><item><title>identica-mode.el update</title><guid isPermaLink="false">computing/identica-mode-2009-02-12-11-22</guid><link>http://www.carcosa.net/jason/blog/computing/identica-mode-2009-02-12-11-22</link><description>I’ve written a little update of Gabriel Saldana’s identica-mode.el , which wasn’t working on identi.ca as it currently stands, or ...</description><content:encoded><![CDATA[

<p>I’ve written a little update of Gabriel Saldana’s
<a href="http://blog.nethazard.net/identica-mode-for-emacs-update-support-for-any-laconica-server/">identica-mode.el</a>, which wasn’t working on <a href="http://identi.ca/">identi.ca</a> as it
currently stands, or at least not with a current Emacs.  The updated
version is <a href="http://www.emacswiki.org/cgi-bin/emacs/identica-mode.el">posted on EmacsWiki</a>.  Expecting some updates from
<a href="http://identi.ca/madalu">Matt in Chicago</a> to fix @links, and planning to add support for
!groups and #tags, maybe some more faces.</p>

<p><!-- Footnotes --></p>
]]></content:encoded><dc:date>2009-02-12T16:22:00Z</dc:date></item><item><title>Inspired by xkcd</title><guid isPermaLink="false">computing/burmashave-2008-10-22-19-30</guid><link>http://www.carcosa.net/jason/blog/computing/burmashave-2008-10-22-19-30</link><description>Oracle's a well-known dee-bee But there's also many freebies. How should you the choices cull? Choose one where '' IS ...</description><content:encoded><![CDATA[

<p>Oracle's a well-known dee-bee <br />
But there's also many freebies. <br />
How should you the choices cull? <br />
<a href="http://forums.thedailywtf.com/forums/t/1225.aspx?PageIndex=1">Choose one where '' IS NOT NULL.</a> <br />
BURMA SHAVE</p>

<p>Now thank your lucky stars I didn't post the lines one at a time as
article titles to get them to show up one-by-one in Planet Emacsen.</p>
]]></content:encoded><dc:date>2008-10-22T23:30:00Z</dc:date></item><item><title>Wrapper script for emacs using --daemon</title><guid isPermaLink="false">computing/emacs-wrapper-2008-10-12-19-00</guid><link>http://www.carcosa.net/jason/blog/computing/emacs-wrapper-2008-10-12-19-00</link><description>For quite a while, I've used a variety of scripts for starting emacs, starting with dtemacs from gnuclient, which I ...</description><content:encoded><![CDATA[

<p>For quite a while, I've used a variety of scripts for starting emacs,
starting with dtemacs from gnuclient, which I modified in various ways
to work the way I wanted it with Gnome and from the command line.  The
new daemon-mode in CVS emacs, combined with multi-tty, makes it a bit
simpler to write a script that you can use to edit files from your
desktop environment, from a command-line with or without X available,
or as an external editor from a mailer, VCS or web-browser.  I've
re-written the latest version of my emacs wrapper in terms of
daemon-mode, and present it here.  It's rather shorter than my
pre-daemon-mode script, and does rather more.  Apologies for my bad
shell-scripting style.</p>

<div class="codeblock">
<pre>
#!/bin/sh  

# em: a script for starting emacs as needed.  

EMACSCLIENT=emacsclient  
EMACS=emacs  

if [ -z \"$DISPLAY\" ]  
then  
    CLIENTARGS=\'-t\'  
    CLIENTNEWARGS=\'-t\'  
else  
    CLIENTNEWARGS=\'-c -n\'  
fi  

function start_daemon() {  
    echo -n \"Starting emacs in the background...\"  
    $EMACS --daemon  
    while ! $EMACSCLIENT --eval t >/dev/null 2>&1  
    do  
        sleep 1  
    done  
    echo \"ok.\"  
}  

if [ -z \"$@\" ]  
then  
    if $EMACSCLIENT $CLIENTNEWARGS 
    then  
        exit 0  
    else  
        start_daemon  
        $EMACSCLIENT $CLIENTNEWARGS  
    fi  
else  
    if ! $EMACSCLIENT $CLIENTARGS \"$@\" 
    then  
        start_daemon  
        $EMACSCLIENT $CLIENTARGS \"$@\"  
    fi  
fi
</pre>
</div>
]]></content:encoded><dc:date>2008-10-12T23:00:00Z</dc:date></item><item><title>Underappreciated emacs function: just-one-space</title><guid isPermaLink="false">computing/just-one-space-2008-10-08-06-10</guid><link>http://www.carcosa.net/jason/blog/computing/just-one-space-2008-10-08-06-10</link><description>I want to very briefly praise the probably-underappreciated emacs command just-one-space. It is on M-SPC by default, and what it ...</description><content:encoded><![CDATA[

<p>I want to very briefly praise the probably-underappreciated emacs
command just-one-space.  It is on M-SPC by default, and what it does
is replace all the spaces and tabs around point with one space (or
prefix-arg number of spaces).  That's nothing terribly fancy, but it's
one of those little things that can let you save so many keystrokes
when you're reformatting text.  That and transpose-chars are among the
little touches that make emacs so much more convenient than a
bog-standard text editing control.</p>
]]></content:encoded><dc:date>2008-10-08T10:10:00Z</dc:date></item><item><title>Using Windows Search with anything.el</title><guid isPermaLink="false">computing/anything-search-2008-09-25-20-00</guid><link>http://www.carcosa.net/jason/blog/computing/anything-search-2008-09-25-20-00</link><description>In a previous post , I said that I wished there were a command-line client for Windows Desktop Search (or ...</description><content:encoded><![CDATA[

<p>In <a href="http://www.carcosa.net/jason/blog/computing/anything-2008-09-19-17-30.html">a previous post</a>, I said that I wished there were a
command-line client for Windows Desktop Search (or Windows Search, or
whatever M$ is calling it this week) that would give back filenames in
a way useful to <a href="http://www.emacswiki.org/cgi-bin/wiki/Anything">anything.el</a>.  Well, that comment was not entirely
ingenuous, because in the time between when I wrote that article
and when I posted it, I wrote one.  It's written in Python, and uses
the <a href="https://sourceforge.net/projects/pywin32/">win32com</a> module, so you'll need regular w32 Python installed
(not Cygwin python).</p>

<p>The script itself is <a href="http://www.carcosa.net/jason/software/utilities/desktopsearch/DesktopSearch.py">here</a>.  I recommend that you install it
somewhere on your PYTHONPATH.  This is because command-line argument
handling is very dodgy on w32, particularly when the program is
interpreted, the interpreter is a native w32 program (not cygwin), and
you may be calling it from a cygwin program (such as cygwin bash).
More details on installing it and its limitations on <a href="http://www.carcosa.net/jason/software/utilities/desktopsearch/">its own page</a>.</p>

<p>Integrating it into anything: use the following elisp code:</p>

<div class="codeblock">
<pre>
(defvar w32-windows-search-program
  \"python.exe -m DesktopSearch\"
  \"Command to pass a search string to Windows Search.
Will be split on spaces to pass to start-process.\")

(defvar anything-c-source-w32-windows-search
  \'((name . \"Windows Search\")
    (candidates . (lambda ()
                    (apply \'start-process \"w32-windows-search-process\" nil
                           (append
                            (split-string w32-windows-search-program)
                            (list anything-pattern)))))
    (type . file)
    (requires-pattern . 3)
    (delayed))
  \"Source for retrieving files matching the current input pattern
with windows desktop search.\")
</pre>
</div>

<p>The given value for w32-windows-search-program depends on
DesktopSearch.py being in your PYTHONPATH.  With the above in your
.emacs, you can add the source it provides
(anything-c-source-w32-windows-search) to anything-sources just like
any other anything source.</p>

<p>This generally works well enough for my needs.  Hopefully it will be
useful to other people using emacs on w32.</p>
]]></content:encoded><dc:date>2008-09-26T00:00:00Z</dc:date></item><item><title>anything.el and &quot;open with default tool&quot; on w32</title><guid isPermaLink="false">computing/anything-2008-09-19-17-30</guid><link>http://www.carcosa.net/jason/blog/computing/anything-2008-09-19-17-30</link><description>My job doesn't often offer the opportunity to &quot;hack the good hack.&quot; A little while ago during toolsmithing time, I ...</description><content:encoded><![CDATA[

<p>My job doesn't often offer the opportunity to "hack the good hack."  A
little while ago during toolsmithing time, I got to make a neat little
hack to <a href="http://www.emacswiki.org/cgi-bin/wiki/Anything">'anything'</a>, an emacs package for locating files (or buffers,
or info pages, or ... anything) and acting on them.  Normally, use of
'anything' works like this: C-x C-a to start, then start typing
something to search for, arrow down through the matches, and either
select the default action (open the file or switch to the buffer) with
RET, or hit TAB to switch to a list of actions to select.</p>

<p>Here's where the hack comes in.  One of the actions you can perform on
files is 'open with default command'.  The catch: this is not
implemented on W32, which I have to use at work.  On unix and MacOS,
it this action is implemented by calling an external program ---
'xdg-start' on unix, or 'open' on Mac-OS --- with the filename as an
argument.  There is no equivalent command on W32 -- the closest is the
cmd.exe shell internal 'start'.  But because 'start' is a cmd
internal, it is hard to call from emacs; the quoting may be badly
messed up, for example, depending on whether you use cmd.exe or cygwin
sh as your shell, etc.  But here's a better approach:  leave it up to
emacs.  Emacs on W32 has a function 'w32-shell-execute' that works
like cmd.exe's 'start' internal.</p>

<p>The code to integrate this is now added to <a href="http://www.emacswiki.org/cgi-bin/emacs/anything-config.el">anything-config.el</a>, a
package of sample configurations for Anything.  I'm now co-maintaining
anything-config.el.</p>

<p>The practical upshot of this is that I can use 'anything' to find my
playlist files while in emacs, and start them with Windows Media
Player.  Now if only Windows Desktop Search let you get text-mode
search results back, or if there were a version of Tracker for W32...</p>
]]></content:encoded><dc:date>2008-09-19T21:30:00Z</dc:date></item><item><title>What I'm missing in Google Chrome: fast proxy switching</title><guid isPermaLink="false">computing/chrome-proxy-2008-09-18-18-15</guid><link>http://www.carcosa.net/jason/blog/computing/chrome-proxy-2008-09-18-18-15</link><description>It's nice that Chrome has Incognito Mode. But how incognito is it when your network admin can monitor the content ...</description><content:encoded><![CDATA[

<div id="text-1.3">


<p>
It's nice that Chrome has Incognito Mode.  But how incognito is it
when your network admin can monitor the content of your traffic?
Wouldn't it be nice to be able to switch your network traffic to a
secure channel &ndash; like an SSH tunnel to an http proxy under your
control, or TOR?
</p>
<p>
Firefox has the 'Distrust' extension that provides the same
protections as Chrome's Incognito Mode (other than the v. stylish
fedora-wearing spy logo).  And it also has your choice of extensions
that let you switch proxies without going into the depths of the
advanced settings menu:  QuickProxy, SwitchProxy, FoxyProxy, and
several TOR-specific extensions.  Now if only Distrust had a setting
that let one turn on their proxy for the duration of the Distrust
session&hellip;
</p>
</div>
]]></content:encoded><dc:date>2008-09-18T22:15:00Z</dc:date></item><item><title>What I'm Missing in Google Chrome: Mouseless browsing</title><guid isPermaLink="false">computing/chrome-mouseless-2008-09-18-16-00</guid><link>http://www.carcosa.net/jason/blog/computing/chrome-mouseless-2008-09-18-16-00</link><description>In Firefox, I have the Mouseless Browsing plugin installed, which lets me hit a key to label links with numbers, ...</description><content:encoded><![CDATA[

<div id="text-1.2">


<p>
In Firefox, I have the Mouseless Browsing plugin installed, which
lets me hit a key to label links with numbers, then type the number
to follow the link.  But even without MLB, you can browse
mouselessly with the typeahead search &ndash; type '/', then start typing
the text of the link, and when the link you want is highlighted, hit
enter.  In Chrome, you can only tab between links, not jump directly
to the one you want (even with the search function).  That is, you can
search for link text, and it will highlight it, but you cannot then
select the link without tabbing to it from the beginning.
</p></div>
]]></content:encoded><dc:date>2008-09-18T20:00:00Z</dc:date></item><item><title>What a fascinating quote:</title><guid isPermaLink="false">computing/quote-2008-03-24-19-00</guid><link>http://www.carcosa.net/jason/blog/computing/quote-2008-03-24-19-00</link><description>From: http://www.mindview.net/WebLog/wiki-0051 (a comment on Bruce Eckel's weblog) 2004/03/12 10:02 EST (via web): About the &quot;directing&quot; vs. &quot;enabling&quot; approach, you ...</description><content:encoded><![CDATA[
<p>From: http://www.mindview.net/WebLog/wiki-0051 (a comment on Bruce
   Eckel's weblog)</p>

<blockquote>
  <p>2004/03/12 10:02 EST (via web):</p>
  
  <p>About the "directing" vs. "enabling" approach, you wrote: "Both
  approaches are reasonable and neither is wrong. I have been in both
  situations; for example, trying to prevent interns from ignoring or
  even actively circumventing coding style guidelines (where more
  "direction" was required), and on the other hand being frustrated by
  the loss of productivity that comes from being forced to conform to
  constraints that I wouldn't have violated anyway [...]?".</p>
  
  <p>It is interesting that you justified the "directing" approach with an
  example about directing others, and the "enabling" approach with an
  example about enabling yourself. Don't take this as a negative
  critique - I did the same when I tried to come up with examples of
  directing/enabling.</p>
  
  <p>I tend to think that others should be directed, and I should be
  enabled. I worked for teams whose job was developing software
  methodologies and the relative supporting tools for the rest of their
  Company. Except that, of course, they flat-out refused to apply the
  (directing, strict) methodologies that they were developing to their
  own methodology-building project.  To me, that shows how much in
  software development is about our own relationships and fears. We
  still have an awful lot to learn from sociology and antropology - and
  maybe, oriental philosophies.</p>
  
  <p>Paolo Perrotta Bologna, Italy</p>
</blockquote>

<p>I prefer "enabling" approaches everywhere, and agree with the
   statement that if you have someone who can't handle an enabling
   approach, they don't need directing, they need training.  But many
   people (especially in corporate IT) would argue that this places too
   high a bar on experience and education for programmers.  Still, I'd
   rather see enabling done technologically, and where direction is
   needed, see it done socially.</p>
]]></content:encoded><dc:date>2008-03-24T23:00:00Z</dc:date></item><item><title>Stockphoto 0.2.1 released</title><guid isPermaLink="false">computing/django/stockphoto-2007-11-13-15-11</guid><link>http://www.carcosa.net/jason/blog/computing/django/stockphoto-2007-11-13-15-11</link><description>I've just released stockphoto 0.2.1. This is a bugfix release and contains no new features relative to 0.2. I would ...</description><content:encoded><![CDATA[

<p>I've just released <a href="http://carcosa.net/jason/software/django/stockphoto/">stockphoto</a> 0.2.1.  This is a bugfix release
and contains no new features relative to 0.2.  I would like to thank
many people for bug reports on the previous version; plese see the
credits in the README file.</p>

<p>I'll be opening development on stockphoto 0.3 once I decide the best
way to host a public version control repository (Google code
vs. Savannah, vs self-hosting).  The pre-0.3 branch will include new
features, some of which are listed as to-dos in the current README.</p>
]]></content:encoded><category domain="http://www.carcosa.net">/django</category><dc:date>2007-11-13T20:11:00Z</dc:date></item><item><title>Hushmail: not so hushed, aktuly.</title><guid isPermaLink="false">computing/hushmail-2007-11-08-20-16</guid><link>http://www.carcosa.net/jason/blog/computing/hushmail-2007-11-08-20-16</link><description>No original reporting or opinions here. Wired has a story on how Hushmail can and will turn over plaintext emails ...</description><content:encoded><![CDATA[

<p>No original reporting or opinions here.  Wired has a story on how
<a href="http://blog.wired.com/27bstroke6/2007/11/encrypted-e-mai.html">Hushmail can and will turn over plaintext emails</a> if they receive
a Canadian court order.  This means that while Hushmail provides good
protection against on-the-wire snooping, it <em>doesn't</em> protect Alice
and Bob if Mallory is in law enforcement.</p>

<p>I've recommended Hushmail to friends and neighbors in the past, as a
way of easing them into the idea of using encrypted email on a regular
basis.  When I read this news, I felt I had to email people that I had
recommended it to, to let them know about the weakness.  Hushmail
<em>could</em> set up their systems so that they never store a passphrase
except in volatile memory, and so that they never store plaintext of
messages.  But you'd have to trust them on that, and a court order
<em>could</em> still mandate that they store them, and not tell you they were
doing it.</p>

<p>The best thing would be for everyone to use <a href="http://www.gnupg.org/">GNU Privacy Guard</a> on
their own computer.  But it can be hard to set up, especially for
Windows users (though if you're running Windows, you have bigger
security problems), and your correspondents have to all be using GnuPG
or OpenPGP, too.  This is a big barrier to entry, and even though I'm
set up to use it, very little of my total volume of email is routinely
encrypted as I'd like it to be.  There is also the problem of people
without their own computers, who must use shared resources such as
public library computers.  Hushmail appeared to be the most viable
option for them.</p>

<p>If you are interested in using GnuPG, you might look into the
<a href="http://enigmail.mozdev.org/">Enigmail</a> plugin for Mozilla Thunderbird as a cross-platform
solution.  If you're already using Linux, <a href="http://www.gnome.org/projects/evolution/">Evolution</a> groupware
provides easy-to-use GnuPG support.  If you want to send <em>me</em>
encrypted email, you can download my <a href="http://carcosa.net/jason/GPG_PUBLIC_KEY">public key</a>, the fingerprint
of which is C046 0E26 8103 ABA1 68B1  D6E7 A991 E701 91DF 7DDD.</p>
]]></content:encoded><dc:date>2007-11-09T01:16:00Z</dc:date></item><item><title>Apple-induced Stockholm Syndrome</title><guid isPermaLink="false">computing/2007-10-01-09-01-iphone</guid><link>http://www.carcosa.net/jason/blog/computing/2007-10-01-09-01-iphone</link><description>See here for the source of this well-turned phrase. It ought to replace &quot;reality distortion field&quot; in the Mac community's ...</description><content:encoded><![CDATA[

<p>See <a href="http://www.informationweek.com/blog/main/archives/2007/09/iphone_users_ta.html">here</a> for the source of this well-turned phrase.  It ought to
replace "reality distortion field" in the Mac community's lexicon.</p>

<p>Basically, I'm amazed by iPhone users' collective reaction to the
bricking of their phones the same way I'm amazed by the reaction on
Daily Kos to the <a href="http://www.dailykos.com/story/2007/9/17/192329/363">Andrew Meyers tasing</a>.  In both cases, the
affected community is mostly reacting with "hurt us more!  We deserve
it!".</p>

<p>Contrast the <a href="http://wiki.openmoko.org/wiki/Main_Page">OpenMoko</a> project.  Install whatever you want across
a whole range of supported phones.  Switch phones keeping the software
you installed.</p>

<p>How are you going to <a href="http://lifehacker.com/">hack your life</a> if you can't even hack your
gizmos?</p>
]]></content:encoded><dc:date>2007-10-01T13:03:21Z</dc:date></item></channel></rss>