Skip to main content

Module memory_selection

Module memory_selection 

Source
Expand description

The memory an operator chose on purpose, and kept.

Automatic selection answers “which memory is in front of me”: the nearest project, or the per-user default. That is the right answer for a checkout and the wrong one for a workspace that is not a repository, where it silently lands on whatever the per-user default happens to be. A saved selection is the operator saying which memory this machine opens when nothing more local has been said, and it survives every restart because it lives in the user’s config file rather than in an environment.

It never converts anything. Selecting a store this engine cannot open is refused with the reason and the repair; the bytes already on disk are not read, moved, migrated or replaced.

Structs§

SelectedMemory
An absolute directory a person chose to be this machine’s user memory.

Constants§

KEY
Root config key that owns this setting.
PRECEDENCE
The resolution order, said once for every surface that explains it.

Functions§

clear_selection
Removes the selection and returns automatic selection to the operator, touching no store on the way.
ensure_openable
Whether this engine could open the chosen directory, without opening it.
parse_saved_selection
The selection a config document carries. A value the file cannot mean is an error rather than a silent fall-through to automatic selection: a mistyped selection must be visible, not quietly ignored.
save_selection
Writes the selection into the user’s config file, leaving every other setting in it exactly as it was.
saved_selection
What the user’s config file currently selects, if anything.
select_memory
The selection a written value names, refusing everything that must not become one. Nothing is written and no store is opened.