help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: html browser preview help


From: rpd
Subject: Re: html browser preview help
Date: Sat, 5 Sep 2009 14:27:27 -0700 (PDT)

Hi Tyler

Thanks for your reply-but your advice doesn't work properly for me (it does
open a browser window but this opens at my homepage & does not preview the
html file/buffer I have open for editing).

This is driving my crazy trying to fix (as I have spent a lot of time today
with this- I even installed w3m & can now view html buffer files with that
BUT that is only a text browser!! I want to see preview in a full browser!).

I have adjusted the code ken-93 gave with his latest advice & when I use it
it opens a blank page Internet Explorer  (I guess I need to add the code
that points to the current file buffer but I do not know how to do that).
Anyway here is this latest defun code:

; Windows explorer to go to the file in the current buffer
(defun browse-file-url-ie (url &optional new-window) 
  "Open the current file, the file associated with the current buffer, 
 in a new IE tab."    
  (interactive "i")  
  (unless 
    (string= "" 
               (shell-command-to-string 
                (concat " start about:blank   'openURL(file://"
buffer-file-name 
")'"))) 
    (message " Opening in IE new tab: " buffer-file-name)))
(setq browse-url-browser-function 'browse-file-url-ie)


Please can someone give me more help to fix this? I look forward to helpful
replies, thanks 

Tyler Smith-3 wrote:
> 
> rpd wrote:
>> I still need some help to get to preview html files in my Internet
>> Explorer
>> browser.
>>
>> ken-93 helped me with some code (which opens Firefox browser) which I
>> have
>> tried to adapt to do
>> this for Internet Explorer but it isn't working. I am using
>> html-helper-mode
>>
>>   
> 
> Have you tried browse-url-of-buffer? It's normally bound to C-c C-v, and 
> on Vista it sends the file you are editing to your default browser, no 
> further configurations or code necessary.
> 
> Cheers,
> 
> Tyler
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/html-browser-preview-help-tp25273542p25312500.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]