Subject: FVWM: FvwmM4 and FvwmScript

From: Pier Paolo Glave <[email-masked]>
Date: Wed, 06 Feb 2002 15:31:54 +0100

Hello,

I'd be interested in using FvwmM4 to pre-process FvwmScript files.
I've read in the man pages that the "-noread" option is useful in these 
cases, but I had no success...

Has anybody ever tried to do this before?

Thank you for your help and regards,
--
Pier

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

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 6 Feb 2002 13:29:30 +0000

> cases, but I had no success...

Suppose, you have a file named FvwmScript-Calendar.m4 in ~/.fvwm/ or
/usr/local/share/fvwm (or whatever `fvwm-config --fvwm-datadir` returns).
This function does what you want in 2.4.x.

  AddToFunc LaunchProcessedFvwmScript
  + I ModuleSynchronous FvwmM4 -lock -debug -noread -outfile $[FVWM_USERDIR]/FvwmScript-$0 FvwmScript-$0.m4
  + I Module FvwmScript FvwmScript-$0

  AddToFunc StartFunction
  + I LaunchProcessedFvwmScript Calendar

I will try to explain a bit. You need ModuleSynchronous and -lock so that
the next command running FvwmScript starts only after FvwmM4 is finished.
You need -debug (not a good name), otherwise the output file specified in
-outfile is removed after FvwmM4 is finished. You need -noread, otherwise
the output file is executed by FVWM and we want it for FvwmScript.

Regards,
Mikhael.

---

From: [email-masked]
Date: Wed, 6 Feb 2002 10:33:25 -0500 (EST)

> the output file is executed by FVWM and we want it for FvwmScript.

Maybe it would be good to change the first function just slightly:

  AddToFunc LaunchProcessedFvwmScript
  + I ModuleSynchronous FvwmM4 -lock -debug -noread -outfile $[FVWM_USERDIR]/FvwmScript-$0 FvwmScript-$0.m4
  + I ModuleSynchronous FvwmScript FvwmScript-$0
  + I Exec rm FvwmScript-$0

(delete the M4 output after executing FvwmScript)

Your explanations were great, by the way.

-- 
Larry Gensch                                          [email-masked]

            Working for COMPAQ for over a twentieth of a century

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 6 Feb 2002 13:59:01 +0000

> (delete the M4 output after executing FvwmScript)

Ok, but it should be: Exec rm $[FVWM_USERDIR]/FvwmScript-$0

Regards,
Mikhael.