-
-
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
Support $XDG_DATA_DIRS or equivalent for templates and lua filters #7922
Comments
See https://pandoc.org/MANUAL.html#defaults-files |
Great to know as it solves my immediate problem, but what is your opinion on supporting |
I don't know. I'd like to understand better what this would allow us to do that we can't do now, and why it's important. |
It would allow one to compose multiple directories with templates and filters using only environ variables. It would allow package managers like nix, and It would also allow one to wrap pandoc like the following: #!/bin/sh
# this file is in PATH
export XDG_DATA_DIRS=/some/lua/collection:"$XDG_DATA_DIRS"
exec /not/in/PATH/pandoc "$@" |
The argument for enabling |
My { pkgs ? import <nixpkgs> {} }:
with pkgs; mkShell {
buildInputs = [
graphviz
(pkgs.writeShellScriptBin "pandoc" ''
exec env XDG_DATA_HOME=${pandoc-lua-filters}/share ${pkgs.pandoc}/bin/pandoc "$@"
'')
pandoc-imagine
nodePackages.mermaid-cli
haskellPackages.pandoc-crossref
pandoc-plantuml-filter
( texlive.combine {
inherit (texlive)
scheme-small
titlesec
fontaxes
supertabular
xtab
atkinson;
}
)
];
} It is possible to join the lua filter with other filters using |
Adding link to specification: |
Describe your proposed improvement and the problem it solves.
To avoid tailoring
defaults.yaml
to my specific environment using absolute paths, I'd rather configure my pandoc setup to search various paths for lua filters.defaults.yaml
does not support using environment variables to my knowledge, overriding$XDG_DATA_HOME
is a very heavy-handed (i run other things as well) and it only supports configuring one path making such a solution not scale.For this reason I request support for
$XDG_DATA_DIRS
, which is the natural conclusion of #3582. Optionally an environment variable such as$PANDOC_DATA_DIRS
that supports multiple entries could also do the trick.It could be the solution to #6635. For me, it would allow me to use the nixpkgs package
pandoc-lua-filters
in anix-shell
environment, which simply dumps the lua filters in a read-only folder:Tangentially related due to the discussion: #6760
The text was updated successfully, but these errors were encountered: