Subject: FVWM: Variable `$n' not found in fvwm manpage

From: [email-masked]
Date: Mon, 07 Jun 2004 20:40:08 +0800

Hi, everyone
Here is a function Michael wrote in thread:
http://www.hpc.uh.edu/fvwm/archive/0303/msg00020.html

  DestroyFunc FuncFvwmMaximizeFullScreen
  AddToFunc   FuncFvwmMaximizeFullScreen
  + I ThisWindow (Maximized) Style $n Title, Borders
  + I CondCase (NoMatch) Style $n NoTitle, !Borders
  + I CondCase (NoMatch) Raise
  + I CondCase (NoMatch) UpdateStyles
  + I Maximize

$n is the window's name, but it's not documented in fvwm manpage.

BTW, are there any other implicit variables?

Regards,
Liu Shidai

--
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: Mon, 7 Jun 2004 13:25:43 +0000

>   + I CondCase (NoMatch) UpdateStyles

This is an old sample that does not work anymore (CondCase renamed).

> $n is the window's name, but it's not documented in fvwm manpage.

This variable is not documented so you don't try to use it. Single letter
variables cause problems and will be removed after 2.6.x.

> BTW, are there any other implicit variables?

All variables are documented in the "COMMAND EXPANSION" man page section.
There are no exceptions, you may safely assume any undocumeted syntax as
unexisting.

In this case, please use $[w.name] that replaces the old name $n in both
2.4.x and 2.5.x.

And nowadays when we have WindowStyle command in 2.5.x, "Style $[w.name]"
is probably not what you want to use. Use this instead sample:

  DestroyFunc FuncFvwmMaximizeFullScreen
  AddToFunc   FuncFvwmMaximizeFullScreen
  + I ThisWindow (Maximized) WindowStyle Title, Borders
  + I TestRc (!Match) WindowStyle !Title, !Borders
  + I TestRc (!Match) Raise
  + I TestRc (!Match) UpdateStyles
  + I Maximize ewmhiwa

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 7 Jun 2004 15:21:05 +0200

> BTW, are there any other implicit variables?

The one letter variables are obsolete now and should be replaced
by their verbose couterparts, e.g. $n -> $[w.name].  I don't know
why the corresponding parts in the man page were removed.  They
should be kept for reference purposes.  

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 7 Jun 2004 13:52:05 +0000

> should be kept for reference purposes.  

Originally the usage of these obsolete variable names produced a warning
(that is better IMHO than documenting the obsoleteness in the man page),
but for some reason you commented these warnings out. :) I don't think
these variables should be silently accepted. A user have no real reason
to use the old names, the new ones are supported in 2.4.x.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 8 Jun 2004 13:01:15 +0200

> but for some reason you commented these warnings out. :)

Because there are far too many warnings in some setups.

> I don't think these variables should be silently accepted.

Okay, but a single warning after the config files have been
processed should be enough.

> A user have no real reason to use the old names, the new ones
> are supported in 2.4.x.

I agree.  But the fact that one has to replace $n with $[w.name]
etc. should be stated in the man page explicitly.

Ciao

Dominik ^_^  ^_^