Previewing Markdown in Emacs using Marked

In some cases I prefer to edit files using Markdown rather than Org Mode. Marked App works great for previewing Markdown and quickly sharing or saving in various formats.

The Marked Bonus Pack contains a bit of Lisp for sending my current Emacs buffer to Marked for preview…

(defun markdown-preview-file ()
  "use Marked 2 to preview the current file"
   (format "open -a 'Marked' %s" 
       (shell-quote-argument (buffer-file-name))))
(global-set-key "\C-cm" 'markdown-preview-file)

Now I just hit “C-c m” and the current buffer is instantly previewed in Marked App. Nice.


I don’t know what to use mlkshk for, even though I’ve been a paid user for several years. What I do know is that Mlkshk is so quirky and different that I’m planning to find a place for it in 2017.

Here’s mine:

Update 02/22/2017: This from MLKSHK today: “We are closing MLKSHK. 🙁 ”

I was mostly inactive, but still paid, user. I wanted them to succeed.

Weather Logging In Tinderbox Updated

For the past couple of years, I’ve used a “Stamp” in Tinderbox to append weather conditions to the current note’s text.

See Recording The Weather In Tinderbox for background.

While preparing my Daybook for 2017 I decided I wanted to include just the current condition and temperature rather than the entire weather summary. The following script grabs the weather (using wu) and returns either just the current conditions and temperature or, if a date is passed, it returns summary information for that date.

# Jack Baty, 2016 (
# Grab and parse weather info using 'wu' by Stephen Ramsay
# Pass the date as YYYYMMDD to get summary info for that date
# If no date is passed, just get current conditions

# Assumes $GOPATH is set

if [ $# -ge 1 ]
 WEATHER=`$GOPATH/bin/wu --history=$DATE`
 HITEMP=`echo "$WEATHER" | awk '/Max Temperature/' | cut -d':' -f2-`
 LOWTEMP=`echo "$WEATHER" | awk '/Min Temperature/' | cut -d':' -f2-`
 PRECIP=`echo "$WEATHER" | awk '/Precipitation/' | cut -d':' -f2-`
 COND=`echo "$WEATHER" | awk '/Weather summary/' | cut -d':' -f2-`
 if [ "$COND" != " " ]
 echo "High:$HITEMP, Low:$LOWTEMP, Conditions:$COND$PRECIP"
 echo "High:$HITEMP, Low:$LOWTEMP"
 DATE=`date +%Y%m%d`
 WEATHER=`$GOPATH/bin/wu --conditions`
 TEMP=`echo "$WEATHER" | awk '/Temperature/' | cut -d':' -f2-`
 COND=`echo "$WEATHER" | awk '/Conditions/' | cut -d':' -f2-`
 echo "$COND$TEMP"

My Stamp calls this new script, adds the results to a custom attribute named “Weather” and then adds Weather as a KeyAttribute to the current note. This way the weather is only displayed on notes for which I explicitly asked for it. The new Stamp looks like this:

Now, if I want to include the weather conditions with a note, I apply the “Get Weather on \$StartDate” Stamp and it looks like this…

Note that this gets the weather on the date set in the \$StartDate attribute for a note. It could easily use the \$Created attribute instead but I always set \$StartDate explicitly so that’s what I use.

If I only want the current conditions, I use the “Get Weather Conditions” Stamp instead. It’s basically the same thing, but without including a date parameter. The results look like this…

Goodbye Mint, Goodbye Fever

Shaun Inman:

As of today I’m officially suspending sales and support of Mint and Fever. But! As self-hosted software, absolutely nothing changes and you can continue using both Mint and Fever as you were yesterday.

That’s a shame. I’ve used Mint for many years and for my purposes it’s been nearly perfect. As Shaun says, I can keep using it indefinitely, which is what I plan to do.

Literate Programming My Emacs Config

Inspired by Sacha Chua, I decided to move my Emacs configuration into an Org Mode file. This lets me organize things nicely and keep notes about my progress, as I’m still learning a lot.

I use Spacemacs and keep all of my customizations in ~/.spacemacs.d/ so that ~/.emacs.d/ can belong entirely to the Spacemacs installation. My init.el file had grown a bit unwieldy, so I was looking forward to the opportunity to tidy things up.

First, I created a new file named, and copied all of my customizations into it. Then I wrapped each section in a SRC block so I could “tangle” it using Babel. Then I added Org headings around each section and rearranged the sections so they made sense, at least to me.

Now, whenever I update something in I just press C-c C-v t and all of the SRC blocks are rendered out to a file named jack.el

Spacemacs’ init.el file contains things I don’t know how to move, so I kept that file in place and I simply load my customizations into the appropriate section, like this…

(defun dotspacemacs/user-config ()
  "Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration.
This is the place where most of your configurations should be done. Unless it is
explicitl specified that a variable should be set before a package is loaded,
you should place your code here."

  (load "~/Dropbox/Sync/dotfiles/spacemacs.d/jack.el")


I don’t know if that was the best way of doing things, but it worked. Having my entire configuration as an Org Mode file is pretty nice. I’m finding it to be much easier to manage and it’s made me less nervous about cluttering things up in the future.

I’ve uploaded a copy of my configuration for anyone interested.

Watercolor Exercise - Gift Tags

I’m still learning to paint with watercolors, so I decided to paint gift tags for Christmas. I made a handful of them, and found it to be pretty easy. Making small paintings takes the pressure off having to deal with detail. I have a long way to go, but I’m happy with how they turned out.

Farewell To My Apple Watch - Matt Gemmell

Matt Gemmell

Today, things have changed considerably, and I’m getting rid of my Apple Watch.

It’s nice to see I’m not the only one who overthinks the shit out of changing my mind all the time. I’ve gone through the same cycle and back again about my Apple Watch. I’m currently back in the “I dig it” phase.


Cecil (2016). Nikon F3. 105mm f/2.5. Tri-X in Diafine.

I get to watch Cecil for the next couple of days. He’s such a cute dog.

I’m trying Diafine again, because I like the idea of shooting Tri-X at 1250 and not worrying about temperature, accurate timing, etc. This roll ended up with some spotty areas, so I’m not sure what happened yet. I’ll try again.

Previewing Markdown Files with Marked and Vim

I’ve been tinkering with Vimwiki again. It happens.

While editing Markdown files, I often want to see a preview of the file as HTML. This is where Brett Terpstra’s Marked comes in handy.

I didn’t know the best way to start previewing a file directly from Vim to Marked. A quick search turned up this post by Rob Allen showing how to use Vim’s make command to open the current file in Marked.

It’s easy. In ~/.vim/ftplugin/markdown.vim, I added the following line…

set makeprg=open\ -a\ Marked\\\\ '%:p

Now, when editing any Markdown file I just type :make and that file opens in Marked. Neat.

Five Things You Notice When You Quit The News

David Cain:

Every minute spent watching news is a minute you are unavailable for learning about the world in other ways. Americans probably watch a hundred million hours of news coverage every day. That’s a lot of unread books, for one thing.

Read three books on a topic and you know more about it than 99% of the world. Watch news all day for years and you have a distant, water-cooler-level awareness of thousands of stories, at least for the few weeks each is popular.

I haven’t watched televised news in years. I’ve just recently reduced my news intake to the printed NYT and a couple of magazines and I’m very happy with my decision.