Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notebook -- change it so changes are saved even in cells that aren't evaluated #1590

Closed
williamstein opened this issue Dec 23, 2007 · 5 comments

Comments

@williamstein
Copy link
Contributor

> On Dec 18, 12:51pm, pgdoyle <> wrote:
> > Changes to my Sage notebooks are not always getting saved. I'm
> > running Sage 2.9 from Firefox 2.0.0.11 on Mac OS 10.4.11 on a PowerMac
> > G5.
> 
> I've tried this now on with Safari instead of Firefox, and on a Linux
> box instead of the Mac.  And it appears to me that in every case,
> changes to any cell that doesn't get evaluated just get discarded when
> you `Save & close'.  Now, I would think that this could be fixed,
> because after all the notebook knows how to `Evaluate All', which must
> require it to inform itself about all edits that have been done to
> cells in the worksheet.  But, if for some reason this can't be fixed,
> then I think users ought to be warned, because I don't think it will
> be clear (it certainly wasn't to me) that unless you are careful to
> evaluate any cell you change or any new cell you enter, you'll lose
> your work.

The current behavior is not a bug and is exactly the way we designed
it to work.  That said, I *do* want to change the implementation
so that any time a cell is changed and the cursor leaves the cell
or "save & close" is clicked, the changed version is sent back to the
server.  I think Tom Boothby has argued against this,
which is why it hasn't happened already.

Component: notebook

Issue created by migration from https://trac.sagemath.org/ticket/1590

@boothby
Copy link

boothby commented Jan 2, 2008

comment:1

This was implemented some time before the notebook went to Twisted. I'll try to do it again...

@boothby
Copy link

boothby commented Mar 16, 2008

comment:2

This one slipped through the cracks...

@williamstein
Copy link
Contributor Author

comment:3

REVIEW:

  1. It works!

  2. This line is lame:

       if ctx.args.has_key('save_only'): 

instead you should test that the save_only key is there and equal to '1'.
Since it would be very reasonable to write query code someday with save_only=0,
and it would be mysteriously buggy.

  1. When 2 is fixed I recommend this for inclusion in Sage.

@williamstein williamstein changed the title notebook -- change it so changes are saved even in cells that aren't evaluated [with patch, positive review *pending* 1 change] notebook -- change it so changes are saved even in cells that aren't evaluated Mar 16, 2008
@boothby
Copy link

boothby commented Mar 16, 2008

Attachment: 1590-autosave.patch.gz

@boothby boothby changed the title [with patch, positive review *pending* 1 change] notebook -- change it so changes are saved even in cells that aren't evaluated notebook -- change it so changes are saved even in cells that aren't evaluated Mar 16, 2008
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Mar 17, 2008

comment:5

Merged in Sage 2.10.4.final

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Mar 17, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants