ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] Patch for frames et al...


From: Mike Meyer
Subject: Re: [RP] Patch for frames et al...
Date: Sat Nov 3 11:29:04 2001

Ryan Yeske <address@hidden> types:
> Mike Meyer <address@hidden> writes:
> > One of the goals when I rewrote all the commands to output values was
> > making the commands not need to change their behavior depending on
> > whether they are interactive or not. To do that means the output needs
> > to be verbose enough for humans reading it interactively, but regular
> > enough that scripts can pull the value out.
> I can sympathize with the goal of keeping the code simple, but
> outputting the same text for interactive and non-interactive calls
> compromises both.

The real question is whether or not a compromise can be found that is
acceptable. Finding such a compromise reduces the amount of code that
deals with such by a factor of 30 or so, which is a worthwhile goal.

> > How about a third alternative: the commands output the command that
> > would set the variable to it's current value? That would make your
> > script even easier, is understandable by humans, and it's still easy
> > to pull out just the value if you wanted that for some reason.
> Why craft a one size fits all solution?  Clearly, the right thing for
> non-interactive use is not the same as the right thing for interactive
> use.

Not quite. Clearly, the *best* thing for non-interactive use is not
the best thing for interactive use. There's obviously more than one
right thing for interactive use, as we're dealing with a natural
language. There may be more than one right thing for non-interactive
use as well. For example, if the primary use of pulling the values out
is to restore that value latter, then the best solution would be just
to provide the command.

As far as I'm concerned, the real question is how little you can get
away with in interactive use. I mean, if I just did a ":defwinfmt" and
see "%n%s%t", then I know what it is. However, I may do a "last
message" later, and not know if it's the windows or frame format. Then
again, if I care, I can just issue the command I'm interested
in. Adding the command that set it - meaning doing one of the two
right things for non-interactive use - makes it quite usable for
interactive use.

        <mike
--
Mike Meyer <address@hidden>                     http://www.mired.org/home/mwm/
Q: How do you make the gods laugh?              A: Tell them your plans.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]