On 4-Dec-09, at 12:33 AM, Pierre wrote: >> I know you have other things to do, but do you think you could >> write a >> quick-start guide to sage-mode?
Thanks for posting the basics, Pierre. Allow me to add a few interesting snippets. > ** open a .sage file in emacs, and go "ctrl-c ctrl-c" whenever you > want to load the file into sage. Same with a .py i think. I forget > what happens with .spyx (i've only tried once out of curiosity). The equivalent of using %ed, if you make your *scratch* buffer have the sage-mode bindings by default: * Select a region and try `sage-send-region' (C-c C-r). For regular coders/testers, the following are essential. * When interrogating code, ? and ?? open a *help* buffer and the source code in a new buffer. For me, iut's faster to switch to my *sage* buffer and interrogate the source than remember where a file is. BTW, I map C-c C-z to `python-switch-to-python' and modify that function to bring *sage* forward in the bottom half of the window. * Also useful, `sage-send-doctest' (C-c C-j). At the end of a doctest, send the doctest contents to the *sage* buffer and move to the next doctest. Allows interactive running of doctests. With prefix argument (C-u C-c C-j) sends all doctests in this docstring. For sage library developers, the following are useful. * First, `rerun-sage' kills sage (soft kill, then hard kill) and restarts it without wiping your history. * To rebuild the sage library, try `sage-build' (C-c C-b). This runs `sage -b'. With prefix argument (C-u C-c C-b) this rebuilds and then reruns sage, the equivalent of `sage -br'. * To test the sage library, try `sage-test' (C-c C-t). This runs `sage -tp 4 ...' and tries to guess what to test. Both `sage-test' and `sage-build' interface to the `compile' emacs-mode and try to be intelligient about presenting errors, etc. Thanks again, Pierre, for getting this started. Nick -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org