branch: externals/embark commit c8f58a3308a4b2fdc452b936ac4731c2c6414849 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Add a few more region actions --- embark.el | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/embark.el b/embark.el index 50f5de3..9076bb9 100644 --- a/embark.el +++ b/embark.el @@ -3535,6 +3535,13 @@ ALGORITHM is the hash algorithm symbol understood by `secure-hash'." (delete-region start end) (insert decoded))) +(defvar epa-replace-original-text) +(defun embark-epa-decrypt-region (start end) + "Decrypt region between START and END." + (interactive "r") + (let ((epa-replace-original-text t)) + (epa-decrypt-region start end))) + ;;; Setup and pre-action hooks (defun embark--restart (&rest _) @@ -3623,13 +3630,14 @@ and leaves the point to the left of it." ("SPC" mark) ("DEL" delete-region)) -;; TODO add more encode actions, see M-x or C-h f encode region +(autoload 'message-caesar-region "message" nil t) (embark-define-keymap embark-encode-map "Keymap for Embark region encoding actions." :parent nil - ("r" rot13-region) + ("r" message-caesar-region) ;; default rot13-region ("." morse-region) ("-" unmorse-region) + ("s" studlify-region) ("m" embark-hash-md5) ("1" embark-hash-sha1) ("2" embark-hash-sha256) @@ -3638,8 +3646,12 @@ and leaves the point to the left of it." ("5" embark-hash-sha512) ("f" format-encode-region) ("F" format-decode-region) + ("b" base64-encode-region) + ("B" base64-decode-region) ("u" embark-encode-url) - ("U" embark-decode-url)) + ("U" embark-decode-url) + ("c" epa-encrypt-region) + ("C" embark-epa-decrypt-region)) (fset 'embark-encode-map embark-encode-map) @@ -3693,6 +3705,10 @@ and leaves the point to the left of it." ("_" calc-grab-sum-across) ("r" reverse-region) ("D" delete-duplicate-lines) + ("b" browse-url-of-region) + ("h" shr-render-region) + ("'" expand-region-abbrevs) + ("v" vc-region-history) ("s" 'embark-sort-map) (">" 'embark-encode-map)) @@ -3768,6 +3784,7 @@ and leaves the point to the left of it." ("s" info-lookup-symbol) ("n" embark-next-symbol) ("p" embark-previous-symbol) + ("'" expand-abbrev) ("$" ispell-word)) (embark-define-keymap embark-expression-map