-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
--data-dir is ignored in defaults files' search path #7320
Comments
See #6924 |
Both files are in the same directory, so I'd expect that if The docs suggest that
# Include options from the specified defaults files.
# The files will be searched for first in the working directory
# and then in the defaults subdirectory of the *user data directory*.
# The files are included in the same order in which they appear in
# the list. Options specified in this defaults file always have
# priority over the included ones.
defaults:
- defsA
- defsB |
Some more rough edges: both
nor
includes a.yaml. |
I wonder if @davidmrt98 (who implemented the code allowing default files to be specified within default files) has a comment on this issue? |
On the second "rough edge," judging from the code,
|
I just checked and it doesn't: $ pandoc --version
pandoc 2.13 [..]
$ mkdir -p testdir/defaults
$ printf 'to: markdown' > testdir/defaults/a.yaml
$ printf 'data-dir: ${USERDATA}\ndefaults: a' > testdir/defaults/b.yaml
$ echo '# test' | pandoc --data-dir=testdir -d b -
pandoc: a.yaml: openBinaryFile: does not exist (No such file or directory)
$ printf 'data-dir: ${.}\ndefaults: a' > testdir/defaults/b.yaml
$ echo '# test' | pandoc --data-dir=testdir -d b -
pandoc: a.yaml: openBinaryFile: does not exist (No such file or directory)
$ printf 'data-dir: .\ndefaults: a' > testdir/defaults/dot.yaml
echo '# test' | pandoc --data-dir=testdir -d dot - But for some reason, this does:
|
I'm not happy with the complexity of the code that handles this; I may try to rewrite it in a simpler way. |
I agree that the behaviour in the first example is odd. I already have a guess as to what the cause could be, but I will take a closer look. On the interpolation issue I can not comment, as I was not involved in the implementation of this feature. |
I'm currently building something that is affected by this issue, and I wanted to see if I had the current status of it correct. There are in fact two bugs discussed in this issue:
Similar problems have been brought up in the following issues: #8024 #8780 #8826 #8841 As for the first problem, in my project, I can work around it by programmatically inserting the correct data-dir in each defaults file, but this is not an ideal solution. I don't want to ask for any guarantees or ETAs, but is this an accurate summation of the status of this problem? |
This would be an extremely useful feature for me. The use case of having a dependency tree in the EDIT: The |
With pandoc 2.13, the data dir is used to the search path for default files supplied with the
--defaults
parameter but not in other default files:The text was updated successfully, but these errors were encountered: