advance to next cell *if* the next cell is a code cell

13 views
Skip to first unread message

Jason Grout

unread,
May 3, 2011, 11:36:30 PM5/3/11
to sage-n...@googlegroups.com
Currently after a user evaluates a cell, we advance to the next code
cell automatically. This is great if you have a bunch of code cells in
a row, but people have complained if you have lots of text in between
cells that the cursor and focus then jumps around too much. Brian
Granger just added something to the new ipython notebook that solves
this problem in a very simple way: advance only if the very next cell is
a code cell [1] (and not a text cell). What do people think of this idea?

Jason

[1]
https://github.com/ipython/ipython/commit/c128c48c99c13de480146706bb60b23349545ce2

William Stein

unread,
May 3, 2011, 11:39:30 PM5/3/11
to sage-n...@googlegroups.com
On Wed, May 4, 2011 at 4:36 AM, Jason Grout <jason...@creativetrax.com> wrote:
> Currently after a user evaluates a cell, we advance to the next code cell
> automatically.  This is great if you have a bunch of code cells in a row,
> but people have complained if you have lots of text in between cells that
> the cursor and focus then jumps around too much.  Brian Granger just added
> something to the new ipython notebook that solves this problem in a very
> simple way: advance only if the very next cell is a code cell [1] (and not a
> text cell).  What do people think of this idea?
>

I think this would be a useful *option*, and sometimes I might want
it. Usually I wouldn't, since I like to be able to "shift-enter
through a worksheet", and this would break that ability.

> Jason
>
> [1]
> https://github.com/ipython/ipython/commit/c128c48c99c13de480146706bb60b23349545ce2
>

--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Rob Beezer

unread,
May 4, 2011, 9:37:12 AM5/4/11
to sage-notebook
On May 3, 8:36 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
> advance only if the very next cell is
> a code cell [1] (and not a text cell). What do people think of this idea?

I think this would be a great idea, and I would want it most of the
time. But I also see William's point about shift-enter'ing your way
through a worksheet.

Two ideas:

(a) configurable by user with a drop-down box - I've been thinking for
a while that we could turn the auto-advance on/off this way. But had
not thought about stopping it at a text cell. So maybe there are
three modes for auto-advance: always (current), stop at text cell
(Granger), never (extreme).

(b) it would be nice if there was a mechanism to place certain options
inside a worksheet, or inside a sws file. In this case, if you
manufacture (by hand or by a tool) a worksheet with *lots* of
explanatory text, you could have it open and *start* in Granger-mode.
This is more than you asked for (as usual), but maybe this would be a
good project for a Drake student.

Rob

kcrisman

unread,
May 4, 2011, 10:41:25 AM5/4/11
to sage-notebook


On May 4, 9:37 am, Rob Beezer <goo...@beezer.cotse.net> wrote:
> On May 3, 8:36 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
>
> > advance only if the very next cell is
> > a code cell [1] (and not a text cell).  What do people think of this idea?
>
> I think this would be a great idea, and I would want it most of the
> time.  But I also see William's point about shift-enter'ing your way
> through a worksheet.
>
> Two ideas:
>
> (a) configurable by user with a drop-down box - I've been thinking for
> a while that we could turn the auto-advance on/off this way.  But had
> not thought about stopping it at a text cell.  So maybe there are
> three modes for auto-advance:  always (current), stop at text cell
> (Granger), never (extreme).
>

Please please please do this. Or find someone who can. Maybe it
could be a check box, like with typesetting.

It is one of the most unprofessional things that happens when I give
Sage talks or use it in class; I never mention the jumps, but I always
have to time my speaking in such a way that it doesn't do it. If this
is easy to fix, I would be extremely happy to review the change; if
it's *really* easy to fix, I might even try to do so after finals
(however, currently I have no idea how this works).

- kcrisman
Reply all
Reply to author
Forward
0 new messages