diff --git a/emacs/init.org b/emacs/init.org index f75f678..d7c6e59 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -4816,7 +4816,22 @@ Syntax highlighting for Dockerfiles: :init (jdormit/define-prefix "fS" "s3") (leader-def-key "fSf" #'s3ed-find-file) - (leader-def-key "fSs" #'s3ed-save-file)) + (leader-def-key "fSs" #'s3ed-save-file) + :config + (defun s3ed-open-blob-log () + "Opens the blob log at point via the cloudfront proxy." + (interactive) + (let ((fname-at-point (dired-file-name-at-point))) + (if (string-match + "\\(bloblogs.ops.lola.co[m]*\\)\/blobs\/\\(\\(production\\|dev\\|local\\|smoke\\|staging\\)\/[0-9]+/.*\\)" + fname-at-point) + (let* ((host (match-string 1 fname-at-point)) + (path (match-string 2 fname-at-point)) + (proxy-url (format "https://%s/%s" host path))) + (browse-url proxy-url)) + (error "Not in a blob logs directory")))) + :general + ((normal) s3ed-mode-map "B" #'s3ed-open-blob-log)) #+END_SRC * Prodigy