using perl extenstions from scripts

Marc Lehmann schmorp at schmorp.de
Thu Jan 9 06:01:09 CET 2014


On Thu, Jan 09, 2014 at 01:33:55AM +0100, Michael Traxler <M.Traxler at gsi.de> wrote:
> >>note the different name of the function (on_osc_seq_perl is never called!).
> >on_osc_seq_perl is definitely being called, otherwise it couldn't have
> >been forwarded to your tab_osc_seq_perl from urxvt::ext::tabbedex::tab.
> 
> Here I can only report what I experience. If I put in tabbedex
> 
> sub on_osc_seq_perl {
>   print "reached on_osc_seq_perl\n";
> }

Again, thats  becaue you put it in the wrong place - you didn't put it into
the extensino, but into another package that urxvt knows nothing about and
will not call anything in.

BNote that tab_osc_seq_perl is also not called, until you tell the
extension to forward on_osc_seq_perl to it, so urxvt certainly calls
on_osc_seq_perl - nothing else would.

> I never get an output. If I use tab_osc_seq_perl it works!

No, you need to implement both tab_osc_seq_perl AND on_osc_seq_perl for this
to work. urxvt calls the latter, your code then forwards this to
tab_osc_seq_perl.

The problem is that tab_osc_seq_perl is wrong, as this event shouldn't be
handled by every tab, only by the main tabbed window. It's not a big deal,
but either you do it right, or somehow clean it up afterwards.

> In a new extension (from scratch, without the other stuff in tabbedex) this
> function on_osc_seq_perl works!

It works fine also in tabbedex, believe me. Just remove the forwarder you
added from on_osc_seq_perl to tab_osc_seq_perl and you will see it's no
longer called. That's because on_osc_seq_perl is called, not
tab_osc_seq_perl.

> How can I tell the method
> $self->new_tab;
> to directly start a certain command (after calling the standard shell of course).?

Just callinng "->new_tab (qw(-e /bin/zsh))" or so should work.

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




More information about the rxvt-unicode mailing list