On Tue, Dec 16, 2014 at 10:50:32PM -0500, William Totten <[email protected]> 
wrote:
>  1) Is this something people would like to distribute with the other
>     rxvt-unicode perl extensions?

If "people" means the rxvt-unicode maintainers, then our plans are to reduce
the number of extensions distributed with the package to the ones we
maintain ourselves, for a variety of reasons.

Our current plan is to introduce the ability to install extensions via CPAN
in the next or next-next release, so everybody can easily push urxvt
extensions via a common repository.

>  2) Are there any suggestions on a better way to run screen without
>     having to start a shell, then exec screen?

Bertrand nailed it.

As for:

3) Any critique/suggestions for the extension I didn't ask for?

The extension looks quite interesting, especially as it apparently
"automatically" senses screen. Some things really should be done
differently though:

                select(undef, undef, undef, $LATENCY);

I don't know how long $LATENCY typically us, but this freezes all urxvt
windows for the given time. The correct solution is to use a timer (via
the urxvt::timer class), i.e. something like:

   $self->{delayed_osc_response} = urxvt::timer
      ->new
      ->after ($LATENCY)
      ->cb (sub {
         delete $self->{delayed_osc_response};
         $self->screen (...);
         $self->init_screen;
      });

Also, $LATENCY is a global variable, and it is not the only one:

                $VSPLIT=1                               if($version>4.00);
                $FASTFOCUS=1                            if($version>4.01);
                $SILENTOPS=1                            if($version>4.01);
                $SO='rendition so'                      if($version>4.01);

This means that one invocation will overwrite the data of the
previous one. The correct solution would be to store all this data in
$self->{latency}, $self->{vsplit} and so on. Global variables must only be
used for behaviour that must needs be the same among all instances (for
example, %SCREEN_CMAP is read-only afaics and can be shared).

And lastly, a nitpick:

                &screen($self, ':mousetrack off')       if($version>4.01);

The perl 4 call syntax is deprecated and not needed since, whew,
1994. Since screen really is a method, this would be a more natural (but
not more correct) thing to do:

                $self->screen (':mousetrack off')       if($version>4.01);

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to