🧾 Options to store notebook in visual order or executable order#3279
Draft
🧾 Options to store notebook in visual order or executable order#3279
Conversation
Member
Author
|
🙈 But now it's not storing the code visible/hidden status... Need to rethink this |
I think the code visible/hidden status needs to be shifted to the cell itself with the new format, i.e. in the |
Member
Author
|
Yes! Actually I want to store it as cell metadata (just like "disabled") |
Member
Author
|
Updated parser factored out into #3285 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work in progress
This PR allows you to configure how notebook files are stored. Files can be stored:
Cell orderat the bottom.Cell ordersectionThis new format is:
auto_reload_from_file=trueBackward compatibility
The new format can already be opened in old Pluto versions, but unfortunately the cells will appear in random order... (because they are stored in an unordered
Dict).Configuration
This adds two new configurations:
store_in_executable_order_new::Bool = trueFor newly created files, should the notebook file store cells in executable order, so that the notebook file can run as a standalone Julia file? If false, the visual order will be used as the file order, and the Cell order section is ommited.store_in_executable_order_existing::Union{Nothing,Bool} = nothingAfter opening an existing notebook, should the notebook file store cells in executable order, so that the notebook file can run as a standalone Julia file? If false, the visual order will be used as the file order, and the Cell order section is ommited. If nothing, the notebook will be saved in the format it was opened in.Use
The important ideas with this change are:
.jlPluto files, you will not see a difference.Fix #3179
Try this Pull Request!
Open Julia and type: