On Thu, Jan 23, 2014 at 11:32 AM, Jean-Marc Lasgouttes
<lasgout...@lyx.org> wrote:
> Le 23/01/2014 17:22, Scott Kostyshak a écrit :
>
>> $$s is for the system directory. So to reach those scripts one could
>> do $$s/scripts/. I don't believe there is a variable for the user
>> scripts directory and it is this directory that I understand the
>> Customization manual to suggest.
>
>
> Actually, the filettols.h file says:
>
> /** Takes a command such as "python $$s/scripts/convertDefault.py file.in
> file.out"
>  *  and replaces "$$s/" with the path to the LyX support directory
> containing
>  *  this script. If the script is not found, "$$s/" is removed. Executing
> the
>  *  command will still fail, but the error message will make some sort of
>  *  sense ;-)
>  */
> std::string const libScriptSearch(std::string const & command,
>                 quote_style style = quote_shell);
>
> $$s is not really a variable like the others, but a kind of macro. The real
> syntax is actually $$s/foo/bar, and this searches for bar in user_dir/foo
> and then system_dir/foo.
>
> Therefore $$s/scripts/pdfcopier.sh is correct and finds the script wherever
> it is.

Ah now I'm starting to understand. Do you happen to know under which
cases $$s is interpreted? Putting the same copier command in different
converters leads to the $$s sometimes being substituted and sometimes
not. And contrary to the message you cited, the $$s/ is still included
for me when the path is not found (I put in a bogus name). So this
makes me think there's something that I'm still not understanding.

Scott

Reply via email to