On Sunday, January 3, 2016 at 5:36:30 PM UTC+1, Emmanuel Charpentier wrote: > > [ BTW : that's not really a bug, but rather a design conflict : the > original %mode functions were designed to switch (for an indefinite scope) > the behaviour of the REPL.This was transposed in the Sage notebook as what > amounts to the equivalent of Jupyter's cell magics (scope defined as the > current cell). Whereas line magics are, as far as I understand, > Jupyter-specific... We can't be consistent across notebooks without > redefining our "mode switch" magics as "cell magics", and rename them with > "%%"... ] >
IMHO we should just switch the interface line magics to work like other line magics in Jupyter/IPython, and also SMC: Take the rest of the line as string and evaluate Example for IPython default magic: sage: %system ls Makefile ['Makefile'] Example for how we currently handle line magics on the commandline (BAD: we just forget about the argument) sage: %gap 1+1; --> Switching to Gap <-- gap: ^C --> Exiting back to Sage <-- Expected behavoir of %gap 1+1; is to be like sage: gap('1+1;') 2 On the commandline ONLY line magics without arguments could still switch the interface -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.