[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>>Chances are good that Zope isn't giving Emacs enough of a clue as to what kind of file you >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. 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. So in my .emacs file I have the following</P>
<P>;; HTML Mode<BR>;; ---------<BR>(setq auto-mode-alist<BR> (cons '("\\_html$" . html-mode) auto-mode-alist))</P>
<P>;; Python mode<BR>;; -----------<BR>(setq auto-mode-alist<BR> (cons '("\\_py$" . python-mode) auto-mode-alist))</P>
<P>;; SQL Mode<BR>;; --------<BR>(setq auto-mode-alist<BR> (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. I don't care about the extra 3 lines, its worth not worrying about M-x html-mode each time. I don't actually use dtml, I use zpt (zope page templates). Just wondering though, what special stuff does dtml mode do for you?</P>>being able to hack the whole thing with >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>