How to enable old-style listing output in SAS 9.3 and best practices for sharing SAS output

Starting with version 9.3, SAS has switched to using the "new" ODS HTML-style output in favor of the "old" listing-style output format. While the new format is arguably easier to read, it may be more difficult to copy/paste into documents or emails.

How do you get the old-style listing output in SAS 9.3?

Add the following line to the very top of your SAS Editor file:

ods listing; /* Turn on old style output */

How to you avoid weird ƒ characters when copying/pasting listing output?

SAS uses a special font for displaying lines in listing output. If that font isn't available or isn't selected, you get strange characters instead of lines.

There are two ways to fix this. The first is to paste your SAS output into the form on, and then paste from the website into your document/email. This looks the best but requires an extra step.

The second is to add the following line to the top of your SAS Editor file. It doesn't look as good but it saves the extra step of the first method.

options formchar="|----|+|---+=|-/\<>*";

Here's what both look like:

Remember to use a monospaced font

If you paste SAS output into Microsoft Word or a similar editor, you should use a monospaced font like Courier New.

MailMate: select previous (older) message on archive

If you want to mimic the Gmail behavior of selecting the next older message after archiving (MailMate by default selects the message above the one you archived if you're sorting from newest to oldest), you need to toggle this hidden preference:

defaults write com.freron.MailMate MmMessagesOutlineMoveStrategy -string 'previous'

This is posted in the MailMate bug tracker, but I wanted to post again here to potentially enhance googleability.

Update: this is also posted on the official documentation page for hidden preferences.

MailMate: add "open in MailMate" link to FastMail's web interface

Search in MailMate works great in terms of accuracy, but is a bit slow with ~65,000 messages (searching "common headers or body", which is the most resource-intensive search option, but I prefer to search everything from one field a la Spotlight). Search in the web interface for FastMail (my email provider) is both accurate and very fast. So why not use FastMail for searching and MailMate for everything else?

To this end, I made a quick-and-dirty Chrome extension for adding a "Open in MailMate" link to FastMail's web interface.

No guarantees this will work for you because it's quite a hack. It has to load the raw message via an XHR request and then find the "message-id" in order to build a message:// URL that will trigger MailMate.

When MailMate opens the message, you can use the Message > Go to Source menu item to show the message in context (possibly followed with showing all messages in a thread).

Head over to GitHub to grab the extension.

MailMate: combination of conversation and thread arc views

MailMate has an unsupported feature for creating custom layouts. I quickly created a combination of the two best (IMO) layouts: the conversation layout and the thread arc layout.

Here's a screenshot:


Here's the code:

MailMate: keyboard shortcut to archive all messages in a thread

One arguably strange behavior in MailMate is that when you archive a message, other messages in the thread can stay in your inbox.

Fortunately, it's possible to re-map the archive keyboard shortcut to archive all messages in a thread. Using the instructions for adding custom keybindings, add the following:

"y" = ( "selectWithFilter:", "#thread-id = ${#thread-id}", "archive:");

Note that I use "y" instead of "e" because I use FastMail instead of Gmail.

Ulysses III RTF manuscript style (.ulss)

Ulysses III has an awesome feature for styling RTF exports of Markdown documents. I created a .ulss stylesheet file for a double-spaced manuscript. It's still a work in progress – it's not specific to any journal's requirements currently, but it certainly could be.

Click here to view the gist containing the .ulss file (too long to embed).

Here's a sample file in Ulysses:

And here's the direct export in Word:

I haven't finished playing around with embedding figures or inserting citations. Citations are obviously huge for academic writing, and the new Papers 3 is awesome but doesn't seem to fully support Ulysses. Part of the problem seems to be that the Papers 3 popup citation inserter can't generate the references list inside Ulysses. The other part of the problem is that by default, Ulysses does crazy parsing stuff to the Papers citation placeholder tags (e.g. {Smith:2013xx}).

I've got some work-arounds but they are too fragile to be worth writing about at this point. Even if the workflow is a little jury-rigged, it will still probably be better than WYSIWYG formatting with Pages or Word – it's amazing to have completely uniform formatting without futzing around with manually applying styles.

I'm asking for some help...we'll see what happens:

Safe Chrome extension to merge windows

I don't like installing Chrome extensions from 3rd parties because these extensions can literally see everything you do in your browser, can grab usernames and passwords, etc. without your knowledge. (I once wrote Chrome extensions. It's scary what you can do.)

There are a ton of "merge windows" extensions that let you combine tabs from multiple windows into one window. If you're not paranoid, any of these will probably get the job done.

If you are paranoid, there is a "merge windows" example extension in the developer docs. The code is really simple (easy to read through to see if anything nefarious is going on) and it is installed as an unpacked extension so there are no automatic updates that could introduce unknown code.

Here's a backup of the code in case Google takes this out of the docs someday.