-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dave Whiteley wrote: > On Thu, May 05, 2005 at 01:00:55PM +0200, SER.RI-TIC-Alexis Roda wrote: > >>Dave Whiteley wrote: >> >>>Hello, >>>Firstly, my xemacs did not recognise my Script(Python) files as being >>>Python, and so it does not automatically switch to Python Major Mode. >>> >>>I added the standard shebang "#! /usr/bin/python" to the start of the >>>file which fixed this. However it would be nice if it were to >>>recognise Zope's script preamble. Please could someone point me at a >>>resource to help me configure my Xemacs for this. >> >>xemacs probably relies on file extension to decide the mode. Just rename >>your scripts and add a .py extension (not a good idea, since . is >>meaningful for python) > > > When I have created scripts in the web interface I have just accepted > the defaults, and so I presume that the scripts are buried in the ZDB, > rather than being actual files. Should I give them actual filenames > when I create them? > > >>or add something like (not tested): >> >># Local Variables: >># mode:python >># End: >> > > > > > Thanks, magic! That works. > > Now if I can fix the file type problem....
You need to persuade Xemacs not to create backup files. In "standard" mode, when you go to save the file, it does something like: - rename the original, giving it a backup suffix - Writes the new file, giving it the original name - (maybe) delete the renamed original That second step is where the DTMDocument is being created. If you can't find a solution to that problem, then you could add an ExternalMethod named 'PUT_factory', and take over control of the choice of object type being created yourself. See the following for hints: http://zwiki.org/HowToCreateZwikiPagesWithPut Tres. - -- =============================================================== Tres Seaver [EMAIL PROTECTED] Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCeiSDGqWXf00rNCgRAoBrAKCOkWO+0bdGAtq0WRBUknudOtdMOwCgkQ+x JqyZNfn1ZE75t8p0zjfG2Bo= =LsuD -----END PGP SIGNATURE----- _______________________________________________ Zope maillist - [email protected] http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
