[Zope] Emacs, ange-ftp, zope ftp serv, auto mode loading and font-lock-mode

Azboklin Lirik azbok@hotmail.com
Thu, 20 Dec 2001 13:08:34 -0500


<html><div style='background-color:'><P>&gt;Chances are good that Zope isn't giving Emacs enough of a clue as to what kind of file you &gt;are editting. Emacs either needs a '.' extension </P>
<P>Actually, what I do is name my python files myfile_py and html files myfile_html.&nbsp; I tried naming my files with .py, etc but that causes problems when trying to access them in python because of the object dot notation.&nbsp; So in my .emacs file I have the following</P>
<P>;; HTML Mode<BR>;; ---------<BR>(setq auto-mode-alist<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (cons '("\\_html$" . html-mode) auto-mode-alist))</P>
<P>;; Python mode<BR>;; -----------<BR>(setq auto-mode-alist<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (cons '("\\_py$" . python-mode) auto-mode-alist))</P>
<P>;; SQL Mode<BR>;; --------<BR>(setq auto-mode-alist<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (cons (cons "<A href="file://\\_sql$">\\_sql$</A>" 'plsql-mode) auto-mode-alist))<BR></P>
<P>;; Font Lock Mode<BR>;; --------------<BR>(global-font-lock-mode t)</P>
<P>With files on my regular filesystem, I can load up files called myfile_py and it auto loads python mode and fontifies.</P>
<P>I tried the file comments and they work perfectly.&nbsp; I don't care about the extra 3 lines, its worth&nbsp;not worrying about&nbsp;M-x html-mode each time.&nbsp; I don't actually use dtml, I use zpt (zope page templates).&nbsp; Just wondering though, what special stuff does dtml mode do for you?</P>&gt;being able to hack the whole thing with &gt;Emacs via FTP is priceless. 
<P>Totally!</P>
<P>Azbok</P></div><br clear=all><hr>Join the world’s largest e-mail service with MSN Hotmail. <a href='http://go.msn.com/bql/hmtag4_etl_EN.asp'>Click Here</a><br></html>