Skip to content

default-file improvements #1838

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

Closed
wants to merge 2 commits into from

Conversation

Minion3665
Copy link
Contributor

1 of 2:
It's a common point of confusion that default-file does not set the
default file for insertions. This patch brings the behavior into line
with people's expectations.

BREAKING-CHANGE: If you are using default-file and expecting entries to be inserted to your main file, this will no longer happen
Fixes: #882
Refs: #1698, #822


2 of 2:
I autogenerate some fava config, and one option I'd like to specify is
the default file.

Unfortunately, this previously had to be specified in the file which
would become the default file, leading to a messy and fragile setup in
which my (readonly) configuration file would become the default if the
magical "default-file" line was ever removed from the user-editable
config.

This feature allows existing semantics around default-file to continue,
while also providing the ability to set it in some other file if the
existing options are unsuitable.

@Minion3665 Minion3665 force-pushed the push-uuwsqwsunqtu branch 3 times, most recently from 9cc82de to f4ca2e6 Compare July 18, 2024 21:20
@Minion3665 Minion3665 marked this pull request as ready for review July 18, 2024 21:27
It's a common point of confusion that default-file does not set the
default file for insertions. This patch brings the behavior into line
with people's expectations.

BREAKING-CHANGE: If you are using default-file and expecting entries to be inserted to your main file, this will no longer happen
Fixes: beancount#882
Refs: beancount#1698, beancount#822
I autogenerate some fava config, and one option I'd like to specify is
the default file.

Unfortunately, this previously had to be specified in the file which
would become the default file, leading to a messy and fragile setup in
which my (readonly) configuration file would become the default if the
magical "default-file" line was ever removed from the user-editable
config.

This feature allows existing semantics around default-file to continue,
while also providing the ability to set it in some other file if the
existing options are unsuitable.
Copy link
Member

@yagebu yagebu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, I agree that using the default_file as a default for inserts seems more sensible :)

@yagebu yagebu closed this in 952e665 Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

default-file could also set the insertion file
2 participants