summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2024-03-09 14:56:22 -0500
committerJohn Turner <jturner.usa@gmail.com>2024-03-09 14:56:52 -0500
commitb40455db815ee3593191ca270b8804e535fb5c4f (patch)
tree2773a05072f5d8d347c2aa61442ddb8fb48f4c4a
parent3fefebf0682c711d2ac2031f3191ef626bae7be7 (diff)
downloadwgetpaste.el-b40455db815ee3593191ca270b8804e535fb5c4f.tar.gz
make wgetpaste-file function to wgetpaste files without opening them
-rw-r--r--wgetpaste.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/wgetpaste.el b/wgetpaste.el
index 5db808d..3aafcb6 100644
--- a/wgetpaste.el
+++ b/wgetpaste.el
@@ -74,6 +74,12 @@
(with-current-buffer work-buffer
(wgetpaste-buffer))))
+(defun wgetpaste-file (file)
+ (interactive (list (read-file-name "wgetpaste file: ")))
+ (with-temp-buffer
+ (insert-file-contents-literally file)
+ (wgetpaste-buffer)))
+
;; hooks
(defun wgetpaste-clear-stdout-buffer ()