Hi,

At first I thought the idea of implementing alias' was very good but I
fear that limiting it to the first word would be too limiting to be
really useful. Take for example:

*FvwmButtonsGeometry 520x100-1-1
*FvwmButtonsBack bisque3
*FvwmButtons(Padding 2 2 Container(Rows 1 Columns 4 Frame 1 Padding 10
0))
 *FvwmButtons(Frame -2 Container(Rows 5,Frame 1))

I would find it really useful to alias the above in to:

Alias FB *FvwmButtons
FBGeometry 520x100-1-
FBBack bisque
FB(Padding 2 2 Container ...)
FB(Frame -2 Container...)

However this implies a more preprocessor like parsing than direct
aliasing. To break the preprocessing approach we could take C style ##
to join an alias with some text:

FB##Geometry 520x100-1-
FB##Back bisque
FB(...
FB(...

Also, it would be really useful to do aliases with more than the first
word - take:

AddToMenu Red_Hat_Linux "Programs" Title
Style "*"           FocusFollowsMouse

It would be really useful to alias the first two args and make the
config much more readable to new users:

Alias AddToLinux AddToMenu Red_Hat_Linux
Alias DefStyle Style "*"
AddToLinux "Programs" Title
DefStyle           FocusFollowsMouse

This kind of ability would be much more useful than straight aliases.

However, Alias' are typically a poor mans solution to other problems.
For example, a better functionality would be to implement a "With XXX
...." functionality which would also constrain the impact to the area of
the file instead of being applied globally:

With *FvwmButtons
    Geometry 520x100-1-1
    Back bisque3
    (Padding 2 2 Container(Rows 1 Columns 4 Frame 1 Padding 10 0))
    (Frame -2 Container(Rows 5,Frame 1))
EndWith

Perhaps there is a place for alias' but there are also other solutions
to problems that Alias are often used to solve.  In general constructs
that have global scope are misused. Perhaps constraining it to one word
will prevent abuse and then implementing better solutions that people
can use to solve different problems would be a good approach? Another
constraint could be to limit an alias to the file that it is defined in
like static in C.

This is somewhat of a brain dump so forgive me for being verbose and on
several tangents.....
Cheers
Dave
Dominik Vogt wrote:

> I'd like to add command name aliases to fvwm, e.g.
>
>   Alias GotoDesk MyGotoDesk
>
> and to get the builtin command:
>
>   Builtin GotoDesk
>
> and of course
>
>   Unalias GotoDesk
>
> This way it would be possible to replace a builtin command with a
> specifically tuned complex function.  Is that a good idea?  I
> think alias expansion should be done for the first word on the
> command line only and before anything else.  That feature would
> certainly add a lot of flexibility as well as unlimited ways to
> break your config.
>
> Bye
>
> Dominik ^_^  ^_^
>
> --
> Dominik Vogt, email: [EMAIL PROTECTED]
> LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
> fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
> --
> 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 PROTECTED]
> To report problems, send mail to [EMAIL PROTECTED]

--
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 PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to