From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: How to preview HTML inside emacs? Date: Thu, 10 Jan 2008 21:17:21 +0100 Message-ID: <87bq7t306m.fsf@dell.linuxdev.us.dell.com> References: <87myrerti7.fsf@dell.linuxdev.us.dell.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199996276 803 80.91.229.12 (10 Jan 2008 20:17:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jan 2008 20:17:56 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Forrest Y. Yu" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 10 21:18:16 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JD3qx-00069d-O4 for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2008 21:18:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JD3qZ-0002rw-W1 for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2008 15:17:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JD3qE-0002no-HF for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 15:17:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JD3qB-0002iP-K5 for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 15:17:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JD3qB-0002i5-ER for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 15:17:27 -0500 Original-Received: from fk-out-0910.google.com ([209.85.128.185]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JD3qB-0007f6-Fz for help-gnu-emacs@gnu.org; Thu, 10 Jan 2008 15:17:27 -0500 Original-Received: by fk-out-0910.google.com with SMTP id 26so661453fkx.10 for ; Thu, 10 Jan 2008 12:17:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references:face:date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=gwfBhwIBG4LyBy8YxAGHlYwug6MgzbiW9/S4nL3hXyo=; b=bqWyICvjJEzlAn6C82PUwSgManc7I3LpoPYibCLXdKon2Q5l7C780UbfQ392+TvyZ/i+17qs/xVXJz6Ricpcv2TxmF2YuOBfly9EBeEyhGlP3JOvwcfqGdZqoMXwCrNvbbAUJ7MJ4zjSSPC02QkgUMD3RD6LJTuF3AHndTAYQcg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:face:date:in-reply-to:message-id:user-agent:mime-version:content-type; b=WNOHQmKALwjYD7vU7sHzhypf0kzjEYFZ9A2O9X5WvqUL5HjzFJfzn2pMw1hC43/ai5tif3WVTsaMkmCvr5eQCSL1PiF6t0jHuHrzT3NqmzKJ4f3gKPu+kTY0sa2cIrUa4n31NZOajfliq40ZLFoNuoGAzfibDijvqg4mzK+py4M= Original-Received: by 10.82.171.16 with SMTP id t16mr3898371bue.11.1199996245455; Thu, 10 Jan 2008 12:17:25 -0800 (PST) Original-Received: from dell.linuxdev.us.dell.com ( [78.114.18.34]) by mx.google.com with ESMTPS id j2sm6606938mue.3.2008.01.10.12.17.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Jan 2008 12:17:23 -0800 (PST) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEUHAwJfJRBxTStaVVUq QleXMROlTymlaEzRTR/FRCfb1LmsjGQqBf0nAAAACXBIWXMAAAsSAAALEgHS3X78AAAB+ElEQVQ4 y3VTPW/bQAw9Jorno5pzGmSxDCQBuhkpumSpIaFzrgAdaZQBSejWNkiEIFMHIeetLiBDWjtqbIB0 6J8rz0Xhj5w5mDDf8ZF8pIT4b96WX1kkdlgUvXcDXrQrJwqXKXBTXm1meOFbi5wH/q20gaOySP9B 4cUT//qoHgfs937TsPhs44fh4dhS4WvznX2hATC3wEnXPQ0sEJsf7DJku+aU8Zuu+2nJR7Gphehl ZGaUPwbD4Z+u+2WrB4lZCHHQNmamVfHwPL25uAwCTmGqqRCJMUYL6OfBVEbjDyoQQsVmLsTEmIpf gfQRPC5cSCD7VEA708shMPDCCFK6tRy2OUXLMcWeZMXhDj5xnNYVyS3u59A3TYVrcci1lDCZcput 3tDwiP+fGlYNcVN0vP8a9DPpWAdqQFd8/91o6Fpfr6wnKB1r7yXtXIp9xymcaXx1OXIcCpI/xHLw EoCizcjOtt0anLV1XNMAfDwfbVAp3mVSfQNCzNO1BFQUk2pSJNKx+bICTokrKNLimHh581VKSvyU uLJqqao+roCxBGahK15dQrTRGRzXlsNPar01SsxbnU3KO9we0QKV0i+0h6QxJkWH9KpZXpRDrqzV 7o8Nd8QP+IKcwKS+fhg4gXZx7wL4jJOFi4uVb1JnHFXuvDhE7W4X18/5L9gPfl3mJR3tAAAAGnpU WHRKUEVHLUNvbG9yc3BhY2UAAHjaMwIAADMAMxEWfmMAAAAnelRYdEpQRUctU2FtcGxpbmctZmFj dG9ycwAAeNozqjDSMawwBGEAEYMC6WQPG2IAAAAASUVORK5CYII= In-Reply-To: (Forrest Y. Yu's message of "Fri, 11 Jan 2008 00:49:37 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50639 Archived-At: "Forrest Y. Yu" writes: > On Jan 10, 2008 4:10 PM, Thierry Volpiatto > wrote: >> >> "Forrest Y. Yu" 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