Hello List, Thank you so much for your clarification and insight
I am looking forward to using that special magic with sage in the future. Best regards, phiho On Tue, Feb 22, 2022 at 12:40 PM William Stein <wst...@gmail.com> wrote: > On Tue, Feb 22, 2022 at 9:31 AM Nils Bruin <nbr...@sfu.ca> wrote: > > > > On Sunday, 20 February 2022 at 21:12:09 UTC-8 hohoa...@gmail.com wrote: > >> > >> > >> Please help me to understand the function of '%auto' (is there a > reference for sage 'magics' ?). Is '%auto' a line magic or cell magic or > something else? > >> > > The very same documentation that contains the example you reference also > has an explanation right below it: > > > > """ > > A very sharp-eyed reader will also have noticed that the previous cell > had %auto at the very top, and that it was not necessary to evaluate the > cell to use it. > > > > The command %auto allows us to have a cell, especially an interactive > one, all loaded up as soon as we start - particularly convenient for a > classroom situation. > > > > Such instructions are called percent directives . Most are documented in > the notebook help one can access at the top of any worksheet > > > > """ > > Unfortunately, as you can see from the `lsmagics`, this "percent > directive" does not exist any more. I suspect it was part of the *old* sage > notebook and was not ported to the new jupyter notebooks that sagemath uses > now. The fact that it's referred to as a "percent directive" instead of a > cell magic (as you can see from the description, it should be a cell magic > and hence be spelled with "%%" if it were something for a jupyter notebook) > is also an indication. It should probably be removed from the documentation > > > > As to why it wasn't ported: it may not fit easily in the architecture of > jupyter notebooks and/or there may be notebook extensions that can already > do this through some other mechanism. If it were provided, it should be > done on the level of the python3 Ipython kernel, of which the sagemath > kernel is a derivative. > > > > Harald and I have also looked into this same problem: > > https://github.com/sagemathinc/cocalc/issues/4698 > > Right at the very beginning of implementing the Sage notebook in 2007, > there were several minimal features/requirements that I thought were > absolutely critical > for anybody to actually use this thing seriously for math research, > including: > > - ability to start computations running, close your browser, and come > back and see the output > - %auto cells to initialize everything > > It seems like these are both not available in Jupyter yet, at least by > default. The first is due to some deep design decision they made in > the architecture of the backend server (which has pros and cons), that > they will hopefully finally fix in the next year. I don't know why > auto magics aren't implemented, since it shouldn't be difficult, and > solves many problems. I'll definitely do it for cocalc-jupyter soon, > and it's done for sage worksheets still, of course. > > > > -- > > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/sage-devel/06751199-e292-4fc5-93f5-1f6566e8926dn%40googlegroups.com > . > > > > -- > William (http://wstein.org) > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/sage-devel/CACLE5GDuzZt%2BLbOjCtNax2oXmPP7VDP9H4oTBZ4oECGo8%3DL_oQ%40mail.gmail.com > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CALZQg1byaSUKqaiysV-PVero_D5Fo8PhdpcSwsM4pTuvsLhsow%40mail.gmail.com.