tests: Rename test.el -> srht-test.el
Lazily initialize srht-token.
GNU Emacs sourcehut API client.
srht provides bindings to the Sourcehut REST API as well as commands for
interacting with it. It currently supports two services:
git.sr.ht — git
paste.sr.ht — ad-hoc text file hosting.
git clone https://git.sr.ht/~akagi/srht.el srht cd srht guix package -f guix.scm
srht depends on the HTTP library
plz which is available in ELPA. After
installing it, place files from /lisp folder in
To use this client, you need to generate a personal access token (Oauth not Oauth2). This token will have unrestricted access to all sr.ht APIs and can be used like a normal access token to authenticate API requests.
After creating the token:
(setq srht-token TOKEN)
It is also possible to store the token using
auth-source.el, the host must be
set to sr.ht.
machine sr.ht password TOKEN
You also need to set srht-username:
(setq srht-username USERNAME)
If you are using a self-hosted instanse:
(setq srht-domain '(DOMAIN ...))
||Update information for git repository|
||Delete existing git repository|
||Create git repository|
||Kill the link of the selected paste|
||Detete paste with SHA|
||Paste region or buffer to sourcehut|
This package is part of GNU Emacs, being distributed in GNU ELPA. Contributions to this project must follow GNU guidelines, which means that, as with other parts of Emacs, patches of more than a few lines must be accompanied by having assigned copyright for the contribution to the FSF. Contributors who wish to do so may contact email@example.com to request the assignment form.