Category Archives: geek

2016-02-08 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

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

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")))
    (concat
     (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"
     (my/list-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."
    (interactive)
    ;; Draft Gnus article
    (save-restriction
      (org-narrow-to-subtree)
      (let ((org-export-html-preamble nil)
            (org-html-toplevel-hlevel 3)
            output)
        (setq output
              (apply
               'format
               "<#multipart type=alternative>
<#part type=\"text/plain\" disposition=inline>
%s
<#/part>
<#part type=\"text/html\" disposition=inline>
%s
<#/part>
<#/multipart>
<#part type=\"text/x-org\" disposition=attachment name=\"emacs-news.org\">
%s
<#/part>
"
               (mapcar
                (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!

2016-02-01 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

Calibre and Qt 5.5

A recent apt-get dist-upgrade resulted in the removal of calibre and calibre-bin from my system. I’ve been using Calibre to convert e-books from HTML and EPUB (some developer references, some fanfiction =) ) and copy them onto my Kindle.

It turned out that the Calibre packaged in Ubuntu required qtbase-abi-5-4-2 and my recent dist-upgrade installed Qt 5.5. I needed to upgrade to Calibre 2.49, which wasn’t available on any of the PPAs I checked (despite instructions to the contrary).

Installing Calibre from the Calibre website made it work, though. In fact, the Calibre website says:

Please do not use your distribution provided calibre package, as those are often buggy/outdated. Instead use the Binary install described below.

I wasn’t too keen on piping the output of a wget command to sudo , but a quick scan of the script didn’t turn up anything suspicious. Anyway, now I can convert EPUBs to MOBIs and easily copy them onto my Kindle, yay!

2016-01-25 Emacs News

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

Building a simple sketch navigator for myself

In 2015, I built the habit of drawing daily index-card-sized thoughts. Some days, I reached (or blew past!) my target of five index cards a day. Other days, I backfilled my daily journal entries based on fuzzy memories and my time logs. In February 2015, I started using a yyyy-mm-dd<letter> naming convention so that I could easily refer to individual cards. For a while, I tried to be fairly disciplined about organizing sketches into outlines and building up chunks into blog posts. That fell by the wayside when I found it difficult to concentrate, but I kept drawing anyway. I saved the images to my hard drive, started tagging them with keywords in the filenames, and uploaded my sketches to Flickr as a way to back up and share my files.

I’ve recently been exploring ways to take advantage of the Samsung tablet that W- bought some time ago. It works wonderfully as a second screen that I can use to review an old sketch while I draw another one. The FlickFolio app lets me do a random slideshow of the past 2000 images in my photostream or in an album. This turns out to be an excellent way to jog my memory and prompt me to revisit questions or decisions.

2016-01-22d What do I want from my idea pipeline -- index card #zettelkasten #ideas #thinking #questions #index-cards

2016-01-22d What do I want from my idea pipeline – index card #zettelkasten #ideas #thinking #questions #index-cards.png

Now those fragmented thoughts are starting to pay off. Many of my old index cards are on topics I haven’t thought about in a while. It’s fun to see what I’ve learned in the meantime, or to follow up on things I’ve forgotten. It’s like I’d been filling an idea pipeline or seeding an idea garden. I get this steady stream of questions, decisions, observations, memories, ideas, and notes, and I can build on those prompts instead of having to start from scratch.

2016-01-18g How do I want my sketches to help me think -- index card #drawing #sketches #zettelkasten #notes ref 2015-11-18a

2016-01-18g How do I want my sketches to help me think – index card #drawing #sketches #zettelkasten #notes ref 2015-11-18a.png

I want these index cards to help me shuffle ideas and possibly see serendipitous combinations. They’re small, so capturing thoughts on them doesn’t require as much effort as, say, writing a blog post. They’re a good way to smooth out and organize thoughts, and I can chunk up those thoughts into longer posts. The sketches are easy to review, too, so they work well as digital footprints. I re-read the year’s blog posts as part of my annual review and sometimes I reread my posts on a monthly basis as well, but it’s not as immediate or as wide-ranging as flipping through a random selection of images.

A random slideshow is a good start, but I’ve been meaning to make a sketch browser that’s a little more tuned to what I want.

2016-01-18d What do I want in a sketch browser -- index card #drawing #coding #plan

2016-01-18d What do I want in a sketch browser – index card #drawing #coding #plan.png

I wrote a simple NodeJS server that I can run on my laptop and access from the tablet (or other devices) while I’m on my home network. At first, I was trying to figure out an interface that would let me navigate by month/week/day, but then I realized that something simpler might be a more useful way to begin.

I started off by making it display random sketches:

Screenshot_2016-01-22_17-16-34

Then I extended it to let me browse by tag:

Screenshot_2016-01-22_17-19-33

And then to see a list of tags by frequency:

Screenshot_2016-01-22_17-17-12

Or by alphabetic order, since that might be handier if I’m trying to look for something specific on a mobile device

Screenshot_2016-01-22_17-17-23

I like distinguishing between daily/weekly/monthly/yearly reviews and non-journal sketches, too:

Screenshot_2016-01-22_17-16-43

Screenshot_2016-01-22_17-18-04

Screenshot_2016-01-22_17-17-34

It’s nice to be able to build custom little tools like that. =)

Here’s the script on Github, in case you’re curious or you want to build on the idea.