From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: "Forrest Y. Yu" <forrest.yu@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to preview HTML inside emacs?
Date: Thu, 10 Jan 2008 21:17:21 +0100 [thread overview]
Message-ID: <87bq7t306m.fsf@dell.linuxdev.us.dell.com> (raw)
In-Reply-To: <e4d2b03e0801100849t79f67d25yce130825f392bf39@mail.gmail.com> (Forrest Y. Yu's message of "Fri, 11 Jan 2008 00:49:37 +0800")
"Forrest Y. Yu" <forrest.yu@gmail.com> writes:
> On Jan 10, 2008 4:10 PM, Thierry Volpiatto <thierry.volpiatto@gmail.com>
> wrote:
>>
>> "Forrest Y. Yu" <forrest.yu@gmail.com> writes:
>>
>> > hi Everyone,
>> >
>> > I'm using emacs to edit HTML files, can I preview them inside the emacs
>> > without opening any external browser?
>> >
>> > `C-c C-v' is not good for me, 'coz it brings a firefox window in X and
>> > doesn't work in console.
>>
>> I use that and it's work fine:
>
> I'm sorry but, how can I make use of it?
> I added these two lines into my ~/.emacs:
> (require 'extview)
> (push '("\\.html$" . "w3m %s") extview-application-associations)
>
> then I press `C-c C-v' when editing a html file, it still brings a firefox
> window!
Sorry i understand preview as seeing the sourcecode of the file.
May be better using another command as:
w3m-find-file your_html_file ==> bind it to some keys
Extview use ~/.mailcap to manage your file extensions, so if you modify
your ~/.mailcap, all the .html will be open in w3m.
It's may be not what you want.
Extview , when you press enter while in dired, ask you if you want to
open the file in an external viewer or not.
Here is how to configure extview:(my config)
(add-to-list 'load-path "~/elisp/extview")
(load "extview.elc")
(push '("\\.py$" . nil) extview-application-associations)
(push '("\\.sh$" . nil) extview-application-associations)
(push '("\\.py~$" . nil) extview-application-associations)
(push '("\\.sh~$" . nil) extview-application-associations)
(push '("\\.html$" . ask) extview-application-associations)
(push '("\\.jpeg$" . nil) extview-application-associations)
(push '("\\.jpg$" . nil) extview-application-associations)
(push '("\\.png$" . nil) extview-application-associations)
(push '("\\.gif$" . nil) extview-application-associations)
(push '("\\.tiff$" . nil) extview-application-associations)
(push '("\\.ogg$" . nil) extview-application-associations)
(push '("\\.mp3$" . nil) extview-application-associations)
(push '("\\.wav$" . nil) extview-application-associations)
(push '("\\.m3u$" . nil) extview-application-associations)
(push '("\\.tcl$" . nil) extview-application-associations)
(push '("\\.pls$" . nil) extview-application-associations)
(push '("\\.tex$" . nil) extview-application-associations)
(push '("\\.ps$" . nil) extview-application-associations)
(push '("\\.css$" . nil) extview-application-associations)
(push '("\\.xml$" . ask) extview-application-associations)
(push '("\\.ps$" . ask) extview-application-associations)
(push '("\\.*~$" . nil) extview-application-associations)
(push '("\\.*.~*~$" . nil) extview-application-associations)
(push '("\\.h$" . nil) extview-application-associations)
(push '("\\.d$" . nil) extview-application-associations)
(push '("\\.dat$" . nil) extview-application-associations)
Here is my ~/.mailcap:(where extview read)
image/jpeg; showpicture -viewer display %s
image/*; showpicture -viewer display %s
text/html; firefox %s
application/xml; firefox %s
text/xml; firefox %s
text/plain ; $EDITOR %s
text/* ; $EDITOR %s
chemical/x-mopac-input ; $EDITOR %s
application/pdf; evince %s
application/dvi; evince %s
application/ogg ; ogg123 %s
audio/x-wav ; aplay %s
audio/mpeg ; mpg321 %s
audio/*; showaudio %s
video/x-msvideo; mplayer %s
video/quicktime; mplayer %s
application/postscript; gv %s
showpicture, showaudio... is in the metamail package.
>>
>> http://www.emacswiki.org/cgi-bin/wiki/extview.el
>> --
>> A+ Thierry
>> Pub key: http://pgp.mit.edu
>>
--
A+ Thierry
Pub key: http://pgp.mit.edu
next prev parent reply other threads:[~2008-01-10 20:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-10 6:04 How to preview HTML inside emacs? Forrest Y. Yu
2008-01-10 8:10 ` Thierry Volpiatto
2008-01-10 16:49 ` Forrest Y. Yu
2008-01-10 20:17 ` Thierry Volpiatto [this message]
2008-01-10 8:18 ` Jashy
2008-01-10 8:30 ` David Hansen
[not found] <mailman.5942.1199945069.18990.help-gnu-emacs@gnu.org>
2008-01-10 7:09 ` Wang xiangdong
-- strict thread matches above, loose matches on Subject: below --
2008-01-10 17:05 Forrest Y. Yu
2008-01-10 17:10 Forrest Y. Yu
2008-01-10 17:45 ` Lennart Borgman (gmail)
2008-01-11 8:15 Forrest Y. Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bq7t306m.fsf@dell.linuxdev.us.dell.com \
--to=thierry.volpiatto@gmail.com \
--cc=forrest.yu@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).