February 2016

2016-02-01 Emacs News

February 1, 2016 - Categories: emacs, emacs-news

Update 2016-02-02: Added Hacker News links.

Links from reddit.com/r/emacs, /r/orgmode, Hacker News, planet.emacsen.org, Youtube, the Emacs commit log, the changes to the Emacs NEWS file, and emacs-devel.

Past Emacs News round-ups

Monthly review: January 2016

February 2, 2016 - Categories: monthly, review

January was mostly about planning, people, and preparations. I re-read my blog posts and reviewed my sketches as part of my annual review process. It was great to see the overall patterns from 2015, and from the past ten years that I’ve been here. =)

We had W-‘s family over for a holiday dinner, and we cooked lots of food. Unfortunately, our source for pork belly closed soon afterwards, so we’ve been checking out different places to find a new favourite.

I’ve been gradually transitioning my consulting tasks over to the team. They’re doing wonderfully, and will probably do even more awesome things than I can pull off. =D I’ve also been building little tools for myself, like a web-based interface that lets me use the tablet to review my sketches. Some sewing, some decluttering, some freezer cooking… Everything’s pretty much ready for the next step.

Let’s see how February goes!

2016-02-02c January 2015 -- index card #monthly #review output

Blog posts



Category Period 1 % Period 2 % Diff h/wk Diff h/wk
Business – Build 0.3 0.2 -0.0 0.4 -0.1
Discretionary – Play 6.9 6.7 -0.3 11.2 -0.5
Unpaid work 11.1 9.5 -1.6 16.0 -2.6
Discretionary – Social 0.7 0.9 0.2 1.6 0.3
Discretionary – Family 4.6 6.4 1.8 10.7 3.0
Sleep 41.4 40.9 -0.4 68.7 -0.7
Business – Connect 0.9 0.8 -0.1 1.4 -0.2
Business – Earn 4.6 5.6 1.0 9.3 1.7
Discretionary – Productive 13.7 12.4 -1.2 20.9 -2.1
Personal 15.9 16.6 0.7 27.8 1.2

Publishing Emacs News as plain text, HTML, and attached Org file

February 3, 2016 - Categories: emacs, org

Update 2016-02-05: Since @ThierryStoehr linked to this post about Emacs News-related code, I figured I’d add a link to the other support functions I’ve been using to help me with Emacs News summarization. There’s also this bit:

(let ((date (org-read-date nil nil "-mon")))
     (my/org-list-from-rss "http://planet.emacsen.org/atom.xml" date) "\n"
     (shell-command-to-string (concat "~/bin/list-reddit-links.coffee emacs " date)) "\n"
     (shell-command-to-string (concat "~/bin/list-reddit-links.coffee org-mode " date)) "\n"
     "- New packages:\n"

Handy little things!


I’ve been publishing these weekly summaries of Emacs-related links on my blog and to the emacs-tangents mailing list / newsgroup. I started by posting plain text from Org Mode’s ASCII export, and people asked for Org Mode and HTML formats. So here’s some code that prepares things for pasting into a Gnus message buffer.

It turns out that order matters for multipart/alternative – start with plain text, then include richer alternatives. First time around, I put the HTML version first, so people didn’t end up seeing it. Anyway, here’s something that shows up properly now: text/plain, then text/html, with text/x-org attached. The heavy lifting is done with org-export-string-as, which exports into different formats.

  (defun my/share-emacs-news ()
    "Prepare current subtree for yanking into post."
    ;; Draft Gnus article
      (let ((org-export-html-preamble nil)
            (org-html-toplevel-hlevel 3)
        (setq output
               "<#multipart type=alternative>
<#part type=\"text/plain\" disposition=inline>
<#part type=\"text/html\" disposition=inline>
<#part type=\"text/x-org\" disposition=attachment name=\"emacs-news.org\">
                (lambda (format)
                  (org-export-string-as (buffer-substring (point-min) (point-max)) format t))
                '(ascii html org))))
        (kill-new output))))

Howard Abrams showed me something like this in June 2015’s Emacs Hangout (~1:18:26) using org-mime-org-buffer-htmlize, which probably does the job in a much cooler way. =) I thought he had a blog post about it, but I can’t seem to find it. Anyway, there’s my little hack above!

Level up: figured out how to add a zipper pull on continuous zipper tape

February 5, 2016 - Categories: sewing

The fabric warehouse near our house has an assortment of zippers, but it can be tricky digging through the bins to find a zipper of the appropriate type, length, and colour. They also sell zippers by the yard, and will thread on as many pulls as you ask for.

I picked up a few yards of zipper tape months ago as an experiment. I’ve used the zippers on a number of small pouches already. It’s so convenient being able to just cut the length of the zipper I need instead of sifting through a stash of pre-cut zippers.

Today I was sewing a large pouch that needed a 21″ zipper along one end. One side of the zipper had escaped the zipper pull on the segment I was working with, so I opened the zipper and removed the last two zipper pulls that were on it. Then I realized I had no idea how to get the zipper pulls back on.

Youtube to the rescue! I followed this tutorial:

After a little bit of wiggling, I got the zipper pull onto the coils. The new zipper pull zipped the zipper closed behind it. Hooray!

Bonus: Because I had left the bottom part of the zipper closed, by the time I had moved the zipper pull to the middle of the segment I had stitched into the pouch, the zipper pull was basically in between two closed parts of the zipper. This made stitching over both sides of the zipper much neater than it would have been if one of the sides were open, like the way pre-cut zippers are.

2016-02-05a Zipper pulls and zipper tape -- index card #sewing

2016-02-05a Zipper pulls and zipper tape — index card #sewing

I love how easy it is to find all sorts of practical tutorials on the Internet. It’s a small thing, but it’s nice to know that I can deal with zipper pulls and zipper tape. It means that I can buy zipper tape by the yard and never have to worry about having the wrong length, and that I can make large containers without being constrained by the pre-cut lengths available in the fabric stores. Yay making things!

Weekly review: Week ending February 5, 2016

February 6, 2016 - Categories: review, weekly

I walked a lot this week – an average of two hours a day, exploring different destinations. It was a bit tiring, but it was good to get out in the sun. =) It was surprisingly warm when I was out by the Stockyards; practically shirt weather.

Lots of cooking this week. Now that our freezer’s mostly full, I’ve been focusing on exploring new recipes. Of the different things I tried this week, I like the roast vegetable salad the most. Nothing fancy, just assorted vegetables roasted and tossed together, but I enjoyed eating it.

More tidying and more preparing. Some sewing, too. I sewed an extra-large pouch, and that was a good opportunity to learn how to add a zipper pull to continuous zipper tape. Now that I know how to do that, I’m tempted to keep a few yards of zipper tape and a small thing of zipper pulls. So handy.

W- bought Final Fantasy 9 during the recent Playstation Network sale, so now we’re playing that. At first I wanted to see how far I could get without a walkthrough. It’s the sort of game that can be much harder if you miss certain items or options, though, so we’re back to referring to the walkthrough regularly.

Some more consulting, too. Transitioning more tasks, updating some neat data visualizations I’d almost forgotten about… Things are going well. =)

2016-02-06a Week ending 2016-02-05 -- index card #journal #weekly output

Blog posts


Focus areas and time review

  • Business (18.1h – 10%)
    • Earn (9.2h – 51% of Business)
      • ☑ Prepare invoice
      • ☑ Earn: E1: 1-2 days of consulting
      • ☐ Earn: E1: 1-2 days of consulting
    • Build (8.4h – 46% of Business)
      • Drawing (7.4h)
      • Paperwork (0.2h)
    • Connect (0.5h – 2% of Business)
  • Relationships (8.0h – 4%)
    • ☑ Fix up room
  • Discretionary – Productive (9.4h – 5%)
    • Emacs (1.3h – 0% of all)
      • ☑ Do another Emacs News review
      • ☐ Do another Emacs News review
    • Sewing (2.6h)
    • Writing (5.5h)
  • Discretionary – Play (11.8h – 7%)
  • Personal routines (35.0h – 20%)
  • Unpaid work (15.7h – 9%)
  • Sleep (69.9h – 41% – average of 10.0 per day)

Eating more vegetables

February 7, 2016 - Categories: cooking

It looks like all I really needed in order to nudge myself to eat more vegetables was to keep a large variety of salad-able vegetables in the fridge. It’s still pretty cold out, so I prefer to eat warm foods. Roast vegetables, then.

2016-02-07c Eating more vegetables -- index card #cooking #vegetables

2016-02-07c Eating more vegetables – index card #cooking #vegetables

I spent part of my afternoon processing a stream of various vegetables cut into half-inch-ish dice, tossed in olive oil, and roasted at 400’F for however long it took to make them tender, generally shaking them and checking them every ten minutes or so. It’s a good pipeline: one bowl for scraps, one bowl for tossing in olive oil, one large chopping board and a chef’s knife, a roasting pan lined with foil, and each batch of vegetables is generally chopped up by the time the previous batch is done roasting, with liberal breaks for hanging out in #emacs, browsing the Web, or playing games.

Today’s haul: parsnips, carrots, fennel, broccoli, and beets, joining the sweet potatoes and butternut squash in the fridge. I also have chickpeas (both boiled and roasted) and couscous. Mwahaha. My very own salad bar. Meals feel like more of an indulgent production when I haul out almost a dozen containers so that I can take a couple of spoons from each. It’s like when I spend a weekend making a banchan extravaganza, lining up a slew of Korean side dishes, but with less work since the vegetables pretty much use the same cooking methods and I don’t have to juggle different pans, oils, and spices.

Might be a good opportunity to revisit this sketch from last year:

2015-01-28 Winter vegetables to explore -- index card #cooking

2015-01-28 Winter vegetables to explore – index card #cooking

Still haven’t played around with endives, kohlrabi, broccoli raabe, chicory, escarole, rutabagas, or turnips. There’s still time, though!

I imagine that stocking this kind of salad bar would be much the same in warmer weather, except maybe with less cooking and more greens/fruits. Should be fun.

On scattered moments and video games

February 8, 2016 - Categories: life

In anticipation of more fuzzy-brain time-confetti, I’ve been thinking about what I can do with short, scattered moments. The considerations are:

  • They should be activities that I can pick up and put down at a moment’s notice: minimal switching costs and easy availability
  • They should be useful or enjoyable, and ideally both
  • Ideally, they should build up over time

Here’s a list of things I often find myself doing:

  • Reading: nonfiction, fiction, random Internet browsing. Dusted off my Kindle and loaded it up with a few tech manuals and some fanfiction. Great for walking around, since I can use the page buttons even with gloves on.
  • Tidying up or preparing: there’s always something that needs to be done
  • Checking out the Emacs community to see if I can answer a quick question or learn from other people’s conversations
  • Drawing an index card or two
  • Playing casual games

I think games are worth thinking about a little more, even though I’m tempted to focus on the more useful activities. There are a lot of people who spend a lot of time thinking about how to make gaming more engaging. It’s a big industry. I wonder if I can turn it to my own purposes.

2016-02-01c Game endings -- index card #gaming

2016-02-01c Game endings – index card #gaming.png

I tend to like games with stories that have funny moments, like RPGs or LEGO games. Since games like that tend to require space and development effort, I play them on the PSP or the PS3. I’ve learned I’m not a completionist when it comes to achievements or levels – I like passing a level, but I’m not driven to reach three out of three stars. I can enjoy open-ended sandbox simulations. Games that go until failure tend to be a little depressing after a while – the abstract achievement of lasting a certain time or reaching a certain level doesn’t tickle my brain the same way other things do.

2016-01-14d Thinking about games I liked -- index card #play #gaming #leisure

2016-01-14d Thinking about games I liked – index card #play #gaming #leisure.png

Reflecting on the specific games I’ve liked, I notice that I usually explore games that W-‘s also playing as a way of spending time together or sharing experiences. This is how I ended up getting into Borderlands 2 and Persona 4 Golden, and why I’m playing Final Fantasy IX now. On my own, I find that I’m a little partial to time- and resource-management games. I figure that among the popular games of those genres, a game is probably as good as any other. So I’m playing through Rising Star Chef on the tablet, and just for kicks (and Takei’s narration, although there’s far too little of that), Star Trek: Trexels on my phone.

It seems like most of the popular games have switched to a freemium model, with in-app purchases for the impatient. I find myself liking the built-in timers and rate limits, actually. They’re good for reminding me to surface from the game and look around. There’s a little bit of pride, too, in the thought: “Aha, I resist your feeble attempts to convince me to spend money.” But that’s only part of the picture, of course. I pay in time and attention, and often in exposure to advertisements. So if I’m going to do this, I want to make sure that I get what I want out of it.

Here are the pay-offs I think I’m getting from these games, and some alternatives if I want to play with those pay-offs.

2016-01-28c Playing with games -- index card #games

2016-01-28c Playing with games – index card #games.png

Games give me a sense of learning and a sense of progress, although they’re of arbitrary things. Games also deliberately build on the rush of intermittent rewards.

2016-02-01b Playing with my brain's failure modes -- index card #gaming

2016-02-01b Playing with my brain’s failure modes – index card #gaming.png

The most interesting benefit for me, though, is developing an awareness of how I think in different situations, while keeping things low-risk. Sometimes I catch myself getting flustered and messing up orders in the cooking game, or letting a party member get knocked out in FF9 because I was too distracted to pay attention to the health stats. (Trexels seems more like a virtual pet than anything else; it feels like it’s just a matter of time.) I like the way games make me think a few steps ahead, take risks, recover from mistakes, and deal with (or even celebrate) the inevitable failures.

So maybe a little more gaming, with built-in limits thanks to freemium timers and the pull of other things, mixed in with all these other ways to use scattered moments. Hmm…

2016-02-08 Emacs News

February 8, 2016 - Categories: emacs, emacs-news

Links from reddit.com/r/emacs, /r/orgmode, Hacker News, planet.emacsen.org, Youtube, EmacsWiki:RecentChanges, the Emacs commit log, the changes to the Emacs NEWS file, and emacs-devel.

Past Emacs News round-ups

Weekly review: Week ending February 12, 2016

February 13, 2016 - Categories: review, weekly

With W- recovering from a bad cough and my sleep quality going a bit downhill due to other reasons, it’s been mostly about maintenance mode this week. I got a little bit of coding done for both my consulting client and a personal project, but nothing spectacular. I’ve been taking it pretty easy instead: reading e-books, checking out games that friends have recommended, and just generally keeping the house going. On the plus side, the ease of putting together a roast vegetable salad means I’ve been eating a lot more vegetables lately. Yay!

2016-02-13a Week ending 2016-02-12 -- index card #journal #weekly

Blog posts


Focus areas and time review

  • Business (26.5h – 15%)
    • Earn (12.4h – 46% of Business)
      • ☑ Earn: E1: 1-2 days of consulting
    • Build (12.6h – 47% of Business)
      • Drawing (8.0h)
      • Paperwork (1.3h)
    • Connect (1.6h – 5% of Business)
  • Relationships (4.6h – 2%)
    • ☑ Renew pet licence for Neko
    • ☑ Reflect on prickly thoughts
    • ☑ Call mom
  • Discretionary – Productive (6.9h – 4%)
    • Emacs (1.1h – 0% of all)
    • Sewing (0.0h)
    • ☑ Check other window manager for freezing
    • Writing (2.3h)
  • Discretionary – Play (13.2h – 7%)
  • Personal routines (34.2h – 20%)
  • Unpaid work (15.4h – 9%)
  • Sleep (67.1h – 39% – average of 9.6 per day)

2016-02-15 Emacs News

February 15, 2016 - Categories: emacs, emacs-news

Links from reddit.com/r/emacs, /r/orgmode, Hacker News, planet.emacsen.org, Youtube, EmacsWiki:RecentChanges, the Emacs commit log, the changes to the Emacs NEWS file, and emacs-devel.

Past Emacs News round-ups

Building a today-I-learned habit, and displaying the documentation for random Emacs commands

February 19, 2016 - Categories: emacs

I’d like to build a habit of regularly learning one small thing each day in one of three domains: tech, life, and learning. My measurable output would probably be in the form of index cards, tweets, blog posts, and notes (in org-capture, Dropbox, or Evernote). I can get input from various sources like blog posts, videos, books, webpages, and so on.

2016-02-19a Preparing for a today-I-learned habit -- index card #til #learning

2016-02-19a Preparing for a today-I-learned habit — index card #til #learning

A little bit of randomness might be useful for learning more about Emacs. Emacswiki has a random page function, but the chunks are often a little large or irrelevant. On the other hand, displaying a random command from the packages that I already have loaded into my Emacs – that might be a good way to discover interesting things.

I started by looking at apropos-command, which led me to apropos-internal, which is a C function that referred to obarray. Using obarray by itself didn’t work (suspiciously few elements, so I often ended up looking at emms-related functions). I eventually found mapatoms, which seems to do a better job at listing an appreciable number of interactive functions. I filtered the list to include only documented functions that had not been marked as obsolete: 8,415 in my current Emacs, which should be plenty to go through. =)

(defun my/describe-random-interactive-function ()
  "Show the documentation for a random interactive function.
Consider only documented, non-obsolete functions."
  (let (result)
     (lambda (s)
       (when (and (commandp s) 
                  (documentation s t)
                  (null (get s 'byte-obsolete-info)))
         (setq result (cons s result)))))
    (describe-function (elt result (random (length result))))))

I’ve added this to a key-chord + hydra keymap as a repeatable function, so I can type hh to start my Hydra and then type r as many times as I want in order to show the documentation for a random interactive function. If you’re curious about that, you can see the key-chord section of my config.

Anyway, today I learned more about obarray and mapatoms – they’re not interactive functions, but they were handy for building this little bit of code. We’ll see how it goes! =)

Listing random npmjs.com packages updated today

February 20, 2016 - Categories: geek

I was looking for a way to randomly learn about packages hosted at npmjs.com so that I can come across libraries I might not have thought of searching for. The registry data is available at https://registry.npmjs.org/, and there’s a public CouchDB mirror at https://skimdb.npmjs.com/registry . Someday, when I know more about CouchDB, I might be able to query it and do other things.

In the meantime, this Github issue pointed me to a view of all packages modified today, which is a good-enough proxy for what I’m interested in.

Here’s an AngularJS app that displays the list and highlights a random item.


<html ng-app="myApp">
    <script type="text/javascript"
     // https://registry.npmjs.org/-/all/static/today.json
     // from https://github.com/npm/npm-registry-couchapp/issues/242
     var app = angular.module('myApp', []);
     app.controller('npmTodayCtrl', function($scope, $http) {
       $scope.randomize = function() {
         $scope.random = $scope.packages[Math.floor(Math.random() * $scope.packages.length)];
       $http.get('https://registry.npmjs.org/-/all/static/today.json').then(function(info) {
         $scope.packages = info.data;
  <body ng-controller="npmTodayCtrl">
    <div><a href="" ng-click="randomize()">Random highlight:</a></div>
    <div ng-if="random" style="margin-top: 1em; font-size: x-large">
      <strong><a ng-href="https://npmjs.com/package/{{random.name}}">{{random.name}}</a></strong>
      <tr ng-repeat="package in packages">
        <td><a ng-href="https://npmjs.com/package/{{package.name}}">{{package.name}}</a></td>

Weekly review: Week ending February 19, 2016

February 20, 2016 - Categories: review, weekly

This week was about shifting my systems and routines a little bit in order to support more learning. I’ve been thinking about how to build a regular today-I-learned habit as a way to keep myself moving forward a little bit at a time, and have been putting together little tools to make it easier for me to discover and share tidbits.

After reflecting on the various games I’d tried out on the tablet, I uninstalled a whole bunch of games that weren’t tickling my brain the way I wanted. I might keep Rising Super Chef around because I like the time management aspect, although I’d also be up for something with less randomness and either more skill or more humour. Possibly some kind of a word or math game, too. Anyway, I’ve been shifting towards using the tablet for reading Toronto Public Library e-books through OverDrive, browsing the Web (especially for answers to specific questions), and watching videos on Youtube.

I managed to go on a few long walks, despite the cold. I got through quite a lot of reading on the Kindle, too. I need to refresh the selection of items I have on it since I’m at the end of the fiction I’d lined up, but I can always go through the manuals for Emacs and Org Mode.

It was the fourth year mark for my 5-year experiment in semi-retirement, too, so I’ve been putting together a review covering the past year as well, an overall look at the past four years, and plans for the next year. It’s been a good year and a good experiment so far. It’s hard to imagine a better way to prepare for the next step. Milestones, yay!

2016-02-20a Week ending 2016-02-19 -- index card #journal #weekly

Blog posts


Focus areas and time review

  • Business (16.9h – 10%)
    • Earn (5.9h – 34% of Business)
      • ☐ Earn: E1: 1-2 days of consulting
    • Build (8.4h – 49% of Business)
      • Drawing (7.0h)
      • Paperwork (0.1h)
        • ☑ File federal annual return
    • Connect (2.6h – 15% of Business)
  • Relationships (6.6h – 3%)
    • ☑ Take pictures of stuff from Jen
  • Discretionary – Productive (8.6h – 5%)
    • Emacs (2.0h – 1% of all)
      • ☑ Do another Emacs News review
      • ☐ Do another Emacs News review
    • Sewing (0.0h)
    • Writing (4.1h)
    • Coding
      • ☑ See sketches in a range of dates
      • ☑ Authenticate
      • ☑ Make a mini-app for NPM today view
    • Latin
      • ☑ Re-memorize declensions
      • ☑ Memorize pronouns
    • ☑ Consider RRSP contribution
  • Discretionary – Play (32.3h – 19%)
  • Personal routines (31.2h – 18%)
  • Unpaid work (7.4h – 4%)
  • Sleep (65.0h – 38% – average of 9.3 per day)

Extracting the xinput device number instead of hardcoding it

February 21, 2016 - Categories: geek, linux

I’ve been using my wireless mouse more often these days. XWindows detected it fine and it works without a hitch, hooray! The downside is that as an additional input device, it threw my xinput device numbering off, so the script I was using to rotate the stylus input along with the screen on my tablet PC stopped working. Easy enough to fix by extracting the device number from the output of xinput using the cut command.

The relevant changes were:

xsetwacom set $(xinput | grep eraser | cut -c 55-56) rotate $direction
xsetwacom set $(xinput | grep touch | cut -c 55-56) rotate $direction
xsetwacom set $(xinput | grep stylus | cut -c 55-56) rotate $direction

My rotate-screen script on GitHub

Emacs News on hiatus

February 26, 2016 - Categories: emacs-news

Hey folks! Just a heads-up to let you know that I might not be able to get Emacs News out in a weekly manner for the next little while. If you feel like giving it a try yourself, you might be able to tweak these Emacs News-related code snippets to work for you, and I’ll happily repost or set you up with mailing list access.

Looking forward to getting this sorted out again when things settle down!

Weekly review: Week ending February 26, 2016

February 29, 2016 - Categories: review, weekly

My time records this week are all out of whack. I was away from phone, computer, and paper for a few days. For an awesome reason, though! =) The next few weeks will probably be a crash course on the practical aspects of keeping a human being alive and thriving. There’s only so much you can learn from books, websites, and videos, after all.

I’m going to try to keep that daily journal habit going, as well as the occasional braindump. I don’t want to post too many details (the eternal memory of search engines!), but I’m looking forward to finding a good balance so that I can continue to think and learn out loud as we start on this new adventure. Here we go!

2016-02-29b Week ending 2016-02-26 -- index card #journal #weekly


Blog posts


Focus areas and time review

  • Business (7.3h – 4%)
    • Earn (0.0h – 0% of Business)
    • Build (7.2h – 99% of Business)
      • Drawing (3.9h)
      • Paperwork (1.2h)
        • ☑ Plan payroll for 2016
    • Connect (0.1h – 0% of Business)
  • Relationships (5.0h – 2%)
    • ☑ Update family
  • Discretionary – Productive (2.3h – 1%)
    • Emacs (0.2h – 0% of all)
    • Sewing (0.0h)
    • Writing (2.1h)
      • ☑ Braindump and process things that have happened
    • ☑ Make a mini-app for NPM today view
    • ☑ Plan a simple tracking interface
    • ☑ Build data analysis tool for baby data
    • ☑ Easily dump CSV for baby data
    • ☑ Consider dentist change
  • Discretionary – Play (4.4h – 2%)
  • Personal routines (48.3h – 28%)
  • Unpaid work (57.8h – 34%)
  • Sleep (43.0h – 25% – average of 6.1 per day)