<<< Date Index >>>     <<< Thread Index >>>

Re: w3m and following links



On 2005-07-29, Trey Sizemore <trey@xxxxxxxxxxx> wrote:
> I have it set up so that w3m is invoked for rendering HTML mails in
> mutt.  However, it doesn't appear that I'm able to follow links.  In
> googling, it appears that one should be able to use the : key for
> highlighting all links in mails rendered by w3m, but this key gives the
> expected prompt as if waiting for me to enter a command (I'm using vim
> as my editor).
> 
> What is the correct way to highlight and follow links in HTML mails
> using w3m in vim?

I assume you mean "in mutt".  W3m is not commonly used from within 
vim.

For you to be able to use w3m to follow links, you have to be using 
w3m directly to view the message.  There are basically three ways to 
do this.

1.  Use w3m in place of urlview in the mutt macro usually invoked by 
    typing Ctrl-B.  Typing : will highlight the links in the 
    message.  See the mutt manual, section 4.13, "Start a WWW 
    Browser on URLs (EXTERNAL)", and this URL:

        http://www.spocom.com/users/gjohnson/mutt/#w3m

2.  Use w3m in place of mutt's built-in pager to view plain text 
    messages containing URLs.  Again, typing : will highlight the 
    links in the message.  See the mutt manual, sections 6.3.122,
    "pager", and 3.19, "Change settings before formatting a 
    message", as well as the above-mentioned URL.

3.  Use w3m to view HTML messages from the attachment menu.  In this 
    case, w3m will behave like a browser and will render links as 
    links.  See the mutt manual, sections 5.1.2, "The Attachment 
    Menu", and 5.3, "MIME Viewer configuration with mailcap", and 
    this URL:

        http://www.spocom.com/users/gjohnson/mutt/#html

The way you are using w3m now is as a filter ahead of mutt's 
built-in pager to convert HTML messages to plain text.  This is fine 
for reading HTML messages, but it doesn't allow you to jump to any 
URLs in the message since you are interfacing with mutt's built-in 
pager, not with w3m, and since mutt's built-in pager doesn't do 
anything special with URLs.

HTH,
Gary

-- 
Gary Johnson                               | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx                   | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA