Edit your gmail messages with emacs and make http requests from your favorite editor
I recently found two interesting emacs plusing which can be applied for many usecases.
gmail-message-mode lets you invoke an emacs editor straight
from the compose screen in gmail. You need to click on an icon or you
can use a keyboard shortcut -
alt + enter (this key chord is not
customizable, its just on/off, what a misery for emacs geeks ;-)).
Then it’ll open a new emacs frame. You can use markdown syntax.
When you’re done just hit
C-x # and the buffer is converted to html
and inserted in the gmail compose window.
You need to have a markdown converter installed, which will respond to
markdown command. In my case this is [marku].
$ markdown --version Maruku 0.6.1
This plugin works fairly well, but because of interplay between markdown, html and gmail there are some glitches sometimes. Maybe I need to try it with a different markdown converter.
Restclient allows you to write and annotate http requests in a
text file and then run them at will. Perfect for documentations
purposes of for experimenting with a REST API.
The usage is very simple. Write a bunch of requests, separate them by
comments (lines starting with
#). Select a request and hit
C-c. You can use http methods and customer headers.
To use basic auth, you can use
Authorization header like this:
Authorization: Basic user:password
user:password and hit
Authorization: Basic dXNlcjpwYXNzd29yZA==
This is perfect to document an API with examples, or just to have a record of a session with an API.