jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.86k stars 3.39k forks source link

Local data dir(s) at a higher precedence than `--data-dir` #10253

Open bpj opened 1 month ago

bpj commented 1 month ago

The problem

The --data-dir option is useful, but its overriding the default user data directory is often a problem, since you may want to use files both from a custom data directory and the default directory, particularly filters and defaults files.

Proposed solution

I think the best solution is a command line/defaults file option --local-data-dir used to specify one or more directories (with appropriate subdirectories) where Pandoc will look for data files after looking in the current directory but before looking in the --data-dir. (preferably repeatable)

Alternative solutions

Related

jgm commented 1 month ago

The user data directory is already "local," in the sense that it provides the opportunity to override system defaults. So, what you're proposing is having three layers -- the system defaults, the user data directory, and a super-local data directory.

This would add a lot of complexity.

One solution you didn't mention: