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
clear In[] prompt numbers on "Clear All Output" #1621
clear In[] prompt numbers on "Clear All Output" #1621
Conversation
Let's punt on configurability for now: I think that should be the default behavior, since once output has been removed, the input numbers don't mean much anymore. We'll need to revisit the configuration problem for the web client later on, but we shouldn't stall good updates because of not having that done yet. |
ok, so should i just replace my comments with just something like "Make all In[ ] prompts blank. TODO: make this configurable in the future" ? |
sounds good |
ok, updated the comment, now it's ready to be merged |
I'm +1 on merging this, let's give it a day or so in case anyone else wants to have a look. Thanks! |
This seems sensible to me, though it does discard some information about execution if you continue to use the notebook in the same session after clearing it (as opposed to saving immediately and re-opening later on a fresh kernel). It seems like a combined 'fresh start == restart kernel + clear_all_output' would be a useful and more clearly consistent action, though I suppose clicking two buttons is not too much to ask. |
Oh, in case that meandering wasn't clear, I am +1 to merge as well. |
OK, let's merge it then. @minrk, you're right in that a full 'fresh start' option would probably be a good idea, but even with the points you mention, I think in practice for the purposes of saving for version control, this is a big improvement. |
…output clear In[] prompt numbers on "Clear All Output" For more version-control-friendly `.ipynb` files, this strips the `In[]` prompt numbers when doing a "Clear all output". This reduces the amount of noise in commit-to-commit diffs that would otherwise show the (highly variable) prompt number changes.
All merged, thanks again @ivanov for the work!! |
thanks for the feedback and the merging. what can I say, i'm very fond of one-liner fixes :) |
I tend to forget about this from time to time. Would be nice to have the option to do this automatically on save... |
…ar-all-output clear In[] prompt numbers on "Clear All Output" For more version-control-friendly `.ipynb` files, this strips the `In[]` prompt numbers when doing a "Clear all output". This reduces the amount of noise in commit-to-commit diffs that would otherwise show the (highly variable) prompt number changes.
For more version-control-friendly
.ipynb
files, I've found it useful to strip theIn[]
prompt numbers when doing a "Clear all output".I noted in the commit here that this should be a configurable behavior, and would love a pointer for how to proceed with making it configurable (using some javascript checkbox widget?)
I'm equally happy with amending this commit to just be the default, and punting on the configurability until a later date.