π§Ύ Options to store notebook in visual order or executable order #3279
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 order
at the bottom.Cell order
sectionThis new format is:
auto_reload_from_file=true
Backward 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 = true
For 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} = nothing
After 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:
.jl
Pluto files, you will not see a difference.Fix #3179
Try this Pull Request!
Open Julia and type: