Gnus development mailing list
 help / color / mirror / Atom feed
* [emacs-w3m:11211] right clicking on URL in emacs-w3m vs. gnus
@ 2010-04-17 22:41 jidanni
  2010-04-20 17:20 ` Ted Zlatanov
  0 siblings, 1 reply; 14+ messages in thread
From: jidanni @ 2010-04-17 22:41 UTC (permalink / raw)
  To: emacs-w3m; +Cc: ding

In emacs-w3m, right clicking on a link brings up a menu with lots of choices.

However doing the same action inside gnus doesn't.

E.g., try right clicking on http://example.org/ .



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [emacs-w3m:11211] right clicking on URL in emacs-w3m vs. gnus
  2010-04-17 22:41 [emacs-w3m:11211] right clicking on URL in emacs-w3m vs. gnus jidanni
@ 2010-04-20 17:20 ` Ted Zlatanov
  2010-04-21  6:08   ` [emacs-w3m:11213] " Katsumi Yamaoka
  0 siblings, 1 reply; 14+ messages in thread
From: Ted Zlatanov @ 2010-04-20 17:20 UTC (permalink / raw)
  To: ding; +Cc: emacs-w3m

On Sun, 18 Apr 2010 06:41:23 +0800 jidanni@jidanni.org wrote: 

j> In emacs-w3m, right clicking on a link brings up a menu with lots of choices.
j> However doing the same action inside gnus doesn't.

j> E.g., try right clicking on http://example.org/ .

This is composed of two things actually:

1) the emacs-w3m popup menu should be accessible in the Article buffer.
Currently it can be invoked with (w3m-mouse-major-mode-menu EVENT) so it
*can* be bound to right-click in the article mode by the user.  This
part is pretty easy.

2) right-click on a URL should bring up that menu.  I'm not sure if
there are any other logical things to hang on right-click in Gnus.  For
instance we could bring up the Treatment or Commands menus that are
otherwise in the pulldown.  So maybe the emacs-w3m menu should be under
the main popup menu in the article buffer, and it should also show up in
the menu bar when the article buffer is using emacs-w3m.

Any opinions?

Ted




^ permalink raw reply	[flat|nested] 14+ messages in thread

* [emacs-w3m:11213] Re: right clicking on URL in emacs-w3m vs. gnus
  2010-04-20 17:20 ` Ted Zlatanov
@ 2010-04-21  6:08   ` Katsumi Yamaoka
  2010-04-21 14:23     ` Ted Zlatanov
  0 siblings, 1 reply; 14+ messages in thread
From: Katsumi Yamaoka @ 2010-04-21  6:08 UTC (permalink / raw)
  To: ding; +Cc: emacs-w3m

[-- Attachment #1: Type: text/plain, Size: 1824 bytes --]

>>>>> Ted Zlatanov wrote:
> On Sun, 18 Apr 2010 06:41:23 +0800 jidanni@jidanni.org wrote:

j> In emacs-w3m, right clicking on a link brings up a menu with lots of choices.
j> However doing the same action inside gnus doesn't.

j> E.g., try right clicking on http://example.org/ .

> This is composed of two things actually:

> 1) the emacs-w3m popup menu should be accessible in the Article buffer.
> Currently it can be invoked with (w3m-mouse-major-mode-menu EVENT) so it
> *can* be bound to right-click in the article mode by the user.  This
> part is pretty easy.

> 2) right-click on a URL should bring up that menu.  I'm not sure if
> there are any other logical things to hang on right-click in Gnus.  For
> instance we could bring up the Treatment or Commands menus that are
> otherwise in the pulldown.  So maybe the emacs-w3m menu should be under
> the main popup menu in the article buffer, and it should also show up in
> the menu bar when the article buffer is using emacs-w3m.

> Any opinions?

I don't know what items the menu should provide but I tried hacking
it as attached below.  Currently the right-click pops up this menu:

,----
| Open this link with
| ===================
| browse-url
| emacs-w3m
`----

(The first item overlaps to the middle-click though.)


2010-04-21  Katsumi Yamaoka  <yamaoka@jpl.org>

	* gnus-art.el (gnus-article-add-buttons): Add url string as text
	property to button.
	(gnus-article-extend-url-button): Use text property instead of overlay
	to add url to button.
	(gnus-article-link-map): New variable.
	(gnus-article-open-link-with-browse-url)
	(gnus-article-open-link-with-emacs-w3m): New functions.
	(gnus-article-link-menu): New menu.
	(gnus-article-add-button): Add url string as text property to button.
	(gnus-button-push): Assume gnus-button-url is text property.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 4480 bytes --]

--- gnus-art.el~	2010-04-18 23:04:00 +0000
+++ gnus-art.el	2010-04-21 06:07:17 +0000
@@ -7781,15 +7781,17 @@
 	      (push from gnus-button-marker-list)
 	      (unless (and (eq (car entry) 'gnus-button-url-regexp)
 			   (gnus-article-extend-url-button from start end))
-		(gnus-article-add-button start end
-					 'gnus-button-push from)))))))))
+		(gnus-article-add-button
+		 start end 'gnus-button-push from
+		 (and (eq (car entry) 'gnus-button-url-regexp)
+		      (buffer-substring start end)))))))))))
 
 (defun gnus-article-extend-url-button (beg start end)
   "Extend url button if url is folded into two or more lines.
 Return non-nil if button is extended.  BEG is a marker that points to
 the beginning position of a text containing url.  START and END are
 the endpoints of a url button before it is extended.  The concatenated
-url is put as the `gnus-button-url' overlay property on the button."
+url is put as the `gnus-button-url' text property on the button."
   (let ((opoint (point))
 	(points (list start end))
 	url delim regexp)
@@ -7829,14 +7831,13 @@
 					       (match-beginning 1))
 					   points)))))
 		     (match-beginning 2)))
+	  (setq url (mapconcat 'identity (nreverse url) ""))
 	  (let (gnus-article-mouse-face widget-mouse-face)
 	    (while points
 	      (gnus-article-add-button (pop points) (pop points)
-				       'gnus-button-push beg)))
+				       'gnus-button-push beg url)))
 	  (let ((overlay (gnus-make-overlay start end)))
 	    (gnus-overlay-put overlay 'evaporate t)
-	    (gnus-overlay-put overlay 'gnus-button-url
-			      (list (mapconcat 'identity (nreverse url) "")))
 	    (when gnus-article-mouse-face
 	      (gnus-overlay-put overlay 'mouse-face gnus-article-mouse-face)))
 	  t)
@@ -7874,8 +7875,45 @@
 
 ;;; External functions:
 
-(defun gnus-article-add-button (from to fun &optional data)
-  "Create a button between FROM and TO with callback FUN and data DATA."
+(defvar gnus-article-link-map nil)
+
+(unless gnus-article-link-map
+  (let ((map (make-sparse-keymap)))
+    (setq gnus-article-link-map map)
+    (cond ((featurep 'xemacs)
+	   (define-key map [(button3)] 'gnus-article-link-menu))
+	  ;; Don't use [mouse-3], which gets submenus not working in GTK Emacs.
+	  ((featurep 'gtk)
+	   (define-key map [down-mouse-3] 'gnus-article-link-menu)
+	   (define-key map [drag-mouse-3] 'undefined)
+	   (define-key map [mouse-3] 'undefined))
+	  (t
+	   (define-key map [mouse-3] 'gnus-article-link-menu)))))
+
+(defun gnus-article-open-link-with-browse-url ()
+  (interactive)
+  (browse-url (get-text-property (point) 'gnus-button-url)))
+
+(defun gnus-article-open-link-with-emacs-w3m ()
+  (interactive)
+  (w3m (get-text-property (point) 'gnus-button-url) t t))
+
+(easy-menu-define gnus-article-link-menu gnus-article-link-map
+  "Link menu."
+  '("Open this link with"
+    ["browse-url" gnus-article-open-link-with-browse-url]
+    ["emacs-w3m" gnus-article-open-link-with-emacs-w3m]))
+
+(defun gnus-article-link-menu (event)
+  "Pop up a link menu."
+  (interactive "e")
+  (mouse-set-point event)
+  (popup-menu gnus-article-link-menu))
+
+(defun gnus-article-add-button (from to fun &optional data url)
+  "Create a button between FROM and TO with callback FUN and data DATA.
+The optional URL is a string that will be put as the `gnus-button-url'
+text property on the button."
   (when gnus-article-button-face
     (gnus-overlay-put (gnus-make-overlay from to nil t)
 		      'face gnus-article-button-face))
@@ -7884,7 +7922,9 @@
    (nconc (and gnus-article-mouse-face
 	       (list gnus-mouse-face-prop gnus-article-mouse-face))
 	  (list 'gnus-callback fun)
-	  (and data (list 'gnus-data data))))
+	  (and data (list 'gnus-data data))
+	  (and url (list 'gnus-button-url url
+			 'keymap gnus-article-link-map))))
   (widget-convert-button 'link from to :action 'gnus-widget-press-button
 			 :button-keymap gnus-widget-button-keymap))
 
@@ -7931,13 +7971,14 @@
 	   (inhibit-point-motion-hooks t)
 	   (fun (nth 3 entry))
 	   (args (or (and (eq (car entry) 'gnus-button-url-regexp)
-			  (get-char-property marker 'gnus-button-url))
+			  (get-text-property marker 'gnus-button-url))
 		     (mapcar (lambda (group)
 			       (let ((string (match-string group)))
 				 (set-text-properties
 				  0 (length string) nil string)
 				 string))
 			     (nthcdr 4 entry)))))
+      (unless (consp args) (setq args (list args)))
       (cond
        ((fboundp fun)
 	(apply fun args))

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: right clicking on URL in emacs-w3m vs. gnus
  2010-04-21  6:08   ` [emacs-w3m:11213] " Katsumi Yamaoka
@ 2010-04-21 14:23     ` Ted Zlatanov
  2010-04-22  1:48       ` [emacs-w3m:11216] " Katsumi Yamaoka
  0 siblings, 1 reply; 14+ messages in thread
From: Ted Zlatanov @ 2010-04-21 14:23 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding, emacs-w3m

On Wed, 21 Apr 2010 15:08:26 +0900 Katsumi Yamaoka <yamaoka@jpl.org> wrote: 

>>>>>> Ted Zlatanov wrote:
>> On Sun, 18 Apr 2010 06:41:23 +0800 jidanni@jidanni.org wrote:

j> In emacs-w3m, right clicking on a link brings up a menu with lots of choices.
j> However doing the same action inside gnus doesn't.

j> E.g., try right clicking on http://example.org/ .

>> This is composed of two things actually:

>> 1) the emacs-w3m popup menu should be accessible in the Article buffer.
>> Currently it can be invoked with (w3m-mouse-major-mode-menu EVENT) so it
>> *can* be bound to right-click in the article mode by the user.  This
>> part is pretty easy.

>> 2) right-click on a URL should bring up that menu.  I'm not sure if
>> there are any other logical things to hang on right-click in Gnus.  For
>> instance we could bring up the Treatment or Commands menus that are
>> otherwise in the pulldown.  So maybe the emacs-w3m menu should be under
>> the main popup menu in the article buffer, and it should also show up in
>> the menu bar when the article buffer is using emacs-w3m.

>> Any opinions?

KY> I don't know what items the menu should provide but I tried hacking
KY> it as attached below.  Currently the right-click pops up this menu:

KY> ,----
KY> | Open this link with
KY> | ===================
KY> | browse-url
KY> | emacs-w3m
KY> `----

KY> (The first item overlaps to the middle-click though.)

Maybe Treatment, Article, and Commands should precede the w3m menu, and
they should always show up on a right-click?

Can we also hang the w3m menu in the menubar when HTML is rendered in
the article buffer?

I'm OK with any changes you think are appropriate here, these are just
suggestions.

You could make a "yamaoka-dev" branch and push it with any proposed
changes instead of a patch (the commit e-mail will still go out and we
can see your changes in the e-mail). Then we can try the feature
(collaboratively making changes to yamaoka-dev in the process) and merge
it into the master branch when it's ready and you can then delete
yamaoka-dev.  I don't know if that's the right model for us so feel free
to propose something else if you think it's better.

Ted



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [emacs-w3m:11216] Re: right clicking on URL in emacs-w3m vs. gnus
  2010-04-21 14:23     ` Ted Zlatanov
@ 2010-04-22  1:48       ` Katsumi Yamaoka
  2010-04-23  0:01         ` Ted Zlatanov
  0 siblings, 1 reply; 14+ messages in thread
From: Katsumi Yamaoka @ 2010-04-22  1:48 UTC (permalink / raw)
  To: ding; +Cc: emacs-w3m

>>>>> Ted Zlatanov wrote:
[...]
> Maybe Treatment, Article, and Commands should precede the w3m menu, and
> they should always show up on a right-click?

> Can we also hang the w3m menu in the menubar when HTML is rendered in
> the article buffer?

Hm, if what OP wishes is the *w3m* menu, though I'm still hard to
imagine what menu items should be there, I don't want it.  I only
tried a way to implement the right-click menu in an article of
*plain text* , not html.  It will be helpful to users if there are
really useful items that should be in the menu, but now it's enough
to me to press the middle button or type `M-x w3m' on a string
that looks like url. ;-)

> I'm OK with any changes you think are appropriate here, these are just
> suggestions.

> You could make a "yamaoka-dev" branch and push it with any proposed
> changes instead of a patch (the commit e-mail will still go out and we
> can see your changes in the e-mail). Then we can try the feature
> (collaboratively making changes to yamaoka-dev in the process) and merge
> it into the master branch when it's ready and you can then delete
> yamaoka-dev.  I don't know if that's the right model for us so feel free
> to propose something else if you think it's better.

Ok.  I agree it's more efficient to make a branch rather than to
post a big patch to everyone.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: right clicking on URL in emacs-w3m vs. gnus
  2010-04-22  1:48       ` [emacs-w3m:11216] " Katsumi Yamaoka
@ 2010-04-23  0:01         ` Ted Zlatanov
  2010-06-25 13:24           ` Štěpán Němec
  0 siblings, 1 reply; 14+ messages in thread
From: Ted Zlatanov @ 2010-04-23  0:01 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding, emacs-w3m

On Thu, 22 Apr 2010 10:48:52 +0900 Katsumi Yamaoka <yamaoka@jpl.org> wrote: 

KY> Hm, if what OP wishes is the *w3m* menu, though I'm still hard to
KY> imagine what menu items should be there, I don't want it.  I only
KY> tried a way to implement the right-click menu in an article of
KY> *plain text* , not html.

OK.  Let's go with your implementation then, I see what I
misunderstood.

>> You could make a "yamaoka-dev" branch and push it with any proposed
>> changes instead of a patch (the commit e-mail will still go out and we
>> can see your changes in the e-mail). Then we can try the feature
>> (collaboratively making changes to yamaoka-dev in the process) and merge
>> it into the master branch when it's ready and you can then delete
>> yamaoka-dev.  I don't know if that's the right model for us so feel free
>> to propose something else if you think it's better.

KY> Ok.  I agree it's more efficient to make a branch rather than to
KY> post a big patch to everyone.

We should do this for changes that may break the master or are somehow
debated.  This change is pretty minor and benign so don't bother if you
don't want to.

Ted



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: right clicking on URL in emacs-w3m vs. gnus
  2010-04-23  0:01         ` Ted Zlatanov
@ 2010-06-25 13:24           ` Štěpán Němec
  2010-06-27 23:25             ` [emacs-w3m:11246] " Katsumi Yamaoka
  0 siblings, 1 reply; 14+ messages in thread
From: Štěpán Němec @ 2010-06-25 13:24 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: Katsumi Yamaoka, ding, emacs-w3m

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Thu, 22 Apr 2010 10:48:52 +0900 Katsumi Yamaoka <yamaoka@jpl.org> wrote: 
>
> KY> Hm, if what OP wishes is the *w3m* menu, though I'm still hard to
> KY> imagine what menu items should be there, I don't want it.  I only
> KY> tried a way to implement the right-click menu in an article of
> KY> *plain text* , not html.
>
> OK.  Let's go with your implementation then, I see what I
> misunderstood.
>
>>> You could make a "yamaoka-dev" branch and push it with any proposed
>>> changes instead of a patch (the commit e-mail will still go out and we
>>> can see your changes in the e-mail). Then we can try the feature
>>> (collaboratively making changes to yamaoka-dev in the process) and merge
>>> it into the master branch when it's ready and you can then delete
>>> yamaoka-dev.  I don't know if that's the right model for us so feel free
>>> to propose something else if you think it's better.
>
> KY> Ok.  I agree it's more efficient to make a branch rather than to
> KY> post a big patch to everyone.
>
> We should do this for changes that may break the master or are somehow
> debated.  This change is pretty minor and benign so don't bother if you
> don't want to.
>
> Ted

Was this ever actually added to Emacs? I'm using latest Git Emacs and
emacs-w3m, but right-clicking on URLs does nothing and my gnus-art.el
does not seem to contain any of the code K.Y. proposed in one of the
messages in this thread...?

Štěpán



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [emacs-w3m:11246] Re: right clicking on URL in emacs-w3m vs. gnus
  2010-06-25 13:24           ` Štěpán Němec
@ 2010-06-27 23:25             ` Katsumi Yamaoka
  2010-06-28  7:58               ` Štěpán Němec
  0 siblings, 1 reply; 14+ messages in thread
From: Katsumi Yamaoka @ 2010-06-27 23:25 UTC (permalink / raw)
  To: Štěpán Němec; +Cc: Ted Zlatanov, ding, emacs-w3m

Štěpán Němec wrote:
[...]
> Was this ever actually added to Emacs? I'm using latest Git Emacs and
> emacs-w3m, but right-clicking on URLs does nothing and my gnus-art.el
> does not seem to contain any of the code K.Y. proposed in one of the
> messages in this thread...?

In <b4mwrw149t1.fsf@jpl.org> I wrote:
> I don't know what items the menu should provide but I tried hacking
> it as attached below.  Currently the right-click pops up this menu:

> ,----
>| Open this link with
>| ===================
>| browse-url
>| emacs-w3m
> `----

I haven't implemented it yet because I didn't think it's very useful.
Are there other function items you want?



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [emacs-w3m:11246] Re: right clicking on URL in emacs-w3m vs. gnus
  2010-06-27 23:25             ` [emacs-w3m:11246] " Katsumi Yamaoka
@ 2010-06-28  7:58               ` Štěpán Němec
  2010-06-29  1:36                 ` [emacs-w3m:11248] " Katsumi Yamaoka
  0 siblings, 1 reply; 14+ messages in thread
From: Štěpán Němec @ 2010-06-28  7:58 UTC (permalink / raw)
  To: emacs-w3m; +Cc: Ted Zlatanov, ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> Štěpán Němec wrote:
> [...]
>> Was this ever actually added to Emacs? I'm using latest Git Emacs and
>> emacs-w3m, but right-clicking on URLs does nothing and my gnus-art.el
>> does not seem to contain any of the code K.Y. proposed in one of the
>> messages in this thread...?
>
> In <b4mwrw149t1.fsf@jpl.org> I wrote:
>> I don't know what items the menu should provide but I tried hacking
>> it as attached below.  Currently the right-click pops up this menu:
>
>> ,----
>>| Open this link with
>>| ===================
>>| browse-url
>>| emacs-w3m
>> `----
>
> I haven't implemented it yet because I didn't think it's very useful.

Interesting. I find it _very_ useful. Does that mean you have defined a
lot of custom commands for manipulating URLs in Gnus Article buffer? Or
do you never feel a need to e.g. quickly copy the link location?

> Are there other function items you want?

I don't see why we couldn't get the complete same right click menu as in
emacs-w3m. I'd especially like to have "Copy Link Location" (and I hope
it will also work in article headers -- I often find myself wanting to
copy the Gmane permalink, for example); jidanni mentioned in a recent
report the need for "Open in External Browser"; I can also see how "Save
Link as..." could be useful. In short, why not just provide the whole of
emacs-w3m right click menu?

Many thanks,

Štěpán



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [emacs-w3m:11248] Re: right clicking on URL in emacs-w3m vs. gnus
  2010-06-28  7:58               ` Štěpán Němec
@ 2010-06-29  1:36                 ` Katsumi Yamaoka
  2010-06-29  8:57                   ` [emacs-w3m:11249] " Štěpán Němec
  2010-07-28  8:33                   ` [emacs-w3m:11248] " Štěpán Němec
  0 siblings, 2 replies; 14+ messages in thread
From: Katsumi Yamaoka @ 2010-06-29  1:36 UTC (permalink / raw)
  To: Štěpán Němec; +Cc: emacs-w3m, Ted Zlatanov, ding

Štěpán Němec wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
[...]
>>> ,----
>>>| Open this link with
>>>| ===================
>>>| browse-url
>>>| emacs-w3m
>>> `----
>>
>> I haven't implemented it yet because I didn't think it's very useful.

> Interesting. I find it _very_ useful. Does that mean you have defined a
> lot of custom commands for manipulating URLs in Gnus Article buffer? Or
> do you never feel a need to e.g. quickly copy the link location?

It's enough to me to type `M-x bro RET' (`bro' is complemented
into `browse-url'), `M-x w3m RET', or just `RET' on a string that
looks like a url.  Those commands copy the link location and pass
it to the browser.

>> Are there other function items you want?

> I don't see why we couldn't get the complete same right click menu as in
> emacs-w3m. I'd especially like to have "Copy Link Location" (and I hope
> it will also work in article headers -- I often find myself wanting to
> copy the Gmane permalink, for example); jidanni mentioned in a recent
> report the need for "Open in External Browser"; I can also see how "Save
> Link as..." could be useful. In short, why not just provide the whole of
> emacs-w3m right click menu?

Note that what we're talking about is a text/plain article (or
other) that is not rendered by emacs-w3m, like this:

http://git.gnus.org/

Currently there is only a button that Gnus adds using widget.el
(iff `gnus-treat-buttonize' is the default value).  OTOH, an html
article rendered by emacs-w3m has the right click menu buttons on
links.

Not all users have and load emacs-w3m, so, maybe what we can do
will be to provide the right click menu like emacs-w3m only if
`mm-text-html-renderer' is `w3m', and the menu title should be
"emacs-w3m".  Even in that case, we will have to make Lisp
functions for the menu items one by one.  Because the article is
not rendered by emacs-w3m.

Regards,



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [emacs-w3m:11249] Re: right clicking on URL in emacs-w3m vs. gnus
  2010-06-29  1:36                 ` [emacs-w3m:11248] " Katsumi Yamaoka
@ 2010-06-29  8:57                   ` Štěpán Němec
  2010-06-30  0:28                     ` [emacs-w3m:11250] " jidanni
  2010-07-28  8:33                   ` [emacs-w3m:11248] " Štěpán Němec
  1 sibling, 1 reply; 14+ messages in thread
From: Štěpán Němec @ 2010-06-29  8:57 UTC (permalink / raw)
  To: emacs-w3m; +Cc: Ted Zlatanov, ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> Štěpán Němec wrote:
>> Katsumi Yamaoka <yamaoka@jpl.org> writes:
> [...]
>>>> ,----
>>>>| Open this link with
>>>>| ===================
>>>>| browse-url
>>>>| emacs-w3m
>>>> `----
>>>
>>> I haven't implemented it yet because I didn't think it's very useful.
>
>> Interesting. I find it _very_ useful. Does that mean you have defined a
>> lot of custom commands for manipulating URLs in Gnus Article buffer? Or
>> do you never feel a need to e.g. quickly copy the link location?
>
> It's enough to me to type `M-x bro RET' (`bro' is complemented
> into `browse-url'), `M-x w3m RET', or just `RET' on a string that
> looks like a url.  Those commands copy the link location and pass
> it to the browser.

OK. (BTW, I often want to *only* copy the URL, not open it.)

>>> Are there other function items you want?
>
>> I don't see why we couldn't get the complete same right click menu as in
>> emacs-w3m. I'd especially like to have "Copy Link Location" (and I hope
>> it will also work in article headers -- I often find myself wanting to
>> copy the Gmane permalink, for example); jidanni mentioned in a recent
>> report the need for "Open in External Browser"; I can also see how "Save
>> Link as..." could be useful. In short, why not just provide the whole of
>> emacs-w3m right click menu?
>
> Note that what we're talking about is a text/plain article (or
> other) that is not rendered by emacs-w3m, like this:
>
> http://git.gnus.org/
>
> Currently there is only a button that Gnus adds using widget.el
> (iff `gnus-treat-buttonize' is the default value).  OTOH, an html
> article rendered by emacs-w3m has the right click menu buttons on
> links.

Yes, I know; but it's frustrating (for an emacs-w3m user at least) to
have a URL button, but not be able to do anything with it apart from
middle-clicking.

> Not all users have and load emacs-w3m, so, maybe what we can do
> will be to provide the right click menu like emacs-w3m only if
> `mm-text-html-renderer' is `w3m', and the menu title should be
> "emacs-w3m".

Sounds reasonable to me.

> Even in that case, we will have to make Lisp functions for the menu
> items one by one. Because the article is not rendered by emacs-w3m.

That seems unfortunate; I'm not acquainted with emacs-w3m or gnus
internals well enough to see any more convenient solution (to avoid some
code duplication perhaps) -- if you don't see one, it might very well be
the case there is none...

Thank you very much for your feedback,

Štěpán




^ permalink raw reply	[flat|nested] 14+ messages in thread

* [emacs-w3m:11250] Re: right clicking on URL in emacs-w3m vs. gnus
  2010-06-29  8:57                   ` [emacs-w3m:11249] " Štěpán Němec
@ 2010-06-30  0:28                     ` jidanni
  0 siblings, 0 replies; 14+ messages in thread
From: jidanni @ 2010-06-30  0:28 UTC (permalink / raw)
  To: emacs-w3m, ding

I put the cursor on
> http://git.gnus.org/
and did
> It's enough to me to type `M-x bro RET'
and I had to complete from
http://git.
OK, never mind.
> Even in that case, we will have to make Lisp functions for the menu
> items one by one. Because the article is not rendered by emacs-w3m.
OK then please do...



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [emacs-w3m:11248] Re: right clicking on URL in emacs-w3m vs. gnus
  2010-06-29  1:36                 ` [emacs-w3m:11248] " Katsumi Yamaoka
  2010-06-29  8:57                   ` [emacs-w3m:11249] " Štěpán Němec
@ 2010-07-28  8:33                   ` Štěpán Němec
  2010-08-05 14:47                     ` Ted Zlatanov
  1 sibling, 1 reply; 14+ messages in thread
From: Štěpán Němec @ 2010-07-28  8:33 UTC (permalink / raw)
  To: emacs-w3m; +Cc: Ted Zlatanov, ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> Not all users have and load emacs-w3m, so, maybe what we can do
> will be to provide the right click menu like emacs-w3m only if
> `mm-text-html-renderer' is `w3m', and the menu title should be
> "emacs-w3m".  Even in that case, we will have to make Lisp
> functions for the menu items one by one.  Because the article is
> not rendered by emacs-w3m.

Any progress on this? :-)

Štěpán



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [emacs-w3m:11248] Re: right clicking on URL in emacs-w3m vs. gnus
  2010-07-28  8:33                   ` [emacs-w3m:11248] " Štěpán Němec
@ 2010-08-05 14:47                     ` Ted Zlatanov
  0 siblings, 0 replies; 14+ messages in thread
From: Ted Zlatanov @ 2010-08-05 14:47 UTC (permalink / raw)
  To: ding; +Cc: emacs-w3m

On Wed, 28 Jul 2010 10:33:07 +0200 Štěpán Němec <stepnem@gmail.com> wrote: 

ŠN> Katsumi Yamaoka <yamaoka@jpl.org> writes:
>> Not all users have and load emacs-w3m, so, maybe what we can do
>> will be to provide the right click menu like emacs-w3m only if
>> `mm-text-html-renderer' is `w3m', and the menu title should be
>> "emacs-w3m".  Even in that case, we will have to make Lisp
>> functions for the menu items one by one.  Because the article is
>> not rendered by emacs-w3m.

ŠN> Any progress on this? :-)

It seems like a lot of work to emulate emacs-w3m.  I'll go with whatever
Yamaoka-san thinks is appropriate since he knows that area of Gnus well.

Ted




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-08-05 14:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-17 22:41 [emacs-w3m:11211] right clicking on URL in emacs-w3m vs. gnus jidanni
2010-04-20 17:20 ` Ted Zlatanov
2010-04-21  6:08   ` [emacs-w3m:11213] " Katsumi Yamaoka
2010-04-21 14:23     ` Ted Zlatanov
2010-04-22  1:48       ` [emacs-w3m:11216] " Katsumi Yamaoka
2010-04-23  0:01         ` Ted Zlatanov
2010-06-25 13:24           ` Štěpán Němec
2010-06-27 23:25             ` [emacs-w3m:11246] " Katsumi Yamaoka
2010-06-28  7:58               ` Štěpán Němec
2010-06-29  1:36                 ` [emacs-w3m:11248] " Katsumi Yamaoka
2010-06-29  8:57                   ` [emacs-w3m:11249] " Štěpán Němec
2010-06-30  0:28                     ` [emacs-w3m:11250] " jidanni
2010-07-28  8:33                   ` [emacs-w3m:11248] " Štěpán Němec
2010-08-05 14:47                     ` Ted Zlatanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).