Re: [sage-devel] broken prompts in Emacs shell-mode

2013-10-02 Thread Bill Janssen
Still better is this, in ~/.sage/ipython-0.12/profile_sage/ipython_config.py: o = get_config() try: import curses curses.initscr() except: print "can't initscr with curses" pass else: try: if not curses.has_colors(): o.SageInteractiveShell.colors = "NoCol

Re: [sage-devel] broken prompts in Emacs shell-mode

2013-09-25 Thread Bill Janssen
Better would be this: c = get_config() try: import curses curses.initscr() except: pass else: try: if not curses.has_colors(): c.InteractiveShell.colors = "NoColor" finally: curses.endwin() This could also go into the regular Sage ipython startup

Re: [sage-devel] broken prompts in Emacs shell-mode

2013-09-23 Thread Bill Janssen
Thanks, Nils. That worked. Use "sage -ipython profile list" to find out where your profile is (it wasn't using ~/.ipython/, it was using ~/.sage/ipython-0.12/), then put the following lines into ~/.sage/ipython-0.12/profile_default/ipython_config.py: c = get_config() try: import curses

Re: [sage-devel] broken prompts in Emacs shell-mode

2013-09-23 Thread Bill Janssen
Same problem with straight ipython. Bill On Friday, September 20, 2013 11:12:37 AM UTC-7, William wrote: > > Hi, > > What happens if you run straight ipython? > >sage -ipython > > If the problem is the same, you could ask on the ipython list... > (since sage's command line is ipython). >

Re: [sage-devel] broken prompts in Emacs shell-mode

2013-09-21 Thread Ivan Andrus
Not that this bug shouldn't be fixed, and not that there aren't valid reasons for running sage in an emacs shell, but just in case you didn't know: you can install the sage_mode spkg and run sage directly using the `sage' command. -Ivan On Sep 20, 2013, at 11:54 AM, Bill Janssen wrote: > In a

Re: [sage-devel] broken prompts in Emacs shell-mode

2013-09-20 Thread Nils Bruin
On Friday, September 20, 2013 11:12:37 AM UTC-7, William wrote: > > If the problem is the same, you could ask on the ipython list... > (since sage's command line is ipython). > > William > > It is. I don't think IPython's prompt configuration looks at the > environment TERM at all. It's fully

Re: [sage-devel] broken prompts in Emacs shell-mode

2013-09-20 Thread William Stein
Hi, What happens if you run straight ipython? sage -ipython If the problem is the same, you could ask on the ipython list... (since sage's command line is ipython). William On Fri, Sep 20, 2013 at 10:54 AM, Bill Janssen wrote: > In an Emacs shell, Sage seems to be ignoring the TERM setting

[sage-devel] broken prompts in Emacs shell-mode

2013-09-20 Thread Bill Janssen
In an Emacs shell, Sage seems to be ignoring the TERM setting (dumb) and sending ANSI escape sequences to the terminal around the "sage:" prompt. [pippin:~] wjanssen% printenv TERM dumb [pippin:~] wjanssen% /local/sage-5.11/sage +---