Function: send-to

send-to is an autoloaded, interactive and byte-compiled function defined in send-to.el.gz.

Signature

(send-to &optional ITEMS)

Documentation

Send file(s) or region text to (non-Emacs) applications or services.

Sending is handled by the first supported handler from send-to-handlers.

ITEMS list is also populated by the resolved handler, but can be explicitly overridden.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/send-to.el.gz
;;;###autoload
(defun send-to (&optional items)
  "Send file(s) or region text to (non-Emacs) applications or services.

Sending is handled by the first supported handler from `send-to-handlers'.

ITEMS list is also populated by the resolved handler, but can be
explicitly overridden."
  (interactive)
  (let ((handler (send-to--resolve-handler)))
    (unless handler
      (error "No handler found"))
    (dolist (item items)
      (unless (stringp item)
        (error "Item must be a string: %s" item)))
    (funcall (or (map-elt handler :send)
                 (error "Handler without :send capability"))
             (or items
                 (when (map-elt handler :collect)
                   (funcall (map-elt handler :collect)))
                 (user-error "Nothing to send")))))