Closed fmoralesc closed 13 years ago
This will require some API changes to PandocRegisterExecutor:
I have implemented this in a local branch, without regressions (default executors work fine), but I'm undecided on whether to merge it into master because of the API change. I'm not too keen on messing with other people's configurations (or maybe none is using custom executors?).
With the changes I have, instead of registering an executor like this,
PandocRegisterExecutor PandocOdt <localleader>odt pandoc -t odt --bibliography b:pandoc_bibfiles
we have to call it like this:
PandocRegisterExecutor PandocOdt <localleader>odt odt pandoc -t odt PANDOC#BIBS -o %:r.odt %%
The variable substitutions allowed for now are few, and are all in display in the example above:
%%
for the current filename%:r
for the current filename without the extensionPANDOC#BIBS
for a sequence of --bibliography
arguments for every value in b:pandoc_bibfiles
(might be good to have something else for just the sequence of values in b:pandoc_bibfiles
).I've pushed the changes to master. There should be no regressions, and the changes in the API are documented.
The current implementation of pandoc_execute is a bit inflexible, and doesn't allow for command descriptions like:
which should be executed as
We need to specify a set of variables to escape. Right now, we escape buffer and global variables, but we also might want to escape
%
(like in the above example).The output type should be inferred from the last command in the pipe, or be defined in PandocRegisterExecutor's call (should be more flexible), as we did originally.