You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Keep everything in the current directory. :-( This is not only messy but is suboptimal for example if you have a filters etc. which you want to be able to use from different places in a directory tree, but still cannot or don’t want to keep in the default data directory, e.g. if they have standardized (short) names.
Use long paths repeatedly on the command line. :-(
Use custom prefix environment variables (which need to be defined per session and/or on several accounts/machines and cannot be used in defaults files.
Look for directories with a certain name, say pandoc-data in the current directory and its ancestors. This approach has its own well-known problems!
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:
use symlinks in the custom data directory to link back to the regular data directory for things that are needed there.
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
pandoc-data
in the current directory and its ancestors. This approach has its own well-known problems!Related
The text was updated successfully, but these errors were encountered: