Bernard Hurley wrote: > On Sun, 2005-02-13 at 11:36 +0000, Angus Leeming wrote: >> Georg Baum wrote: >> (Talking about the $$p parameter that could be passed to a converter) >> >> >> I checked the code in 140cvs and it looks as if this parameter does >> >> not get used (any more?). >> > >> > Indeed. I don't know why. >> >> Because it is a huge security hole if we don't protect individual >> arguments with quotes. Consider $$p as `rm -rf $HOME/*`. Remember that >> the value for $$p is stored in the LyX file, so we *have* to ensure it >> is safe if we are to avoid .lyx-file-as-virus problems. > > I understand this concern, but my original question was not could there > be a mechanisms for passing _any_ value as a parameter to a converter > but could there be a mechanism for the name of the directory containing > the current LyX file to be passes as a parameter similarly the way $$i > passes the name of the file.
I think that Georg or Andreas has already suggested that you define a "\mover" entry in your ~/.lyx/preferences file and pointed you in the direction of lib/scripts/fig_copy.sh as an example. What's wrong with that? > The way my converter works at present is that it picks up this directory > from an environmental variable and then adds this directory to the > lilypond-book search path. But for reasons I have given earlier it > would be easier to pick this up from a parameter. Understood. But special-casing in the core is a PITA to maintain. A lilypond_copy.sh would take this directory as input and would adjust the search path itself. Pretty easy really, no? Meanwhile, I suggest living with your hack for the 1.3.x series. -- Angus