Hi,

On Wed, Feb 24, 2016 at 02:32:27AM -0800, Michael Stapelberg wrote:
> Hey,
> 
> please consider merging the patch you can find attached.
> 
> From the commit message:
> 
> With this patch, users can specify function names prefixed by “func:”,
> e.g.:
> 
>   URxvt.matcher.button:     2
>   URxvt.matcher.pattern.1:  ^([^ ]+):(\\d+)
>   URxvt.matcher.launcher.1: func:urxvt::ext::inplace_vim::launch
> 
> When launching, instead of forking and exec()ing, urxvt will call the
> specified function instead.
> 
> In the example above, a separate extension called inplace_vim defines
> the following function:
> 
>   sub launch {
>       my ($self, $file, $line) = @_;
>       $self->tt_write($self->locale_encode("vim $file +$line\n"));
>   }
> 
> With that configuration, middle-clicking on a “filename:line” pair (such
> as output by grep -n) will simulate typing “vim filename +line\n”.

thanks for the patch. The idea seems resonable, but the patch has a few
problems. First, it extends only button_release for the case of @exec
being a sub, which breaks all the other exec_async calls. Then, I also
don't see the need for creating a sub in find_matches. I would find it
simpler and cleaner to replace all the exec_async calls with calls to a
new function that uses either eval or exec_async on the @exec array.

Emanuele

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

Reply via email to