Hi,
I use Sage in emacs in the shell buffer named *Sage-main*, in Inferior
Sage Mode.
I get an error when I type this input bellow with indent spaces.
But the input is right without any indent space.
In a xterm Sage adds theses spaces after the prompt,
so I type the indented code without any space.
In a xterm, it seems that the readline code in Sage adds theses space on
the input line.
So indent is right : with indented spaces on the screen, in my mind and
in the interpreted code.
In emacs, I don't see theses spaces after the prompt, but Sage thinks
there are such spaces.
So the indented code gives an error, and a code without space becomes right.
How can I solve this conflict ?
Can I get the added by Sage spaces in emacs ?
Does emacs eat theses spaces ? (in python.el or sage.el mode, even if I
don't see any code about it)
Can I tell to Sage to suppress theses default spaces and use the space I
type ?
Test (without prompt, but with spaces) and get an error in emacs.
sage: def f1 (x) :
....: if x==1 :
....: return 1
....: else :
------------------------------------------------------------
File "<ipython console>", line 4
se :
^
SyntaxError: invalid syntax
Test (without prompt nor spaces) and get a right function.
sage: def f1 (x) :
....: if x==1 :
....: return 1
....: else :
....: return 2
Many thanks for any help.
F.
--
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