Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
488df60a
Commit
488df60a
authored
Aug 05, 2014
by
Lars Magne Ingebrigtsen
Browse files
* 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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/net/shr.el
lisp/net/shr.el
+7
-3
No files found.
lisp/ChangeLog
View file @
488df60a
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
...
...
lisp/net/shr.el
View file @
488df60a
...
...
@@ -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"
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment