You will need at least Python 2.6 (earlier versions may work, but are not
tested, Python 3 is not supported). pastemacs itself is available in the
Python package index and can simply be installed using
pip install pastemacs # or easy_install pastemacs
git clone git://github.com/dirkhusemann/pastemacs.git cd pastemacs python setup.py install
In this case you need to manually install lodgeitlib before.
Moreover you need a working installation of Pymacs. This should be available in the package repositories of your distribution. If not, or if you are on Windows, refer to the Pymacs documentation for installation instructions.
In order to use pastemacs, just add the following two lines to your Emacs configuration file:
(pymacs-load "pastemacs" "paste-") (paste-menu)
The second line only enables the GUI menu to create and fetch pastes, and is
not strictly required. Now all pastemacs commands are available. You can
use them either through the menu (if enabled) or by executing them directly
M-x. pastemacs does not register any shortcuts for its commands,
so if you want some, you have to register them for yourself (e.g. by using
paste-new creates a new paste. If transient mark mode is
enabled and the mark is active, it pastes the contents of the region,
otherwise it pastes the complete buffer contents.
The command prompts for a (programming) language, in which the paste is written. This is used for syntax highlighting in the pastebin web interface. The list of available languages is fetched from the server, once you create your first paste, and available as completion list for the language prompt. You cannot enter a language, which isn't supported, so if the language isn't available, choose the default "text".
pastemacs tries to derive a language from the name of the major mode and sets it as default while prompting for a language, but this isn't really clever, and will often fail. So be sure to check the language, if you want syntax highlighting for your paste.
By default the URL of the new paste will only be displayed in the minibuffer
and in the
*Messages* buffer. To automatically put the url into the
kill ring, set the variable
paste-kill-url to a non-nil value in your
Alternatively new pastes can automatically be opened in your favourite web
browser by setting
paste-show-in-browser to a non-nil value in your
Both variables are available in customization.
To retrieve a paste, use
paste-fetch. It fetches a paste and inserts
its contents at the point in the current buffer.
The commands prompts for a paste to retrieve. You can either enter a complete paste URL, or just a paste ID. Empty input is also allowed, and stands for the last paste.
Simply visit the customization group
Issues, Feedback and Development
All development happens on Github.
Please report issues, proposals or enhancements to the issue tracker. Please provide as much information as possible when reporting issues.
Feel free to clone the repository, add you own modifications and send a pull requests. Enhancements and new features are always appreciated :)