summaryrefslogtreecommitdiffhomepage
path: root/eww.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-04-08 04:59:16 +0100
committerjao <jao@gnu.org>2021-04-08 04:59:16 +0100
commit7250b0f436ce31f2cf75dbaf9f00972dc4ad0b4b (patch)
treed996a3cb2c91a8586405d482439883d182b62ba4 /eww.org
parent86f38468a5ae8d527dbd633b51f52796c882bf06 (diff)
downloadelibs-7250b0f436ce31f2cf75dbaf9f00972dc4ad0b4b.tar.gz
elibs-7250b0f436ce31f2cf75dbaf9f00972dc4ad0b4b.tar.bz2
nits
Diffstat (limited to 'eww.org')
-rw-r--r--eww.org9
1 files changed, 8 insertions, 1 deletions
diff --git a/eww.org b/eww.org
index e0b12b3..031eba4 100644
--- a/eww.org
+++ b/eww.org
@@ -106,6 +106,12 @@
* Visiting links in a page
#+begin_src emacs-lisp
+ (defun jao-eww-copy-link ()
+ (interactive)
+ (when-let (lnk (or (car (eww-links-at-point)) (eww-current-url)))
+ (message "%s" lnk)
+ (kill-new lnk)))
+
(defun jao-eww--at-link ()
(and (get-text-property (point) 'shr-url)
(not (get-text-property (point) 'eww-form))))
@@ -188,6 +194,7 @@
:bind (:map eww-mode-map (("b" . eww-back-url)
("B" . eww-forward-url)
+ ("c" . jao-eww-copy-link)
("d" . eww-download)
("D" . jao-download)
("f" . eww-lnum-follow)
@@ -206,7 +213,7 @@
("w" . org-eww-copy-for-org-mode)
("W" . jao-eww-close)
("x" . jao-rss-subscribe)
- ("y" . eww-copy-page-url)
+ ("y" . jao-eww-copy-link)
("C-c C-w" . jao-eww-close))))
#+end_src