Re: FVWM: Re: parsing in restart_function() in fvwm/builtins.c?

From: Dan Astoorian <djast_at_ppp12.utopia.csas.com>
Date: Thu, 21 Aug 1997 23:16:17 -0400

On Thu, 21 Aug 1997 22:04:31 EDT, Bob Woodside writes:
>
>On Wed, 20 Aug 1997, Dan Astoorian <djast_at_ppp12.utopia.csas.com> wrote:
>
>> Would it break anything if restart_function() were changed to parse out
>> the first word after the command?
>
>
> I wouldn't recommend changing the restart function to compensate for
>a bug in the FvwmButtons interface (if that were the case): that would be
>degrading code that's working nicely instead of fixing what's broken.

Well, I still think it's a bug, if for no other reason than that its
behaviour seems inconsistent with the way other FVWM commands work; for
example,
    Restart twm

works, while
    Restart "twm"

tries to run an executable with quotes in its name. Moreover, I can't
think of any practical case where *not* parsing produces more desirable
behaviour than parsing (ask yourself: is it *reasonable* for fvwm2 to
try to exec command names with embedded newlines, spaces, or quotes?)

Granted, modules probably shouldn't be sending commands with newlines
embedded in them, and it's not specifically documented what fvwm2 should
do when that happens. Personally, I think it would be a good thing in
theory if packets from modules were treated as small .fvwm2rc files;
this would allow multiple commands to be sent in a single packet by
separating them with newlines. However, I haven't looked into how much
effort it would take to implement this.

Anyways, just my $0.02.

> However, I think that if you try something along the following lines
>you'll be more than satisfied with the result:
>
> *FvwmButtons(Title Restart, Icon icon.xpm, Action "Restart fvwm2")

Thanks for the workaround. (In case it's not obvious, my configuration
for FvwmButtons was derived from my configuration for fvwm-1.24's
GoodStuff module, before this syntax was introduced.)

-- People shouldn't think that it's better to have
Dan Astoorian loved and lost than never loved at all. It's
http://www.utopia.csas.com not, it's better to have loved and won. All
djast_at_utopia.csas.com the other options really suck. --Dan Redican

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu Aug 21 1997 - 22:44:59 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:00 BST