On 23 May 2001 12:03:30 +0200, Dominik Vogt wrote:
> 
> On Tue, May 22, 2001 at 11:14:25PM +0000, Mikhael Goikhman wrote:
> >
> > Here is a small patch adding partial expansion to module config lines;
> > function parameters and new inventions like $[page.nx] are expanded.
> > 
> > I tested it during the day and verified that it does not conflict with
> > any of our 27 modules accourding to their man pages.
> > 
> > With this patch FAQ 7.13 works. I plan to apply it tomorrow.
> > I don't want to do any other changes to command parsing before 2.4.0.
> 
> Currently my FvwmButtons setup relies on the fact that these
> variables are not expanded for module config lines, e.g.
> 
>   *FvwmButtons(Swallow xload `Exec xload -fg $[fg.cs6] -bg $[bg.cs6]`)
> 
> What will happen with such lines?

I see... You (and me in fvwm-themes) should have to escape $ here as $$
or not to escape it, depending on which value we want (at definition time
or at run time). Like in every other command. I hope you can accept this?
Your example is not different from what we have now with these commands:

  Exec echo 'Exec xload -fg $[fg.cs6] -bg $[bg.cs6]' >auto.fvwmrc
  PipeRead `echo 'Echo $[bg.cs0]' | sed s/0/1/`

Both can have $ escaped as $$ or not, depending on what is actually meant.
It is not complex, it is just our needs are complex, once we want $[fg.cs6]
to be expanded immediately (FvwmButtons: Back) and once not (your example).

I really want to solve this so that everyone is happy. It seems we agree
that $0 should be expanded, "$." is good to be expanded too, for example
for specifying full path for local images/sounds in FvwmButtons/FvwmEvent.
I am applying this patch, so we may see this in action. Disabling expansion
of $[fg.cs6] variables in module commands, if you still want it, is easy.

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to