render *html - via lynx ?
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
render *html - via lynx ?         


Date: Sep 3, 2008 07:23

When I've got a dir-listing showing in an emacs window,
I can 'mid-mouse-it' to open the text.
[how] Can I open it in a window depending on its type ?
Eg. for a *.html, can I indirectly use lynx, which via:
'lynx -dump ' will render it ?

TIA.
4 Comments
Re: render *html - via lynx ?         


Author: Tim X
Date: Sep 4, 2008 02:08

problems@gmail writes:
> When I've got a dir-listing showing in an emacs window,
> I can 'mid-mouse-it' to open the text.
> [how] Can I open it in a window depending on its type ?
> Eg. for a *.html, can I indirectly use lynx, which via:
> 'lynx -dump ' will render it ?
>
> TIA.
>

Yep, you sure can. I've done this using defadvice. I just put a
defadvice around view-file which checks to see if the file name ends
with htm/html and if so, view it with w3m, otherwise, it just opens it
normally. Then, in dired, if I hit 'v' to view the file and its an html
file, its rendered, otherwise it is displayed as normal.
Show full article (1.84Kb)
no comments
RE: render *html - via lynx ?         


Author: Drew Adams
Date: Sep 4, 2008 08:02

> When I've got a dir-listing showing in an emacs window,
> I can 'mid-mouse-it' to open the text.
> [how] Can I open it in a window depending on its type ?
> Eg. for a *.html, can I indirectly use lynx, which via:
> 'lynx -dump ' will render it ?

I don't have a general answer for you, but on Windows, yes, you can, using
w32-browser.el:

http://www.emacswiki.org/cgi-bin/wiki/MsShellExecute#w32-browser

http://www.emacswiki.org/cgi-bin/wiki/DiredPlus#w32-browser
no comments
Re: render *html - via lynx ?         


Author: David Hansen
Date: Sep 4, 2008 08:46

On Wed, 03 Sep 2008 09:23:35 -0500 Unknown wrote:
> When I've got a dir-listing showing in an emacs window,
> I can 'mid-mouse-it' to open the text.
> [how] Can I open it in a window depending on its type ?
> Eg. for a *.html, can I indirectly use lynx, which via:
> 'lynx -dump ' will render it ?

dired-x.el (part of GNU Emacs) has a feature to "guess" the right shell
command, maybe that helps. From my ~/.emacs

(eval-after-load 'dired
'(progn
(require 'dired-x)
(setq dired-guess-shell-alist-user '(("\\.avi" "mplayer ? &")
("\\.mpg" "mplayer ? &")
("\\.wmv" "mplayer ? &")))))

But for simple .html i'd suggest emacs-w3m, a very nice browser.

David
no comments
Re: render *html - via lynx ?         


Author: Thierry Volpiatto
Date: Sep 4, 2008 09:12

"Drew Adams" oracle.com> writes:
>> When I've got a dir-listing showing in an emacs window,
>> I can 'mid-mouse-it' to open the text.
>> [how] Can I open it in a window depending on its type ?
>> Eg. for a *.html, can I indirectly use lynx, which via:
>> 'lynx -dump ' will render it ?
>
> I don't have a general answer for you, but on Windows, yes, you can, using
> w32-browser.el:
>
> http://www.emacswiki.org/cgi-bin/wiki/MsShellExecute#w32-browser
>
> http://www.emacswiki.org/cgi-bin/wiki/DiredPlus#w32-browser

I use extview.el
http://www.emacswiki.org/cgi-bin/emacs/extview.el
I also use this simple code to open an html file in dired with w3m:
Show full article (1.10Kb)
no comments