From 7250b0f436ce31f2cf75dbaf9f00972dc4ad0b4b Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 8 Apr 2021 04:59:16 +0100 Subject: nits --- eww.org | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'eww.org') 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 -- cgit v1.2.3