[gnus git] branch master updated: n0-17-72-g7bae26a =2= * shr.el (shr-browse-image): Copy the URL if called interactively. ; Resolve conflict.
Lars Magne Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 7bae26a412bf41fbfeb05d7330c8fadf29b72dd1 (commit)
via 47d1ae1c6a92e5bc452ed75c6d1f91f7d398de85 (commit)
from f3815ce84c470cbc22114291a1cfe4a5d87c54dc (commit)
- Log -----------------------------------------------------------------
commit 7bae26a412bf41fbfeb05d7330c8fadf29b72dd1
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Tue May 31 20:58:49 2011 +0200
* shr.el (shr-browse-image): Copy the URL if called interactively.
diff --git a/lisp/shr.el b/lisp/shr.el
index ebd8549..c5506d9 100644
--- a/lisp/shr.el
+++ b/lisp/shr.el
@@ -183,14 +183,23 @@ redirects somewhere else."
(message "No image under point")
(message "%s" text))))
-(defun shr-browse-image ()
- "Browse the image under point."
- (interactive)
+(defun shr-browse-image (&optional copy-url)
+ "Browse the image under point.
+If COPY-URL (the prefix if called interactively) is non-nil, copy
+the URL of the image to the kill buffer instead."
+ (interactive "P")
(let ((url (get-text-property (point) 'image-url)))
- (if (not url)
- (message "No image under point")
+ (cond
+ ((not url)
+ (message "No image under point"))
+ (copy-url
+ (with-temp-buffer
+ (insert url)
+ (copy-region-as-kill (point-min) (point-max))
+ (message "Copied %s" url)))
+ (t
(message "Browsing %s..." url)
- (browse-url url))))
+ (browse-url url)))))
(defun shr-insert-image ()
"Insert the image under point into the buffer."
commit 47d1ae1c6a92e5bc452ed75c6d1f91f7d398de85
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Tue May 31 20:59:29 2011 +0200
Resolve conflict.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5e4f7d7..9d141f9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -10,6 +10,10 @@
* gnus-sum.el (gnus-summary-exit): Make sure to kill article buffer in
ephemeral group.
+2011-05-31 Lars Magne Ingebrigtsen <[email protected]>
+
+ * shr.el (shr-browse-image): Copy the URL if called interactively.
+
2011-05-30 Lars Magne Ingebrigtsen <[email protected]>
* gnus-group.el (gnus-group-mark-article-read): It's possible that we
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 4 ++++
lisp/shr.el | 21 +++++++++++++++------
2 files changed, 19 insertions(+), 6 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project