-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pierre wrote:
> you need to try M-x run-sage before using the sage mode. Afterwords
> everything works fine. All the commands related to python now work
> with sage instead.
> 
> However you might notice the following bug: C-c C-l does not work
> anymore in python mode ! and i mean even before running M-x run-
> sage... at least i have this bug on my machine. To get around it,
> my .emacs looks like this:
> 
> ;; SAGE
> 
> (add-to-list 'load-path (expand-file-name "/home/pedro/sage/data/
> emacs"))
> (require 'python)
> (require 'pyrex "pyrex-mode")
> (global-set-key [f2] 'sage-pcomplete-or-help)   ;; completion in SAGE,
> should be TAB key but doesn't work so this makes it F2
> 
> ;; used to be
> ;;(require 'sage "sage-mode")
> ;; (setq sage-command "/home/pedro/sage/sage")
> ;; works but disturbing python mode so:
> 
> (defun my-sage ()
>   "runs sage -- do not use python mode afterwards !"
>   (interactive)
>   (require 'sage "sage-mode")
>   (setq sage-command "/home/pedro/sage/sage")
>   (call-interactively 'run-sage))

Works like a charm, thank you. You should push it to the wiki page of
sage mode.
One question: What is 'sage-pycomplete-or-help supposed to do ?
I cannot get this function to do anything?

best
Thomas

> 
> this way i go M-x my-sage if i want to switch to SAGE, from which i
> cannot reverse (exit emacs and start again to work with python).
> 
> hope this helps.
> pierre
> 
> 
> On Nov 15, 7:19 pm, Thomas Kahle <[EMAIL PROTECTED]> wrote:
> 
> 
> mabshoff wrote:
> 
>>>> On Nov 15, 9:49 am, Thomas Kahle <[EMAIL PROTECTED]> wrote:
>>>> Hi,
>>>> has anyone ever programmed / requested / thought about an emacs-mode for
>>>> sage.
>>>> They way I write python code is, to use to use emacs-mode (the one
>>>> coming with the python distribution). It has syntax highlighting,
>>>> tab-completion, definition lookup, etc.
>>>> Furthermore one can easily send chunks of code to the interpreter for
>>>> testing.
>>>> So the question is, how do you effectively develop for sage or are there
>>>> any lisp gurus out there willing to derive sage-mode from python mode ??
>>>>> Check outhttp://wiki.sagemath.org/Emacs
>>>>> There was also some additional work done at Sage Days 10 that might or
>>>>> might not show up there in the near future.
> Ok, thank you. I should have found that using google :)
> 
> Now, if Nick Alexander reads this. My sage mode sends the buffer
> contents to a python interpreter, but not sage. This results in
> 
>>>>>> load /home/tom/python/minprimes.sage
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> NameError: name 'load' is not defined
> when running 'sage-send-buffer'
> 
> I have installed the package and .emacs config as written on the wiki
> page. The emacs is version 23.0.60.1 (from cvs), pyrex 0.9.4.1, anything
> else you need to know?
> 
> Thanks for your effort
> Thomas
> 
> 
> 
>>>> thanks
>>>> Thomas
>>>>> Cheers,
>>>>> Michael
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkgBLsACgkQrpEWPKIUt7NhpwCffUAIAndijWpGn1YHtrWMQDxp
WjwAoKwEzc9TzRoMQXfgVQZOaXBtUDre
=ZC7/
-----END PGP SIGNATURE-----

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to