Subject: Module configuration commands

From: Dan Espen <[email-masked]>
Date: Wed, 03 Mar 1999 09:23:20 -0500

I made some progress on the FvwmTalk  replacement last night.  Its not
quite  done, but this  surfaced again, and I  thought I'd solicit some
opinions.  Here are the 2 forms files involved:

# FormFvwmTalk - Basic replacement for FvwmTalk
DestroyModuleConfig         FormFvwmTalk*
*FormFvwmTalkWarpPointer
# Layout
*FormFvwmTalkLine         center
*FormFvwmTalkText         "Talk to Fvwm"
*FormFvwmTalkLine         left
*FormFvwmTalkText         "Command:"
*FormFvwmTalkInput        Command 80 ""
*FormFvwmTalkLine         left
*FormFvwmTalkText         "Msg:"
*FormFvwmTalkMessage
*FormFvwmTalkLine         center
# Buttons
*FormFvwmTalkButton       continue    "Return - Execute"         ^M
*FormFvwmTalkCommand        $(Command)
*FormFvwmTalkButton       continue    "F1 - Help" F1
*FormFvwmTalkCommand        Module FvwmForm FormFvwmTalkHelp
*FormFvwmTalkButton       restart     "F3 - Reset input" F3
*FormFvwmTalkCommand        Nop
*FormFvwmTalkButton       quit        "F4 - Dismiss"  F4
*FormFvwmTalkCommand        Nop

# FormFvwmTalkHelp - Help Text for FormFvwmTalk
DestroyModuleConfig         FormFvwmTalkHelp*
*FormFvwmTalkHelpWarpPointer
# Layout
*FormFvwmTalkHelpLine    center
*FormFvwmTalkHelpText    "Talk to Fvwm - Help"
*FormFvwmTalkHelpLine    left
*FormFvwmTalkHelpText    " "
*FormFvwmTalkHelpLine    left
*FormFvwmTalkHelpPadVText 0
*FormFvwmTalkHelpText    "Enter commands in the \"Command:\" input field."
*FormFvwmTalkHelpLine    left
*FormFvwmTalkHelpText    "Commands beginning with \"!\" are executed by the"
*FormFvwmTalkHelpLine    left
*FormFvwmTalkHelpText    "shell as a sub-process of the form."
*FormFvwmTalkHelpLine    left
*FormFvwmTalkHelpText    "All other commands are sent to fvwm2 for execution."
*FormFvwmTalkHelpLine    left
*FormFvwmTalkHelpText    ""
*FormFvwmTalkHelpLine    left
*FormFvwmTalkHelpText    "Fvwm2 error messages are shown on the \"Msg:\" line."
*FormFvwmTalkHelpLine    left
*FormFvwmTalkHelpText    ""
# Buttons		 
*FormFvwmTalkHelpLine    center
*FormFvwmTalkHelpButton  quit    "Return - Dismiss"         ^M
*FormFvwmTalkHelpCommand   Nop

The problem here is that the instance FvwmForm "FormFvwmTalk" complains
about the configuration commands for "FormFvwmTalkHelp" since they
match up to the word "Help".  It looks at "HelpLine", etc. and
treats them all as invalid commands.

I can change "FormFvwmTalkHelp" to "FormFvwmHelpTalk", or make
FvwmForm not complain about commands it doesn't understand.
Changing the name around just makes it progressively harder to come
up with names.  Killing the command syntax check makes it harder
to debug configuration problems.

I wish there was a mandatory space after the module alias:

*FormFvwmTalkHelp Line    center

but I think its a little  late for that.  Maybe  a command line switch
to the module indicating the mandatory space  is needed would help, or
maybe I'm just not thinking straight.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
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-masked].
To report problems, send mail to [email-masked]

---

From: Tim Phipps <[email-masked]>
Date: Wed, 03 Mar 1999 14:43:10 +0000

> I wish there was a mandatory space after the module alias:

Since you're invoking FvwmForm with a command line alias why not put a
delimiter after the base name e.g.
FvwmForm FormFvwmTalk:
and then have config lines like
*FormFvwmTalk:Line left
...
I don't think using a space is possible, even if it didn't get stripped
off by fvwm the module might tokenize the config lines. Using : might
not be the best, it might get confusing with Xdefaults, a / might be
good since it's impossible to clash with a real module.

Cheers,
Tim.

---

From: Steve Robbins <[email-masked]>
Date: Wed, 3 Mar 1999 10:01:28 -0500 (EST)

On Wed, 3 Mar 1999, Tim Phipps wrote:

> off by fvwm the module might tokenize the config lines.

What if there were a libfvwm function to parse the config file, and fvwm
and all modules used it?  Could we not enforce some sane & consistent
syntax?

---

From: Dan Espen <[email-masked]>
Date: Wed, 03 Mar 1999 10:59:15 -0500

> and all modules used it?  Could we not enforce some sane & consistent

I think the ":" suggestion  is pretty good.   I wish I had thought  of
it.  Thanks.

Some of the parsing is in a library routine.  FvwmEvent, FvwmAnimate,
and FvwmForm are using it.  You may be referring to parsing the line
itself.  I've been thinking how bad the FvwmForm syntax is.  I think I'd
prefer:

*FvwmForm:Line center, Text "Command: ", Input Command, Length 80, Value ""

I haven't yet looked to see if we have generic code to parse that.

---

From: Matthias Clasen <[email-masked]>
Date: Wed, 3 Mar 1999 21:32:01 +0100

> and FvwmForm are using it.  

Actually, FvwmEvent was not using it until 2 days ago, when I removed
Parse.c from its Makefile. Maybe we should remove the files Parse[ch]
from the modules/FvwmEvent directory, since they are no longer used.

-- 
Matthias Clasen, 
Tel. 0761/203-5606
Email: [email-masked]
Mathematisches Institut, Albert-Ludwigs-Universitaet Freiburg
--
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-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Wed, 03 Mar 1999 15:39:24 -0500

> from the modules/FvwmEvent directory, since they are no longer used.

I caught that, which is what led me to include FvwmEvent in the list.

If the file is no longer being used, there is no maybe about it.
Go ahead and remove it.

---

From: Michael Han <[email-masked]>
Date: Wed, 03 Mar 1999 14:13:31 -0800

Previously...
>I think the ":" suggestion  is pretty good.   I wish I had thought  of

Just a sidenote, FvwmIconMan already does something to isolate config
lines intended for different instantiations of itself. It uses '*' as
a separator, as in:

*FvwmIconMan*transient*Foo Bar

Just in case you wanted to be consistent with that. Or alternatively,
maybe someone could decide what the right thing is and then have
IconMan conform to that?
-- 
[email-masked]
I will not hang donuts on my person
 - The collected wisdom of Bart Simpson
--
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-masked].
To report problems, send mail to [email-masked]

---

From: Steve Robbins <[email-masked]>
Date: Wed, 3 Mar 1999 20:17:31 -0500 (EST)

> from the modules/FvwmEvent directory, since they are no longer used.

Too late, it got removed last night!

The reason I removed them was *not* just that they became superfluous.  It
was more subtle than that:

1) You missed an #include "Parse.h" in FvwmEvent, so
2) FvwmEvent.c depended on Parse.h (in the FvwmEvent directory), but
3) Parse.h was not in the Makefile.am, meaning
4) the distribution ("make dist") had a broken dependency in the makefile:
   Parse.h was neither distributed nor could it be built.

How did I discover all that?  Simple: "make distcheck".  

Remember: "make distcheck is your friend"

--
Steve Robbins                              <[email-masked]>

I'd rather have one of your minutes
than a year with all the hours in it.

---

From: Dan Espen <[email-masked]>
Date: Fri, 05 Mar 1999 14:37:43 -0500

> maybe someone could decide what the right thing is and then have

Well, I liked the ":" (colon), but I changed  my config file's name to
"FormFvwmTalk:" and  was unable  to  get the  filename to  pass   thru
gnumake.

Using asterisk doesn't appeal to me since I need to be able to use
"DestroyModuleConfig" which uses the asterisk as a wildcard.

Right now I'm   using period, which looks  OK,  and is common in  file
names, (although not always as a trailing character).

I'd hate to go to using filename extensions, but they would work too.
Right now, period seems acceptable.  So far, this is just a naming
convention, there is no code in FvwmForm that requires periods.

---

From: Michael Han <[email-masked]>
Date: Fri, 05 Mar 1999 11:53:13 -0800

Previously...
>"DestroyModuleConfig" which uses the asterisk as a wildcard.

Hmm, good point. The use of the asterisk always looked a bit suspect
to me...

>names, (although not always as a trailing character).

Periods look like a good approach.

>convention, there is no code in FvwmForm that requires periods.

Agreed. Maybe we should patch IconMan to follow the same convention? Or
place something in libfvwm and patch IconMan to parse using library
routines?
-- 
[email-masked]
I will not show off
 - The collected wisdom of Bart Simpson
--
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-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Fri, 05 Mar 1999 15:29:39 -0500

...
> place something in libfvwm and patch IconMan to parse using library

I never used or looked at this module before, but felt I should.  This
module really does require asterisk delimiters.  (I had  to see it for
myself).  All Brady had to say for himself was in the README:

"I realize that the syntax for  setting options is different from that
used by other modules."

I'm not sure if  we could change FvwmIconMan  and keep current  config
files working.  I  guess it could allow  either  '*' or '.'?   Since I
don't use the module, I'm not too concerned.