This repository has been archived on 2021-02-16. You can view files and clone it, but cannot push or open issues or pull requests.
emacs-upload/README.org
2020-02-15 11:42:16 -07:00

40 lines
976 B
Org Mode

#+TITLE: emacs-upload.el
Upload regions, buffers, and files to various hosts.
* Dependencies
- ~cURL~
* Usage
Place emacs-upload.el in ~load-path~ and load the package
#+BEGIN_SRC: emacs-lisp
(require 'emacs-upload)
#+END_SRC
Optionally, bind the interactive function ~emacs-upload~ to some key
#+BEGIN_SRC: emacs-lisp
(global-set-key (kbd "C-c e") 'emacs-upload)
#+END_SRC
Optionally, set the host upon emacs init
#+BEGIN_SRC: emacs-lisp
(emacs-upload/set-host "ix")
#+END_SRC
~emacs-upload/set-host~ is also an interactive command, so you can
change your host on the fly.
Alternatively, do all three with ~use-package~
#+BEGIN_SRC
(use-package emacs-upload
:demand t
:bind
("C-c e" . emacs-upload)
:config
(emacs-upload/set-host "ix"))
#+END_SRC
To upload the region, simply select the region and call
emacs-upload. To upload the whole buffer, have no region selected
and call emacs-upload. For a file, use the universal argument C-u
before calling emacs-upload.