Subject: Question on config line parsing

From: Matthias Clasen <[email-masked]>
Date: Wed, 12 May 1999 00:29:19 +0200

Some examples from the FvwmEvent man page don't work any more:

eg 

*FvwmEventCmd Echo
*FvwmEvent focus_change "focus change"

yields

[FVWM][Echo]:  "focus

The problem seems to be that fvwm is escaping the quotes when sending
the config lines to modules, thus GetNextSimpleOption in FvwmEvent doesn't
recognize them as quotes. As a quick fix, we could change

GetNextSimpleOption (p, &action) 

in FvwmEvent.c to

action = strdup (p)

this simply treats the rest of the line as action and thus doesn't stop
at whitespace. It doesn't work perfectly with the above example either,
because we now have the problem that fvwm litters the command with escapes,
and we get

[FVWM][Echo]:  \"focus change\"

Is there a better solution ?

-- 
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: Dominik Vogt <[email-masked]>
Date: Wed, 12 May 1999 12:33:40 +0200

> *FvwmEvent focus_change "focus change"

Do you know when this worked last?

Bye

Dominik ^_^

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
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: Matthias Clasen <[email-masked]>
Date: Wed, 12 May 1999 19:38:34 +0200

> Do you know when this worked last?

No.

---

From: Matthias Clasen <[email-masked]>
Date: Wed, 12 May 1999 21:50:07 +0200

> Do you know when this worked last?

A minute ago :-( Sorry, my mistake. There is no problem with FvwmEvent or
fvwms config line handling. 

The problem
is that I was creating the *FvwmEvent config info via the FormFvwmTalk.
dialog and it turns out that FvwmForm escapes " and the like before
sending commands to fvwm. Why does it do that ? This means I have no
chance to send

to fvwm. It gets transformed into 

*FvwmEvent focus_change \"focus change\"

which is not what I want. The escaping may be necessary if you want
to feed the command to a shell, but for fvwm commands it is evil.

---

From: Dan Espen <[email-masked]>
Date: Wed, 12 May 1999 16:15:45 -0400

> to feed the command to a shell, but for fvwm commands it is evil.

I think I agree. It looks simple enough to remove, and its not
documented behavior.  Can anyone else guess why this was being done?

It doesn't look like its necessary for shell commands either.
If I type:

!echo "hello there"

I want to see:

hello there

not

"hello there"

--
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]