Re: Comments on the .m file editor

*To*: mathgroup at smc.vnet.net*Subject*: [mg87951] Re: Comments on the .m file editor*From*: Will Robertson <wspr81 at gmail.com>*Date*: Mon, 21 Apr 2008 03:24:54 -0400 (EDT)*References*: <fu9fss$cdu$1@smc.vnet.net> <fuc828$a56$1@smc.vnet.net>

On Apr 20, 12:56 pm, Chris Chiasson <chris.chias... at gmail.com> wrote: > Since the .m is in plaintext (let's not go into how a .nb is > also "plaintext"), it is easier to run commands like unix's diff on > the code tree to see what changed. In order for this to work right, > the .m file must be indented in a way that promotes readability... That reminds me: the .m file editor doesn't have any sort of indenting features! At the very very least, padding out a newline with the same leading spaces as the previous line would make life so much easier. Also, if people don't want constructions like \[alpha] cluttering up their diffs, they are more than free to use basic ascii for their code. The reason that I started using the .m file editor to write packages is because the documentation lead me there. I've heard of initialisation cells and auto-generated packages, but it all seemed (at the time) like black magic compared to opening up the package and editing it. David, you wrote: > I don't see the advantages of writing package with the .m file editor. > Normally I don't even look at the .m file. Can you use the interactive debugger with notebooks? The only reason I want to stick with the .m file editor is that you can insert outline comments anywhere in the code. This allows much more flexible code commenting. Actually, I'm considering writing my Mathematica code in LaTeX's docstrip format, but it would lack some of the niceties of doing everything within Mathematica's frontend. You wouldn't want to look in an auto-generated .m file. It's not a pretty sight. But a handwritten one is as easy to read as a notebook, modulo the nice symbols and typesetting=85 Will