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