all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* w3m - external browse
@ 2007-01-13 20:38 Hadron Quark
  2007-01-13 21:29 ` David Hansen
       [not found] ` <mailman.3040.1168724330.2155.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Hadron Quark @ 2007-01-13 20:38 UTC (permalink / raw)



I have ma default "return" browsing inside a w3m buffer. In addition I
have this:

 (global-set-key (quote [f4]) 'browse-url-firefox)


In order to browse links in an external firefox.

The problem is that when using this inside a w3m page, the code picks up
the hyperlink description text instead of the hidden link itself.

e.g I hit f4 over a hotlink saying "Visit my Page" and I get a url of

http://Visit My Page

Any suggestions on how to get the underlying hyperlink?


-- 

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

* Re: w3m - external browse
  2007-01-13 20:38 w3m - external browse Hadron Quark
@ 2007-01-13 21:29 ` David Hansen
       [not found] ` <mailman.3040.1168724330.2155.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: David Hansen @ 2007-01-13 21:29 UTC (permalink / raw)


On Sun, 14 Jan 2007 09:38:22 +1300 Hadron Quark wrote:

> I have ma default "return" browsing inside a w3m buffer. In addition I
> have this:
>
>  (global-set-key (quote [f4]) 'browse-url-firefox)
>
>
> In order to browse links in an external firefox.
>
> The problem is that when using this inside a w3m page, the code picks up
> the hyperlink description text instead of the hidden link itself.
>
> e.g I hit f4 over a hotlink saying "Visit my Page" and I get a url of
>
> http://Visit My Page
>
> Any suggestions on how to get the underlying hyperlink?


,----
| M runs the command w3m-view-url-with-external-browser
|   which is an interactive compiled Lisp function in `w3m.el'.
| It is bound to M.
| (w3m-view-url-with-external-browser &optional URL)
| 
| Launch the external browser and display the same web page.
| If the cursor points to a link, it visits the url of the link instead
| of the url currently displayed.  The browser is defined in
| `w3m-content-type-alist' for every type of a url.
`----

David

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

* Re: w3m - external browse
       [not found] ` <mailman.3040.1168724330.2155.help-gnu-emacs@gnu.org>
@ 2007-01-14  4:38   ` Hadron Quark
  2007-01-14  4:44   ` Hadron Quark
  1 sibling, 0 replies; 6+ messages in thread
From: Hadron Quark @ 2007-01-14  4:38 UTC (permalink / raw)


David Hansen <david.hansen@gmx.net> writes:

> On Sun, 14 Jan 2007 09:38:22 +1300 Hadron Quark wrote:
>
>> I have ma default "return" browsing inside a w3m buffer. In addition I
>> have this:
>>
>>  (global-set-key (quote [f4]) 'browse-url-firefox)
>>
>>
>> In order to browse links in an external firefox.
>>
>> The problem is that when using this inside a w3m page, the code picks up
>> the hyperlink description text instead of the hidden link itself.
>>
>> e.g I hit f4 over a hotlink saying "Visit my Page" and I get a url of
>>
>> http://Visit My Page
>>
>> Any suggestions on how to get the underlying hyperlink?
>
>
> ,----
> | M runs the command w3m-view-url-with-external-browser
> |   which is an interactive compiled Lisp function in `w3m.el'.
> | It is bound to M.
> | (w3m-view-url-with-external-browser &optional URL)
> | 
> | Launch the external browser and display the same web page.
> | If the cursor points to a link, it visits the url of the link instead
> | of the url currently displayed.  The browser is defined in
> | `w3m-content-type-alist' for every type of a url.
> `----

I do not believe I missed that. Thank you David.

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

* Re: w3m - external browse
       [not found] ` <mailman.3040.1168724330.2155.help-gnu-emacs@gnu.org>
  2007-01-14  4:38   ` Hadron Quark
@ 2007-01-14  4:44   ` Hadron Quark
  2007-01-15  5:35     ` Kevin Rodgers
       [not found]     ` <mailman.3087.1168880193.2155.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 6+ messages in thread
From: Hadron Quark @ 2007-01-14  4:44 UTC (permalink / raw)


David Hansen <david.hansen@gmx.net> writes:

> On Sun, 14 Jan 2007 09:38:22 +1300 Hadron Quark wrote:
>
>> I have ma default "return" browsing inside a w3m buffer. In addition I
>> have this:
>>
>>  (global-set-key (quote [f4]) 'browse-url-firefox)
>>
>>
>> In order to browse links in an external firefox.
>>
>> The problem is that when using this inside a w3m page, the code picks up
>> the hyperlink description text instead of the hidden link itself.
>>
>> e.g I hit f4 over a hotlink saying "Visit my Page" and I get a url of
>>
>> http://Visit My Page
>>
>> Any suggestions on how to get the underlying hyperlink?
>
>
> ,----
> | M runs the command w3m-view-url-with-external-browser
> |   which is an interactive compiled Lisp function in `w3m.el'.
> | It is bound to M.
> | (w3m-view-url-with-external-browser &optional URL)
> | 
> | Launch the external browser and display the same web page.
> | If the cursor points to a link, it visits the url of the link instead
> | of the url currently displayed.  The browser is defined in
> | `w3m-content-type-alist' for every type of a url.
> `----
>
> David
>
>
>

I dont suppose some clever sod could provide the lisp I use on F4 to
call the w3m function if its a w3m buffer or browse-url-firefox if not?

 (global-set-key (quote [f4]) 'browse-url-firefox)

need to call 

w3m-view-url-with-external-browser

if its a w3m buffer.

Or would I be better off mapping f4 seperately to a w3m keyboard map? I
dont want that as it would duplicate the existin "M" command.

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

* Re: w3m - external browse
  2007-01-14  4:44   ` Hadron Quark
@ 2007-01-15  5:35     ` Kevin Rodgers
       [not found]     ` <mailman.3087.1168880193.2155.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2007-01-15  5:35 UTC (permalink / raw)


Hadron Quark wrote:
> I dont suppose some clever sod could provide the lisp I use on F4 to
> call the w3m function if its a w3m buffer or browse-url-firefox if not?
> 
>  (global-set-key (quote [f4]) 'browse-url-firefox)
> 
> need to call 
> 
> w3m-view-url-with-external-browser
> 
> if its a w3m buffer.
> 
> Or would I be better off mapping f4 seperately to a w3m keyboard map? I
> dont want that as it would duplicate the existin "M" command.

Keep the global binding, and override it with a local binding in w3m
buffers:

(add-hook 'w3m-mode-hook
	  (lambda ()
	    (local-set-key [f4] 'w3m-view-url-with-external-browser)))

-- 
Kevin Rodgers
Denver, Colorado, USA

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

* Re: w3m - external browse
       [not found]     ` <mailman.3087.1168880193.2155.help-gnu-emacs@gnu.org>
@ 2007-01-23  8:50       ` Hadron
  0 siblings, 0 replies; 6+ messages in thread
From: Hadron @ 2007-01-23  8:50 UTC (permalink / raw)


Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:

> Hadron Quark wrote:
>> I dont suppose some clever sod could provide the lisp I use on F4 to
>> call the w3m function if its a w3m buffer or browse-url-firefox if not?
>>
>>  (global-set-key (quote [f4]) 'browse-url-firefox)
>>
>> need to call 
>>
>> w3m-view-url-with-external-browser
>>
>> if its a w3m buffer.
>>
>> Or would I be better off mapping f4 seperately to a w3m keyboard map? I
>> dont want that as it would duplicate the existin "M" command.
>
> Keep the global binding, and override it with a local binding in w3m
> buffers:
>
> (add-hook 'w3m-mode-hook
> 	  (lambda ()
> 	    (local-set-key [f4] 'w3m-view-url-with-external-browser)))

Sorry for the late appreciation, but thanks for this perfect solution!


-- 

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

end of thread, other threads:[~2007-01-23  8:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-13 20:38 w3m - external browse Hadron Quark
2007-01-13 21:29 ` David Hansen
     [not found] ` <mailman.3040.1168724330.2155.help-gnu-emacs@gnu.org>
2007-01-14  4:38   ` Hadron Quark
2007-01-14  4:44   ` Hadron Quark
2007-01-15  5:35     ` Kevin Rodgers
     [not found]     ` <mailman.3087.1168880193.2155.help-gnu-emacs@gnu.org>
2007-01-23  8:50       ` Hadron

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.