<dd>
<p>Of course, this can be modified to suit your needs and your editor :)</p>
</dd>
+<dd>
+<p>To expand the example above to typical perl error messages (``XXX at
+FILENAME line YYY.''), you need a slightly more elaborate solution:</p>
+</dd>
+<dd>
+<pre>
+ URxvt.selection.pattern-0: ( at .*? line \\d+\\.)
+ URxvt.selection-autotransform.0: s/^ at (.*?) line (\\d+)\\.$/\x1b:e \\Q$1\E\\x0d:$2\\x0d/</pre>
+</dd>
+<dd>
+<p>The first line tells the selection code to treat the unchanging part of
+every error message as a selection pattern, and the second line transforms
+the message into vi commands to load the file.</p>
+</dd>
<p></p>
<dt><strong><a name="item_mark_2durls">mark-urls</a></strong><br />
</dt>
.\" ========================================================================
.\"
.IX Title "rxvt 3"
-.TH rxvt 3 "2006-01-12" "7.0" "RXVT-UNICODE"
+.TH rxvt 3 "2006-01-13" "7.0" "RXVT-UNICODE"
.SH "NAME"
@@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter
.SH "SYNOPSIS"
.Ve
.Sp
Of course, this can be modified to suit your needs and your editor :)
+.Sp
+To expand the example above to typical perl error messages (\*(L"\s-1XXX\s0 at
+\&\s-1FILENAME\s0 line \s-1YYY\s0.\*(R"), you need a slightly more elaborate solution:
+.Sp
+.Vb 2
+\& URxvt.selection.pattern-0: ( at .*? line \e\ed+\e\e.)
+\& URxvt.selection-autotransform.0: s/^ at (.*?) line (\e\ed+)\e\e.$/\ex1b:e \e\eQ$1\eE\e\ex0d:$2\e\ex0d/
+.Ve
+.Sp
+The first line tells the selection code to treat the unchanging part of
+every error message as a selection pattern, and the second line transforms
+the message into vi commands to load the file.
.IP "mark-urls" 4
.IX Item "mark-urls"
Uses per-line display filtering (\f(CW\*(C`on_line_update\*(C'\fR) to underline urls and
Of course, this can be modified to suit your needs and your editor
:)
+ To expand the example above to typical perl error messages ("XXX at
+ FILENAME line YYY."), you need a slightly more elaborate solution:
+
+ URxvt.selection.pattern-0: ( at .*? line \\d+\\.)
+ URxvt.selection-autotransform.0: s/^ at (.*?) line (\\d+)\\.$/\x1b:e \\Q$1\E\\x0d:$2\\x0d/
+
+ The first line tells the selection code to treat the unchanging part
+ of every error message as a selection pattern, and the second line
+ transforms the message into vi commands to load the file.
+
mark-urls
Uses per-line display filtering ("on_line_update") to underline urls
and make them clickable. When middle-clicked, the program specified
}
for (my $idx = 0; defined (my $res = urxvt::untaint $self->x_resource ("selection-autotransform.$idx")); $idx++) {
+ warn "<<<$idx:$res>>>\n";#d#
my $transform = eval "sub { $res }";
if ($transform) {
$self->selection ($_);
s/[\x00-\x1f\x80-\x9f]/ยท/g;
$self->msg ($self->special_encode ("auto-transformed to $_"));
+ last;
}
-
- last;
}
()
Of course, this can be modified to suit your needs and your editor :)
+To expand the example above to typical perl error messages ("XXX at
+FILENAME line YYY."), you need a slightly more elaborate solution:
+
+ URxvt.selection.pattern-0: ( at .*? line \\d+\\.)
+ URxvt.selection-autotransform.0: s/^ at (.*?) line (\\d+)\\.$/\x1b:e \\Q$1\E\\x0d:$2\\x0d/
+
+The first line tells the selection code to treat the unchanging part of
+every error message as a selection pattern, and the second line transforms
+the message into vi commands to load the file.
+
=item mark-urls
Uses per-line display filtering (C<on_line_update>) to underline urls and