Subject: Notification: incoming/692

From: [email-masked]
Date: Wed, 17 Jan 2001 12:41:59 -0600

FVWM Bug Tracking notification

new message incoming/692

Message summary for PR#692
	From: [email-masked]
	Subject: $d does not seem to expand
	Date: Wed, 17 Jan 2001 12:41:58 -0600
	0 replies 	0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

>From [email-masked] Wed Jan 17 12:41:59 2001
From: [email-masked]
To: [email-masked]
Subject: $d does not seem to expand
Date: Wed, 17 Jan 2001 12:41:58 -0600

Full_Name: Michael
Version: Fvwm Version 2.2.2 compiled on Aug 29 1999 at 02:36:42

CVS_Date: 
OS: Linux
X_Server: 
Submission from: (NULL) (18.56.0.48)

I can't seem to get the macro $d to expand in functions.  I have tried to
do this on two different
Linux systems without avail.  On the current system that I am using with
version Fvwm Version 2.2.2 and the following configuration file:

-----------------
Echo $d
Desk 0 1
Echo $d
Desk 0 0

AddToFunc MyFun
+       "I"     Echo $d
+       "I"     Desk 0 0

Key KP_1        A       CM      Desk 0 8

Key KP_0        A       CM      MyFun
-------------------------

The first Echo commands expand $d appropriately but when I switch to desk
8 by using the keyboard and then come back, $d always seems to expand to
0.  I have the same problem with the following version.

FVWM version 2.3.24 compiled on Nov 29 2000 at 08:28:37
with support for: ReadLine, RPlay, Stroke, XPM, GNOME WM hints, SM

In this case, the macros $[page.nx] and $[page.ny] expand fine, but $d
still always gives 0.

--
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: Thu, 18 Jan 2001 00:13:20 +0100

> version Fvwm Version 2.2.2 and the following configuration file:

The solution to your problem is:

  +       "I"     Echo $$d
                       ^^

but

  +       "I"     Echo $[page.nx]

or 

  +       "I"     Echo $c

I agree that this is very confusing, but it is not a bug.  The
idea is: Every single letter parameter that can be expanded in the
'+' function is expanded.  The desk number is known when the
'+' function is called, so $d is expanded immediately.  On the
other hand the class of the window is not known because '+' is
not called in a window context, so $c is not touched.  Parameters
enclosed in braces are a completely different story.  These are
never expanded in the '+' command.

The man page does not explain this in detail.  And - yes - it is
counter intuitive and confusing and probably braindead too.  I
would ditch the whole command line parser in the dumps and write a
new one if we didn't have to keep *backwards compatibility*.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [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: Dan Espen <[email-masked]>
Date: Wed, 17 Jan 2001 18:31:15 -0500

Dominik Vogt <[email-masked]> writes:
> I would ditch the whole command line parser in the dumps and write a

Don't feel too bad.

I think the odds are that the new language would be filled with
similar loopholes and exceptions.  Judging by most languages I
use, that seems to be the case.

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