From 8bac9ecbd062c9ff67268c2dcd0936f6627d10fc Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Fri, 17 Apr 2020 14:16:53 -0400 Subject: [PATCH] Pull in s3ed --- emacs/init.org | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index 4d165d8..f75f678 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -4809,18 +4809,14 @@ Syntax highlighting for Dockerfiles: * AWS ** S3 #+BEGIN_SRC emacs-lisp - (defun save-to-s3 (bucket public) - (interactive "MS3 bucket URL (e.g. s3://bucket/filename): \nP") - (let* ((tmp-file (make-temp-file "s3-upload")) - (cmd `("aws" "s3" "cp" ,@(if public '("--acl" "public-read")) ,tmp-file ,bucket))) - (setq last-s3-url bucket) - (write-region (point-min) (point-max) tmp-file) - (let ((proc (apply #'start-process "aws-s3" "*aws-s3*" cmd))) - (set-process-sentinel - proc - (make-success-err-msg-sentinel "*aws-s3*" - (format "Uploaded to %s" last-s3-url) - "Failed to upload to s3, check *aws-s3* buffer for details"))))) + (use-package s3ed + :commands (s3ed-mode + s3ed-find-file + s3ed-save-file) + :init + (jdormit/define-prefix "fS" "s3") + (leader-def-key "fSf" #'s3ed-find-file) + (leader-def-key "fSs" #'s3ed-save-file)) #+END_SRC * Prodigy