pastebin

pastebin is an Emacs interface to pastebin.com.

You can use it to send little snippets of code (or whole buffers) to the web for sharing with others.

pastebin allows sending of regions or whole buffers and let’s you specify the virtual host for pastebin. So you can send code to emacs.pastebin.com or myproject.pastebin.com.

The code is downloadable from the wiki here: pastebin.el

Apparently this version is broken as reported by RyanDavis: pastebin-version-path is undefined. - IvanKorotkov

Fixed now. Thanks. - NicFerrier


The code is also on a github repo here.


There are two versions of pastebin’s code. One is the main site available on the Internet, the other is an earlier downloadable version. The pastebin elisp library supports both of these via configuration which allows the version supported by a particular domain to be specified.


IvanKorotkov kindly updated this code to match the new pastebin.com API and also added customization group added allowing to set default prefix (subdomain) and modes-alist.

He keeps his version here: pastebin.el

That version varies widely from the one on here and it looks like the one on here is newer. Unfortunately, the one on here seems more than a little shortsighted. To use subdomains you used to be able to customize the following:

    '(pastebin-default-subdomain "zenspider")

Now, you must do all of:

    '(pastebin-default-domain "zenspider.pastebin.com")
    '(pastebin-domain-versions (quote (("pastebin.com" "/api_public.php")
                                       ("zenspider.pastebin.com" "/api_public.php")
                                       ("pastebin.example.com" "/pastebin.php"))))

The subdomain code was much more straightforward.

I just found another bug. Using it with subdomains now returns urls like:

    http://zenspider.pastebin.com.pastebin.com/BAPMb2A3

RyanDavis


asvil updated IvanKorotkov’s code to match the new pastebin.com API.

New pastebin.el version here: newpastebin.el


I’ve change newpastebin.el, if no name is provided to pastebin function, buffer-name is used. Also fix the check for region. Here is buffer-name-pastebin.el

Editing: I create a new version of pastebin.el, supporting fetch and deletion, here is: gkos/emacs-pastebin

DanielHilst

Get in touch with me via github? I’d be quite happy to assign you the repo for pastebin.el

You access your API-key from a text file rather than inserting it directly in your emacs init-file. See the Comments page. – ColinBaxter