Touchy Emacs

I use Emacs as a music playing interface, and I thought it would be nice try to create a pure touch screen interface, just … because.

The only OS that would install on my old Surface Pro 2 was the prerelease version of Ubuntu 16.04, Xenial Xerus.  Apparently kernels between 2013 and a couple of weeks ago dropped support for the wifi card in the Pro 2, so, but Xerus has it.

And everything works fine.  Except the multitouch.  Apparently Unity only has support for four-digit gestures, and it’s apparently impossible to remap these gestures.  (This is what hours of googling told me.)

To make Unity stop doing this crap, you have to build your own version.  This page explains how, but I’m just going to reiterate what it says, because some things have changed slightly.

sudo apt-get build-dep unity
cd /tmp
mkdir unity
cd unity
apt-get source unity

Then edit this file:

unity-7.4.0+16.04.20151218/plugins/unityshell/src/unityshell.cpp.  Comment out this line

//InitGesturesSupport();

And then build.

cd /tmp/unity/unity-6.8.0
dpkg-buildpackage -us -uc -nc
cd ..
sudo dpkg -i *.deb
apt-get remove unity-autopilo

Then install touchegg.  You need to create mappings between gestures and the events that Emacs will respond to.

<touchégg>
 
 <settings>
 <property name="composed_gestures_time">0</property>
 </settings>
 
 <application name="Emacs">

 <gesture type="TAP" fingers="2" direction="">
 <action type="SEND_KEYS">space</action>
 </gesture>
 
 <gesture type="TAP" fingers="3" direction="">
 <action type="SEND_KEYS">p</action>
 </gesture>
 
 <gesture type="DRAG" fingers="2" direction="UP">
 <action type="SEND_KEYS">Control+v</action>
 </gesture>

 <gesture type="DRAG" fingers="2" direction="DOWN">
 <action type="SEND_KEYS">Alt+v</action>
 </gesture>
 </application>

</touchégg>

Etc etc.  And here’s the result: A Surface Pro 2 playing in the kitchen while I’m programming on the patio:

The Touch of Emacs

I kinda really wanted to delve into creating a proper touch interface for Emacs, where you could define gestures as you want with a simple (local-set-key [(swipe up three-fingers]) ‘do-something), but this stuff seems like it’s way immature.  Still.  After all these years.  Or perhaps I’ve just not found the right documentation on dar webs.

libre.fm

After the last last.fm redesign, it’s been speculated that last.fm probably isn’t going to survive much longer.  It’s sad, but it’s difficult to see what the business idea with last.fm is these day.  And the way they’re chopping the useful features is weird.

For instance, I’ve been using the events page for years to time my holidays.  If I’m going to, say, Berlin, I’ll scope out what’s going on on nearby dates to see whether I should go there a bit earlier or a bit later.  But then they removed the option to change the location: You can only look at the events that are “nearby”, based on the IP address of where you’re browsing from.

It’s…  it’s…

Even more absurd is that the functionlity is still there.  They’ve just removed the user interface.  If you Google the latitude and longtitude of a place, and enter them in the URL, it’ll tell you the events: http://www.last.fm/events?latlong=-33.865143,151.209900 in Sydney.

Eh?

Anyway, somebody mentioned libre.fm, which is apparently an old, free clone of last.fm.  Sort of.  There a nice Python GUI script that’ll extract your old scrobbles from last.fm and upload them to libre.fm.  It works perfectly.  Takes a while, though.

libreThe feature set is kinda not there.  It’ll list your scrobbles, and do some statistics.  And that’s it.  No events, no discovery, no nothing.  Except some free music they’re pushing.

If you look at the commits, it’s pretty dead.  So it kinda seems rather pointless.

Everything is bad.