To start streamlining the TConf class a little, by removing some
internal logic which may be better residing in the Options dict,
we extract determining the correct taskrc file.
When the user exits the note-writing editor process without having
written any file, we also don't attach an annotation to the
corresponding task since it would lead nowhere.
This small change makes this condition obvious to the user, by informing
them that the program is 'doing nothing' when they exit the editor
without having saved a file.
Removed the property setters and getters from variables with complex
defaults. Instead, they are now given a specific const default value
`Path("%%%%I_DONT_EXIST_%%%%")` which is very unlikely to be used by a user
in normal circumstances.
This is necessary to be able to remove the properties since Python does
not distinguish between an empty Path() and a non-given Path() (i.e.
there is no Path value which returns Falsy).
However, this slightly clunky construct does allow setting the various
Paths once and only once, and also to remove all the previously
necessary getters and setters with their hidden backing variables.
Lastly it should open the gates for changing the _real_path
transformation to be part of the TConf class itself and not a global
function.
Necessary for CHANGELOG to pass since every change contains something
like 'Added', 'Fixed', 'Changed' as headings.
Will still error if there are e.g. multiple 'Added' headings for a
single version.
In the case of opening the notes but then backing out again without
actually writing a notes file we should also not annotate the task with
anything, since it technically still does not have a note.
Since the precedence now goes (from lowest to highest):
defaults -> conf_file -> env -> cli
existing EDITOR or VISUAL variables would overwrite those
explicitly set in the conf file. While we do want the general
precedence of env over conf file, this is a special case where
we get the value of the _DEFAULT_ variable from the env, and
only then start parsing our own options. So now, for these vars
we do:
default -> env (EDITOR/VISUAL) -> conf_file -> env (TOPEN_EDITOR) -> cli