*** empty log message ***
authorroot <root>
Fri, 13 Jan 2006 01:09:37 +0000 (01:09 +0000)
committerroot <root>
Fri, 13 Jan 2006 01:09:37 +0000 (01:09 +0000)
doc/rxvtperl.3.html
doc/rxvtperl.3.man.in
doc/rxvtperl.3.txt
src/perl/selection-autotransform
src/urxvt.pm

index 7f56933c2fd1a693177f6bea2d503b0dbd2fa216..88b9905ae3ea09206e7f409707455976fd0a7796 100644 (file)
@@ -204,6 +204,20 @@ paste directly into your (vi :) editor:</p>
 <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>
index ec48bd20a9c7a35e0994a1d76d55c3ff2c57329e..70b1de2eb59a8287d0020233c9048b2bebfc4918 100644 (file)
 .\" ========================================================================
 .\"
 .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"
@@ -270,6 +270,18 @@ paste directly into your (vi :) editor:
 .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
index 93287741d37dbc14f41a6bd6cc09abee17b946ba..9adc7990af6cd7816466a6bba112a6d4a81fb9a5 100644 (file)
@@ -115,6 +115,16 @@ PREPACKAGED EXTENSIONS
         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
index db829d5185092c06b1c6bfc6a32c9d1a7efa5a98..6a80b596079e939e574194a8f0de8e8e05b40c0b 100644 (file)
@@ -20,6 +20,7 @@ sub on_init {
    }
 
    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) {
@@ -44,9 +45,8 @@ sub on_sel_grab {
          $self->selection ($_);
          s/[\x00-\x1f\x80-\x9f]/ยท/g;
          $self->msg ($self->special_encode ("auto-transformed to $_"));
+         last;
       }
-
-      last;
    }
       
    ()
index 94dac8ec33f8fab31a97399db88398f0fb5400dd..f43bbd3a20b413f0c432340e7b3f376906e02cf3 100644 (file)
@@ -131,6 +131,16 @@ paste directly into your (vi :) editor:
 
 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