#10504: Sage in emacs fails for some functions
----------------------------------+-----------------------------------------
Reporter: fmaltey | Owner: iandrus
Type: defect | Status: new
Priority: major | Milestone:
Component: user interface | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Changes (by iandrus):
* owner: was => iandrus
Comment:
FWIW typing it in without indenting works:
{{{
sage: def test(n) :
....: if n==2 :
....: return 2
....: else :
....: return 3
....:
sage: test(2)
2
}}}
But indenting it "manually" causes problems:
{{{
def test (n) :
....: if n==2 :
....: return 2
....: else :
------------------------------------------------------------
File "<ipython console>", line 4
se :
^
SyntaxError: invalid syntax
}}}
In a shell, the proper indentation is added automatically i.e. the
transcript below resulted from typing exactly the same characters as the
first:
{{{
sage: def test(n) :
....: if n==2:
....: return 2
....: else:
....: return 3
....:
sage: test(3)
3
}}}
It's probably related to the TERM environment variable (set to "dumb"
inside emacs), but I don't know where this is handled in Sage (probably
ipython).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10504#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.