Brad Lucas

A blog mostly about programming
June 21, 2017

Gist mode for the win

If you have a GitHub account you are probably aware of gists. Small mini repos which allow you to send links to their content easily. You can create secret and public gists and I've found them to be excellent for sending examples, lists and notes to others in a more contained format than email.

For example, you create a todo list and want to share it with your team. You create a gist of the outline and send everyone the link. The team can all see the outline, add comments and see updates much like a full git repo. All of this without the full setup of a repo.

Now if you use Emacs there is gist mode which makes creating and editing gists even easier.

The mode is available here https://github.com/defunkt/gist.el.

Once installed and setup try gist-list to see all of your gists. It will look like Dired mode and you'll pretty much know already what to do. To start with an existing gist hit Enter on an entry to edit.

To create a gist start with a local buffer or file. Start there, select the entire buffer (region) and then execute gist-region. This will create a public gist. The related gist-region-private command creates a private gist

There is more you can do so feel free to explore. Oh, and one last tip. Whenever you create a gist you'll find that the resulting url to the gist has been copied to your clipboard so you'll find it pasteable right after you great the gist and need to send the link to it.


Tags: emacs git