commit c6f74cc788bf8f4dececdb2cb96f2b468dc7b456
parent 6eaf40ed733b4a8a2d576bfc0260a085e71dc9e8
Author: Jamie Beardslee <beardsleejamie@gmail.com>
Date: Mon, 15 Jun 2020 17:15:35 +1200
(use-package eww): added command to edit the current url.
Diffstat:
1 file changed, 21 insertions(+), 0 deletions(-)
diff --git a/config.org b/config.org
@@ -508,10 +508,12 @@ browser, and change the width to 80 columns.
shr-use-colors nil
shr-use-fonts nil))
<<browse-url-externally-please>>
+ <<eww-edit-current-url>>
:bind
(:map eww-mode-map
("M-n" . forward-paragraph)
("M-p" . backward-paragraph)
+ ("e" . eww-edit-current-url)
("f" . plumb-stream)
("D" . plumb-download-video)
("A" . plumb-audio)
@@ -533,6 +535,25 @@ browser, and change the width to 80 columns.
nil 0 nil url))
#+end_src
+**** Edit current URL
+
+Useful command to edit the current URL. With prefix arg, open the
+edited URL in a new buffer. Bound to =e= in eww-mode.
+
+#+name: eww-edit-current-url
+#+begin_src emacs-lisp :tangle no
+ (defun eww-edit-current-url (&optional arg)
+ "Edit the current URL.
+ With prefix ARG, open in a new buffer."
+ (interactive "p")
+ (let ((url
+ (read-string (if (= arg 1)
+ "URL: "
+ "URL (new buffer): ")
+ (eww-current-url))))
+ (eww url arg)))
+#+end_src
+
*** ERC
The only reason for this to be here is to set my nick.