ix.io upload: work with non-file buffers
This commit is contained in:
parent
d8c2b4751d
commit
6825ec53d2
|
@ -89,7 +89,7 @@ Then the text of the region/buffer is uploaded, and the URL is copied to clipboa
|
|||
(let ((output (generate-new-buffer "ixio")) url)
|
||||
(shell-command-on-region beg end
|
||||
(format "curl -F 'ext:1=%s' -F 'f:1=<-' ix.io 2>/dev/null"
|
||||
(file-name-extension (buffer-file-name)))
|
||||
(file-name-extension (or (buffer-file-name) " .txt")))
|
||||
output)
|
||||
(setq url (string-trim-right (with-current-buffer output (buffer-string))))
|
||||
(kill-buffer output)
|
||||
|
|
Loading…
Reference in New Issue