* lisp/net/shr.el (shr-copy-url): Also copy the image URL.

* lisp/net/shr.el (shr-copy-url): Also copy the image URL.
parent 805318e1
2014-08-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/shr.el (shr-copy-url): Also copy the image URL.
2014-08-05 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-cache.el (tramp-flush-file-function): Suppress function
......
......@@ -214,12 +214,16 @@ DOM should be a parse tree as generated by
(overlay-put overlay 'before-string nil))))
(forward-line 1)))))
(defun shr-copy-url ()
(defun shr-copy-url (&optional image-url)
"Copy the URL under point to the kill ring.
If IMAGE-URL (the prefix) is non-nil, or there is no link under
point, but there is an image under point then copy the URL of the
image under point instead.
If called twice, then try to fetch the URL and see whether it
redirects somewhere else."
(interactive)
(let ((url (get-text-property (point) 'shr-url)))
(interactive "P")
(let ((url (or (get-text-property (point) 'shr-url)
(get-text-property (point) 'image-url))))
(cond
((not url)
(message "No URL under point"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment