Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* html rendering in gnus
@ 2004-11-29  8:35 Jay Bromley
       [not found] ` <v9zn11rnd1.fsf@marauder.physik.uni-ulm.de>
  0 siblings, 1 reply; 9+ messages in thread
From: Jay Bromley @ 2004-11-29  8:35 UTC (permalink / raw)


Hello,

I've recently started using gnus for news and mail and have a couple of
questions about HTML rendering in mails and links.

First, I'd like to use elinks to do my HTML mail rendering. Right now I set
mm-text-html-renderer to lynx and have lynx symlinked to elinks. This is a
kludge though, as the lynx -> elinks thing is bogus and I had to edit
mm-view.el to eliminate a flag that elinks doesn't understand. I noticed there
is an option to use a user-defined function and I'd like to write a function
to use elinks with the appropriate flags, but I've no idea what this function
should look like. I (think I) have a sufficient grasp on Elisp, but I don't
know anything about what the function takes and what it should evaluate to. I
read the Gnus manual, but seemed to miss any info there might be about this.
Pointers to docs or template functions would be very much appreciated.

For the second question, my currently kludged system renders HTML fine, but I
can't click on links in mail messages and have it bring up the page in my real
browser. I'm not quite sure why, as this works great with links in news
articles. I'm a bit confused on this, as I thought gnus would treat mails and
news articles the same. Is there some other variable or hook I need to set to
get this behavior?

Thanks for any help in advance, regards.
------------------------------------------------------------------------
J. Bromley                                       jbromley@bluebottle.com


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

* Re: html rendering in gnus
       [not found] ` <v9zn11rnd1.fsf@marauder.physik.uni-ulm.de>
@ 2004-11-29 19:41   ` Jay Bromley
  0 siblings, 0 replies; 9+ messages in thread
From: Jay Bromley @ 2004-11-29 19:41 UTC (permalink / raw)


Reiner Steib <reinersteib+from-uce@imap.cc> writes:

>
> Have a look at `mm-text-html-renderer-alist' and friends.  I'd guess
> you want something along this line:
>
> (require 'mm-view)
> (add-to-list 'mm-text-html-renderer-alist
> 	     '(elinks mm-inline-render-with-stdin nil
> 		      "elinks" "-flag1" "-flag2"))
> (setq mm-text-html-renderer 'elinks)

Thank you, adding elinks to mm-text-html-renderer-alist occurred to me after
looking at mm-view.el, but I forgot the (require 'mm-view), so it didn't
work. This is exactly what I needed.

Regards.
------------------------------------------------------------------------
J. Bromley                                       jbromley@bluebottle.com


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

* Re: HTML rendering in gnus
  2006-07-23 15:44         ` Holger Sparr
@ 2006-07-23 15:47           ` Hadron Quark
  0 siblings, 0 replies; 9+ messages in thread
From: Hadron Quark @ 2006-07-23 15:47 UTC (permalink / raw)


Holger Sparr <sparr+usenet@mfk.mw.tu-dresden.de> writes:

> On Sun, 23 Jul 2006, Hadron Quark wrote:
>
>> Holger Sparr <sparr+usenet@mfk.mw.tu-dresden.de> writes:
>> 
>>> On Sun, 23 Jul 2006, Hadron Quark wrote:
>>>
>>>> Hadron Quark <hadronquark@gmail.com> writes:
>>>> 
>>>
>>> [...]
>>>
>>>>>
>>>>> Its ok, I did this in .gnus.el and it seems to work fine
>>>>>
>>>>> (define-key gnus-article-mode-map (kbd "<f1>")
>>>>> 	'w3m-view-url-with-external-browser)
>>>>>
>>>>> Any comments on whether this is better achived appreciated.
>>>>>
>>>> 
>>>> Ok, this works - but what w3m function to open this link in the emacs
>>>> buffer? Cant seem to get any of the mentioned ones to
>>>> work. Interestingly the link isnt shown in the w3m buffer as underlined
>>>> : but w3m-view-url-with-external-browser does indeed "pick up" the html
>>>> link and opens it successfully in another browser. What do I need for
>>>> w3m to do this in the article buffer?
>>>> 
>>>
>>> Simply w3m.
>> 
>> That opens the welcome to w3m info page. Im sorry, but I'm confused
>> now. I guess  its following w3m-home-page and not the underlying link.
>> 
>
>
> When using w3m you need put this in .gnus.el (what I assumed, you did):
>      
>      (setq mm-text-html-renderer 'w3m)
>
> Then in a text/html-part a simple RET (bound to 'w3m-safe-view-this-url)
> would do.
>
> In a text/plain-part M-x w3m RET would check the string under point as a
> possible url to visit.
>
>
> At least this is the way it works here.
>

Thanks for your help : it works here (slowly) now too. I had this in my
.gnus.el:

(require 'w3m-load)
(setq mm-text-html-renderer 'w3m)
;;(setq mm-inline-text-html-with-w3m-keymap nil)

with the last line not commented out : no idea why it was there -
probably just copied the lines from someone else ages ago.

Thanks again.

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

* Re: HTML rendering in gnus
  2006-07-23 15:15       ` Hadron Quark
@ 2006-07-23 15:44         ` Holger Sparr
  2006-07-23 15:47           ` Hadron Quark
  0 siblings, 1 reply; 9+ messages in thread
From: Holger Sparr @ 2006-07-23 15:44 UTC (permalink / raw)


On Sun, 23 Jul 2006, Hadron Quark wrote:

> Holger Sparr <sparr+usenet@mfk.mw.tu-dresden.de> writes:
> 
>> On Sun, 23 Jul 2006, Hadron Quark wrote:
>>
>>> Hadron Quark <hadronquark@gmail.com> writes:
>>> 
>>
>> [...]
>>
>>>>
>>>> Its ok, I did this in .gnus.el and it seems to work fine
>>>>
>>>> (define-key gnus-article-mode-map (kbd "<f1>")
>>>> 	'w3m-view-url-with-external-browser)
>>>>
>>>> Any comments on whether this is better achived appreciated.
>>>>
>>> 
>>> Ok, this works - but what w3m function to open this link in the emacs
>>> buffer? Cant seem to get any of the mentioned ones to
>>> work. Interestingly the link isnt shown in the w3m buffer as underlined
>>> : but w3m-view-url-with-external-browser does indeed "pick up" the html
>>> link and opens it successfully in another browser. What do I need for
>>> w3m to do this in the article buffer?
>>> 
>>
>> Simply w3m.
> 
> That opens the welcome to w3m info page. Im sorry, but I'm confused
> now. I guess  its following w3m-home-page and not the underlying link.
> 


When using w3m you need put this in .gnus.el (what I assumed, you did):
     
     (setq mm-text-html-renderer 'w3m)

Then in a text/html-part a simple RET (bound to 'w3m-safe-view-this-url)
would do.

In a text/plain-part M-x w3m RET would check the string under point as a
possible url to visit.


At least this is the way it works here.

Holger


-- 

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

* Re: HTML rendering in gnus
  2006-07-23 14:57     ` Holger Sparr
@ 2006-07-23 15:15       ` Hadron Quark
  2006-07-23 15:44         ` Holger Sparr
  0 siblings, 1 reply; 9+ messages in thread
From: Hadron Quark @ 2006-07-23 15:15 UTC (permalink / raw)


Holger Sparr <sparr+usenet@mfk.mw.tu-dresden.de> writes:

> On Sun, 23 Jul 2006, Hadron Quark wrote:
>
>> Hadron Quark <hadronquark@gmail.com> writes:
>> 
>
> [...]
>
>>>
>>> Its ok, I did this in .gnus.el and it seems to work fine
>>>
>>> (define-key gnus-article-mode-map (kbd "<f1>")
>>> 	'w3m-view-url-with-external-browser)
>>>
>>> Any comments on whether this is better achived appreciated.
>>>
>> 
>> Ok, this works - but what w3m function to open this link in the emacs
>> buffer? Cant seem to get any of the mentioned ones to
>> work. Interestingly the link isnt shown in the w3m buffer as underlined
>> : but w3m-view-url-with-external-browser does indeed "pick up" the html
>> link and opens it successfully in another browser. What do I need for
>> w3m to do this in the article buffer?
>> 
>
> Simply w3m.

That opens the welcome to w3m info page. Im sorry, but I'm confused
now. I guess  its following w3m-home-page and not the underlying link.


>
>
> ,----[ C-h f w3m RET ]
> | w3m is an interactive compiled Lisp function in `w3m'.
> | It is bound to <f4>.
> | (w3m &optional url new-session interactive-p)
> | 
> | Visit World Wide Web pages using the external w3m command.
> | 
> | When you invoke this command interactively for the first time, it will
> | visit a page which is pointed to by a string like url around the
> | cursor position or the home page specified by the `w3m-home-page'
> | variable, but you will be prompted for a url if `w3m-quick-start' is
> | nil (default t) or `w3m-home-page' is nil.
> | 
> | The variables `w3m-pop-up-windows' and `w3m-pop-up-frames' control
> | whether this command should pop to a window or a frame up for the
> | session.
> | 
> | When emacs-w3m sessions have already been opened, this command will
> | pop to the existing window or frame up, but if `w3m-quick-start' is
> | nil, (default t), you will be prompted for a url (which defaults to
> | `popup' meaning to pop to an existing emacs-w3m buffer up).
> | 
>
> [...]
>
> | 
> | [back]
> `----
>
>
>
> -- 

-- 

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

* Re: HTML rendering in gnus
  2006-07-23 14:21   ` Hadron Quark
@ 2006-07-23 14:57     ` Holger Sparr
  2006-07-23 15:15       ` Hadron Quark
  0 siblings, 1 reply; 9+ messages in thread
From: Holger Sparr @ 2006-07-23 14:57 UTC (permalink / raw)


On Sun, 23 Jul 2006, Hadron Quark wrote:

> Hadron Quark <hadronquark@gmail.com> writes:
> 

[...]

>>
>> Its ok, I did this in .gnus.el and it seems to work fine
>>
>> (define-key gnus-article-mode-map (kbd "<f1>")
>> 	'w3m-view-url-with-external-browser)
>>
>> Any comments on whether this is better achived appreciated.
>>
> 
> Ok, this works - but what w3m function to open this link in the emacs
> buffer? Cant seem to get any of the mentioned ones to
> work. Interestingly the link isnt shown in the w3m buffer as underlined
> : but w3m-view-url-with-external-browser does indeed "pick up" the html
> link and opens it successfully in another browser. What do I need for
> w3m to do this in the article buffer?
> 

Simply w3m.


,----[ C-h f w3m RET ]
| w3m is an interactive compiled Lisp function in `w3m'.
| It is bound to <f4>.
| (w3m &optional url new-session interactive-p)
| 
| Visit World Wide Web pages using the external w3m command.
| 
| When you invoke this command interactively for the first time, it will
| visit a page which is pointed to by a string like url around the
| cursor position or the home page specified by the `w3m-home-page'
| variable, but you will be prompted for a url if `w3m-quick-start' is
| nil (default t) or `w3m-home-page' is nil.
| 
| The variables `w3m-pop-up-windows' and `w3m-pop-up-frames' control
| whether this command should pop to a window or a frame up for the
| session.
| 
| When emacs-w3m sessions have already been opened, this command will
| pop to the existing window or frame up, but if `w3m-quick-start' is
| nil, (default t), you will be prompted for a url (which defaults to
| `popup' meaning to pop to an existing emacs-w3m buffer up).
| 

[...]

| 
| [back]
`----



-- 

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

* Re: HTML rendering in gnus
  2006-07-23 14:05 ` Hadron Quark
@ 2006-07-23 14:21   ` Hadron Quark
  2006-07-23 14:57     ` Holger Sparr
  0 siblings, 1 reply; 9+ messages in thread
From: Hadron Quark @ 2006-07-23 14:21 UTC (permalink / raw)


Hadron Quark <hadronquark@gmail.com> writes:

> Hadron Quark <hadronquark@gmail.com> writes:
>
>> Somthing is installed which gives a text rendering of html emails : but
>> links do not work. In normal emails any http link can be opened in a
>> seperate browser by tabbing to it and hitting enter (browse-url) which
>> in turns opens a firefox tab.
>>
>> How do I find out (a) whats rendering my html emails and (b) get it to
>> open links in either a new buffer or an external browser.
>> -- 
>
> Its ok, I did this in .gnus.el and it seems to work fine
>
> (define-key gnus-article-mode-map (kbd "<f1>") 'w3m-view-url-with-external-browser)
>
> Any comments on whether this is better achived appreciated.
>

Ok, this works - but what w3m function to open this link in the emacs
buffer? Cant seem to get any of the mentioned ones to
work. Interestingly the link isnt shown in the w3m buffer as underlined
: but w3m-view-url-with-external-browser does indeed "pick up" the html
link and opens it successfully in another browser. What do I need for
w3m to do this in the article buffer?


-- 

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

* Re: HTML rendering in gnus
  2006-07-23 13:48 HTML " Hadron Quark
@ 2006-07-23 14:05 ` Hadron Quark
  2006-07-23 14:21   ` Hadron Quark
  0 siblings, 1 reply; 9+ messages in thread
From: Hadron Quark @ 2006-07-23 14:05 UTC (permalink / raw)


Hadron Quark <hadronquark@gmail.com> writes:

> Somthing is installed which gives a text rendering of html emails : but
> links do not work. In normal emails any http link can be opened in a
> seperate browser by tabbing to it and hitting enter (browse-url) which
> in turns opens a firefox tab.
>
> How do I find out (a) whats rendering my html emails and (b) get it to
> open links in either a new buffer or an external browser.
> -- 

Its ok, I did this in .gnus.el and it seems to work fine

(define-key gnus-article-mode-map (kbd "<f1>") 'w3m-view-url-with-external-browser)

Any comments on whether this is better achived appreciated.

-- 

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

* HTML rendering in gnus
@ 2006-07-23 13:48 Hadron Quark
  2006-07-23 14:05 ` Hadron Quark
  0 siblings, 1 reply; 9+ messages in thread
From: Hadron Quark @ 2006-07-23 13:48 UTC (permalink / raw)



Somthing is installed which gives a text rendering of html emails : but
links do not work. In normal emails any http link can be opened in a
seperate browser by tabbing to it and hitting enter (browse-url) which
in turns opens a firefox tab.

How do I find out (a) whats rendering my html emails and (b) get it to
open links in either a new buffer or an external browser.
-- 

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

end of thread, other threads:[~2006-07-23 15:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29  8:35 html rendering in gnus Jay Bromley
     [not found] ` <v9zn11rnd1.fsf@marauder.physik.uni-ulm.de>
2004-11-29 19:41   ` Jay Bromley
2006-07-23 13:48 HTML " Hadron Quark
2006-07-23 14:05 ` Hadron Quark
2006-07-23 14:21   ` Hadron Quark
2006-07-23 14:57     ` Holger Sparr
2006-07-23 15:15       ` Hadron Quark
2006-07-23 15:44         ` Holger Sparr
2006-07-23 15:47           ` Hadron Quark

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).