-
-
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
Look for filter executables in data-dir if referenced by name #3127
Comments
This seems reasonable. I'd like to get further comment on +++ Jakob Voß [Sep 23 16 00:39 ]:
|
Maybe |
Yes, good idea to use bin subdirectory. +++ Jesse Rosenthal [Sep 23 16 04:03 ]:
|
Then |
Yes, probably |
No real preference. |
I think the idea is not that this will go in your path, but |
Ah, right -- @nichtich did say that. Sorry I missed that. In that case, |
Agreed on $DATADIR/filters then.
|
So, looks like the easiest way is to replace
I haven't tried it yet, but something like that. Two issues:
|
Actually it's a bit more complicated than I had thought. |
Is the executable determined based on file extension or how is it done? I am writing a filter that executed other filters so the same logic should apply there (even for older versions of Pandoc that do not know about |
@nichtich: when you call a filter with the
If you call another filter from within your filter, we could conceivably alter the path env the filter is run under, allowing the filter to look under |
First we check to see if the filter is executable. If it is, we .py -> python +++ Jakob Voß [Sep 27 16 05:11 ]:
|
@jgm: should Looks like we're going to have to add an opts parameter to |
I'll give this a try this morning and see how it goes, unless you're already on it. |
Actually @jgm, there is a further subtlety. Right now, we prioritize executables. It only looks for extension/runtime if it doesn't find an executable. What do we want to do if there's a non-executable We're changing the expectation that non-executables will only be used if they're specified by full path. So it would require changing the flow a bit. |
+++ Jesse Rosenthal [Sep 27 16 05:56 ]:
I'd say yes.
No problem, it's not exported. But probably we SHOULD |
+++ Jesse Rosenthal [Sep 27 16 06:15 ]:
Yes, I think this makes sense.
|
okay, this seems to do it: It runs a expansion function prior to Seems to work with my tests (same name in path, path specified, etc). If this sounds good to you, I'll push it after the Travis tests are done. |
BTW, the question of filters using these functions seems like it's part of another larger issue: refactoring the big monolith in I got about 80% of the way through it this summer, but the last 20% is, of course, the hardest. |
+++ Jesse Rosenthal [Sep 27 16 08:09 ]:
Yes, this is definitely needed. It would also make it |
By now filters referred to with
--filter
must be executables on thePATH
with some disadvantages:I propose to let Pandoc first look in
--data-dir
if a filter is reference by name (instead of by path), so we can collect filter executables there. Temporarily prepending the value of--data-dir
toPATH
should do the job.The text was updated successfully, but these errors were encountered: