From 59bb5cdfd49b11b016e7484907f93a1045453ea5 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 12 Jan 2006 05:37:34 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 3 -- README.FAQ | 22 ++++++++++++ doc/rxvt.1.html | 7 ++++ doc/rxvt.1.man.in | 6 +++- doc/rxvt.1.pod | 5 +++ doc/rxvt.1.txt | 4 +++ doc/rxvt.7.html | 30 ++++++++++++++++ doc/rxvt.7.man.in | 26 +++++++++++++- doc/rxvt.7.pod | 22 ++++++++++++ doc/rxvt.7.txt | 22 ++++++++++++ doc/rxvtperl.3.html | 63 +++++++++++++++++++++++---------- doc/rxvtperl.3.man.in | 64 +++++++++++++++++++++++----------- doc/rxvtperl.3.txt | 64 +++++++++++++++++++++++----------- src/perl/searchable-scrollback | 24 ++++--------- src/urxvt.pm | 31 ++++++++++------ 15 files changed, 298 insertions(+), 95 deletions(-) diff --git a/Changes b/Changes index 71e979ab..85c149e8 100644 --- a/Changes +++ b/Changes @@ -13,9 +13,6 @@ WISH: just for fun, do shade and tint with XRender. WISH: support tex fonts 7.0 -TODO: document searchable-scorllback hotkey -TODO: double-click and right-extend -TODO: change scrollback to use cursor movements - added sections for DISTRIBUTION MAINTAINERS and about SETUID/SETGID to the FAQ. - selection, searchable-scrollback, selection-popup and diff --git a/README.FAQ b/README.FAQ index 9fb334bd..2685bde8 100644 --- a/README.FAQ +++ b/README.FAQ @@ -1,4 +1,26 @@ FREQUENTLY ASKED QUESTIONS + I don't like the new selection/popups/hotkeys/perl, how do I + change/disable it? + You can disable the perl extension completely by setting the + perl-ext-common resource to the empty string, which also keeps + rxvt-unicode from initialising perl, saving memory. + + If you only want to disable specific features, you first have to + identify which perl extension is responsible. For this, read the + section PREPACKAGED EXTENSIONS in the rxvtperl(3) manpage. For + example, to disable the selection-popup and option-popup, specify + this perl-ext-common resource: + + URxvt.perl-ext-common: default,-selection-popup,-option-popup + + This will keep the default extensions, but disable the two popup + extensions. Some extensions can also be configured, for example, + scrollback search mode is triggered by M-s. You can move it to any + other combination either by setting the searchable-scrollback + resource: + + URxvt.searchable-scrollback: CM-s + Isn't rxvt supposed to be small? Don't all those features bloat? I often get asked about this, and I think, no, they didn't cause extra bloat. If you compare a minimal rxvt and a minimal urxvt, you diff --git a/doc/rxvt.1.html b/doc/rxvt.1.html index 08fa8a16..817b9a7c 100644 --- a/doc/rxvt.1.html +++ b/doc/rxvt.1.html @@ -1496,6 +1496,13 @@ will be ignored when running setuid/setgid.

See the rxvtperl(3) manpage.

+
searchable-scrollback: keysym
+
+
+Sets the hotkey that starts the incremental scrollback buffer search +(default: M-s). +
+

urlLauncher: string
diff --git a/doc/rxvt.1.man.in b/doc/rxvt.1.man.in index f05c7a94..a6a33b8d 100644 --- a/doc/rxvt.1.man.in +++ b/doc/rxvt.1.man.in @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "rxvt 1" -.TH rxvt 1 "2006-01-11" "7.0" "RXVT-UNICODE" +.TH rxvt 1 "2006-01-12" "7.0" "RXVT-UNICODE" .SH "NAME" rxvt\-unicode (ouR XVT, unicode) \- (a VT102 emulator for the X window system) .SH "SYNOPSIS" @@ -1140,6 +1140,10 @@ scripts. When looking for extensions specified by the \f(CW\*(C`perl\*(C'\fR res will be ignored when running setuid/setgid. .Sp See the @@RXVT_NAME@@\fIperl\fR\|(3) manpage. +.IP "\fBsearchable\-scrollback:\fR \fIkeysym\fR" 4 +.IX Item "searchable-scrollback: keysym" +Sets the hotkey that starts the incremental scrollback buffer search +(default: \f(CW\*(C`M\-s\*(C'\fR). .IP "\fBurlLauncher\fR: \fIstring\fR" 4 .IX Item "urlLauncher: string" Specifies the program to be started with a \s-1URL\s0 argument. Used by the diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod index b612d9bf..0887d078 100644 --- a/doc/rxvt.1.pod +++ b/doc/rxvt.1.pod @@ -1117,6 +1117,11 @@ will be ignored when running setuid/setgid. See the @@RXVT_NAME@@perl(3) manpage. +=item B I + +Sets the hotkey that starts the incremental scrollback buffer search +(default: C). + =item B: I Specifies the program to be started with a URL argument. Used by the diff --git a/doc/rxvt.1.txt b/doc/rxvt.1.txt index 5a873343..1016d462 100644 --- a/doc/rxvt.1.txt +++ b/doc/rxvt.1.txt @@ -975,6 +975,10 @@ RESOURCES (available also as long-options) See the rxvtperl(3) manpage. + searchable-scrollback: *keysym* + Sets the hotkey that starts the incremental scrollback buffer search + (default: "M-s"). + urlLauncher: *string* Specifies the program to be started with a URL argument. Used by the "selection-popup" and "mark-urls" perl extensions. diff --git a/doc/rxvt.7.html b/doc/rxvt.7.html index 479d9b32..97b522d6 100644 --- a/doc/rxvt.7.html +++ b/doc/rxvt.7.html @@ -75,6 +75,36 @@ also available on the World Wide Web at

FREQUENTLY ASKED QUESTIONS

+
I don't like the new selection/popups/hotkeys/perl, how do I +change/disable it?
+
+
+You can disable the perl extension completely by setting the +perl-ext-common resource to the empty string, which also keeps +rxvt-unicode from initialising perl, saving memory. +
+
+

If you only want to disable specific features, you first have to +identify which perl extension is responsible. For this, read the section +PREPACKAGED EXTENSIONS in the rxvtperl(3) manpage. For +example, to disable the selection-popup and option-popup, specify +this perl-ext-common resource:

+
+
+
+   URxvt.perl-ext-common: default,-selection-popup,-option-popup
+
+
+

This will keep the default extensions, but disable the two popup +extensions. Some extensions can also be configured, for example, +scrollback search mode is triggered by M-s. You can move it to any +other combination either by setting the searchable-scrollback resource:

+
+
+
+   URxvt.searchable-scrollback: CM-s
+
+

Isn't rxvt supposed to be small? Don't all those features bloat?
diff --git a/doc/rxvt.7.man.in b/doc/rxvt.7.man.in index 39b90dcb..b74ef3dc 100644 --- a/doc/rxvt.7.man.in +++ b/doc/rxvt.7.man.in @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "rxvt 7" -.TH rxvt 7 "2006-01-11" "7.0" "RXVT-UNICODE" +.TH rxvt 7 "2006-01-12" "7.0" "RXVT-UNICODE" .SH "NAME" RXVT REFERENCE \- FAQ, command sequences and other background information .SH "SYNOPSIS" @@ -158,6 +158,30 @@ also available on the World Wide Web at . .SH "FREQUENTLY ASKED QUESTIONS" .IX Header "FREQUENTLY ASKED QUESTIONS" +.IP "I don't like the new selection/popups/hotkeys/perl, how do I change/disable it?" 4 +.IX Item "I don't like the new selection/popups/hotkeys/perl, how do I change/disable it?" +You can disable the perl extension completely by setting the +\&\fBperl-ext-common\fR resource to the empty string, which also keeps +rxvt-unicode from initialising perl, saving memory. +.Sp +If you only want to disable specific features, you first have to +identify which perl extension is responsible. For this, read the section +\&\fB\s-1PREPACKAGED\s0 \s-1EXTENSIONS\s0\fR in the @@RXVT_NAME@@\fIperl\fR\|(3) manpage. For +example, to disable the \fBselection-popup\fR and \fBoption-popup\fR, specify +this \fBperl-ext-common\fR resource: +.Sp +.Vb 1 +\& URxvt.perl-ext-common: default,-selection-popup,-option-popup +.Ve +.Sp +This will keep the default extensions, but disable the two popup +extensions. Some extensions can also be configured, for example, +scrollback search mode is triggered by \fBM\-s\fR. You can move it to any +other combination either by setting the \fBsearchable-scrollback\fR resource: +.Sp +.Vb 1 +\& URxvt.searchable-scrollback: CM-s +.Ve .IP "Isn't rxvt supposed to be small? Don't all those features bloat?" 4 .IX Item "Isn't rxvt supposed to be small? Don't all those features bloat?" I often get asked about this, and I think, no, they didn't cause extra diff --git a/doc/rxvt.7.pod b/doc/rxvt.7.pod index 97bbc10b..51ade03f 100644 --- a/doc/rxvt.7.pod +++ b/doc/rxvt.7.pod @@ -26,6 +26,28 @@ L. =over 4 +=item I don't like the new selection/popups/hotkeys/perl, how do I +change/disable it? + +You can disable the perl extension completely by setting the +B resource to the empty string, which also keeps +rxvt-unicode from initialising perl, saving memory. + +If you only want to disable specific features, you first have to +identify which perl extension is responsible. For this, read the section +B in the @@RXVT_NAME@@perl(3) manpage. For +example, to disable the B and B, specify +this B resource: + + URxvt.perl-ext-common: default,-selection-popup,-option-popup + +This will keep the default extensions, but disable the two popup +extensions. Some extensions can also be configured, for example, +scrollback search mode is triggered by B. You can move it to any +other combination either by setting the B resource: + + URxvt.searchable-scrollback: CM-s + =item Isn't rxvt supposed to be small? Don't all those features bloat? I often get asked about this, and I think, no, they didn't cause extra diff --git a/doc/rxvt.7.txt b/doc/rxvt.7.txt index becc43da..257ec8aa 100644 --- a/doc/rxvt.7.txt +++ b/doc/rxvt.7.txt @@ -20,6 +20,28 @@ DESCRIPTION . FREQUENTLY ASKED QUESTIONS + I don't like the new selection/popups/hotkeys/perl, how do I + change/disable it? + You can disable the perl extension completely by setting the + perl-ext-common resource to the empty string, which also keeps + rxvt-unicode from initialising perl, saving memory. + + If you only want to disable specific features, you first have to + identify which perl extension is responsible. For this, read the + section PREPACKAGED EXTENSIONS in the rxvtperl(3) manpage. For + example, to disable the selection-popup and option-popup, specify + this perl-ext-common resource: + + URxvt.perl-ext-common: default,-selection-popup,-option-popup + + This will keep the default extensions, but disable the two popup + extensions. Some extensions can also be configured, for example, + scrollback search mode is triggered by M-s. You can move it to any + other combination either by setting the searchable-scrollback + resource: + + URxvt.searchable-scrollback: CM-s + Isn't rxvt supposed to be small? Don't all those features bloat? I often get asked about this, and I think, no, they didn't cause extra bloat. If you compare a minimal rxvt and a minimal urxvt, you diff --git a/doc/rxvtperl.3.html b/doc/rxvtperl.3.html index 6dbda25b..141b077a 100644 --- a/doc/rxvtperl.3.html +++ b/doc/rxvtperl.3.html @@ -87,9 +87,14 @@ find them in /opt/rxvt/lib/urxvt/perl/.

(More) intelligent selection. This extension tries to be more intelligent -when the user extends selections (double-click). Right now, it tries to -select urls and complete shell-quoted arguments, which is very convenient, -too, if your ls supports --quoting-style=shell. +when the user extends selections (double-click and further clicks). Right +now, it tries to select words, urls and complete shell-quoted +arguments, which is very convenient, too, if your ls supports +--quoting-style=shell. +
+
+

A double-click usually selects the word under the cursor, further clicks +will enlarge the selection.

It also offers the following bindable keyboard command:

@@ -124,14 +129,18 @@ evalution, web-browser starting etc.), depending on content.
Adds regex search functionality to the scrollback buffer, triggered -by a hotkey (default: M-s). When in search mode, normal terminal -input/output is suspended. +by a hotkey (default: M-s). While in search mode, normal terminal +input/output is suspended and a regex is displayed at the bottom of the +screen.
-

/ starts an incremental regex search, n searches further, p or -N jump to the previous match, G jumps to the bottom and clears the -history, enter leaves search mode at the current position and escape -returns to the original position.

+

Inputting characters appends them to the regex and continues incremental +search. BackSpace removes a character from the regex, Up and Down +search upwards/downwards in the scrollback buffer, End jumps to the +bottom. Escape leaves search mode and returns to the point where search +was started, while Enter or Return stay at the current position and +additionally stores the first match in the current line into the primary +selection.

digital-clock
@@ -144,8 +153,9 @@ Displays a digital clock using the built-in overlay.
Uses per-line display filtering (on_line_update) to underline urls and -make them clickable. When clicked, the program specified in the resource -urlLauncher (default x-www-browser) will be started. +make them clickable. When middle-clicked, the program specified in the +resource urlLauncher (default x-www-browser) will be started with +the URL as first argument.

block-graphics-to-ascii
@@ -305,7 +315,9 @@ by calling $term->selection. Called whenever the user tries to extend the selection (e.g. with a double click) and is either supposed to return false (normal operation), or should extend the selection itelf and return true to suppress the built-in -processing. +processing. This can happen multiple times, as long as the callback +returns true, it will be called on every further click by the user and is +supposed to enlarge the selection more and more, if possible.

See the selection example extension.

@@ -738,11 +750,21 @@ Return the current values of the selection mark, begin or end positions, and optionally set them to new values.

+
$term->selection_make ($eventtime[, $rectangular])
+
+
+Tries to make a selection as set by selection_beg and +selection_end. If $rectangular is true (default: false), a +rectangular selection will be made. This is the prefered function to make +a selection. +
+

$success = $term->selection_grab ($eventtime)
-Try to request the primary selection from the server (for example, as set -by the next method). +Try to request the primary selection text from the server (for example, as +set by the next method). No visual feedback will be given. This function +is mostly useful from within on_sel_grab hooks.

$oldtext = $term->selection ([$newtext])
@@ -831,8 +853,8 @@ Convert the given locale-encoded octets into a perl string.
XORs the rendition values in the given span with the provided value -(default: RS_RVid). Useful in refresh hooks to provide effects similar -to the selection. +(default: RS_RVid), which MUST NOT contain font styles. Useful in +refresh hooks to provide effects similar to the selection.

$term->scr_xor_rect ($beg_row, $beg_col, $end_row, $end_col[, $rstyle1[, $rstyle2]])
@@ -841,7 +863,7 @@ to the selection. Similar to scr_xor_span, but xors a rectangle instead. Trailing whitespace will additionally be xored with the $rstyle2, which defaults to RS_RVid | RS_Uline, which removes reverse video again and underlines -it instead. +it instead. Both styles MUST NOT contain font styles.

$term->scr_bell
@@ -1079,7 +1101,8 @@ Return the row number of the first/last row of the line, respectively.
Returns the character offset of the given row|col pair within the logical -line. +line. Works for rows outside the line, too, and returns corresponding +offsets outside the string.

($row, $col) = $line->coord_of ($offset)
@@ -1317,7 +1340,9 @@ numbers indicate more verbose output.

>= 3 - script loading and management
-
>=10 - all events received
+
>=10 - all called hooks
+
+
>=11 - hook reutrn values

diff --git a/doc/rxvtperl.3.man.in b/doc/rxvtperl.3.man.in index fc0d7d27..e1bfa50f 100644 --- a/doc/rxvtperl.3.man.in +++ b/doc/rxvtperl.3.man.in @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "rxvt 3" -.TH rxvt 3 "2006-01-11" "6.3" "RXVT-UNICODE" +.TH rxvt 3 "2006-01-12" "7.0" "RXVT-UNICODE" .SH "NAME" @@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter .SH "SYNOPSIS" @@ -175,9 +175,13 @@ You can activate them like this: .IP "selection (enabled by default)" 4 .IX Item "selection (enabled by default)" (More) intelligent selection. This extension tries to be more intelligent -when the user extends selections (double\-click). Right now, it tries to -select urls and complete shell-quoted arguments, which is very convenient, -too, if your \fIls\fR supports \f(CW\*(C`\-\-quoting\-style=shell\*(C'\fR. +when the user extends selections (double\-click and further clicks). Right +now, it tries to select words, urls and complete shell-quoted +arguments, which is very convenient, too, if your \fIls\fR supports +\&\f(CW\*(C`\-\-quoting\-style=shell\*(C'\fR. +.Sp +A double-click usually selects the word under the cursor, further clicks +will enlarge the selection. .Sp It also offers the following bindable keyboard command: .RS 4 @@ -203,21 +207,26 @@ evalution, web-browser starting etc.), depending on content. .IP "searchable\-scrollback (enabled by default)" 4 .IX Item "searchable-scrollback (enabled by default)" Adds regex search functionality to the scrollback buffer, triggered -by a hotkey (default: \f(CW\*(C`M\-s\*(C'\fR). When in search mode, normal terminal -input/output is suspended. +by a hotkey (default: \f(CW\*(C`M\-s\*(C'\fR). While in search mode, normal terminal +input/output is suspended and a regex is displayed at the bottom of the +screen. .Sp -\&\f(CW\*(C`/\*(C'\fR starts an incremental regex search, \f(CW\*(C`n\*(C'\fR searches further, \f(CW\*(C`p\*(C'\fR or -\&\f(CW\*(C`N\*(C'\fR jump to the previous match, \f(CW\*(C`G\*(C'\fR jumps to the bottom and clears the -history, \f(CW\*(C`enter\*(C'\fR leaves search mode at the current position and \f(CW\*(C`escape\*(C'\fR -returns to the original position. +Inputting characters appends them to the regex and continues incremental +search. \f(CW\*(C`BackSpace\*(C'\fR removes a character from the regex, \f(CW\*(C`Up\*(C'\fR and \f(CW\*(C`Down\*(C'\fR +search upwards/downwards in the scrollback buffer, \f(CW\*(C`End\*(C'\fR jumps to the +bottom. \f(CW\*(C`Escape\*(C'\fR leaves search mode and returns to the point where search +was started, while \f(CW\*(C`Enter\*(C'\fR or \f(CW\*(C`Return\*(C'\fR stay at the current position and +additionally stores the first match in the current line into the primary +selection. .IP "digital-clock" 4 .IX Item "digital-clock" Displays a digital clock using the built-in overlay. .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 -make them clickable. When clicked, the program specified in the resource -\&\f(CW\*(C`urlLauncher\*(C'\fR (default \f(CW\*(C`x\-www\-browser\*(C'\fR) will be started. +make them clickable. When middle\-clicked, the program specified in the +resource \f(CW\*(C`urlLauncher\*(C'\fR (default \f(CW\*(C`x\-www\-browser\*(C'\fR) will be started with +the \s-1URL\s0 as first argument. .IP "block-graphics-to-ascii" 4 .IX Item "block-graphics-to-ascii" A not very useful example of filtering all text output to the terminal, @@ -341,7 +350,9 @@ Returning a true value aborts selection grabbing. It will still be hilighted. Called whenever the user tries to extend the selection (e.g. with a double click) and is either supposed to return false (normal operation), or should extend the selection itelf and return true to suppress the built-in -processing. +processing. This can happen multiple times, as long as the callback +returns true, it will be called on every further click by the user and is +supposed to enlarge the selection more and more, if possible. .Sp See the \fIselection\fR example extension. .ie n .IP "on_view_change $term\fR, \f(CW$offset" 4 @@ -685,11 +696,19 @@ set it (which is usually bad as applications don't expect that). .PD Return the current values of the selection mark, begin or end positions, and optionally set them to new values. +.ie n .IP "$term\->selection_make ($eventtime[, $rectangular])" 4 +.el .IP "$term\->selection_make ($eventtime[, \f(CW$rectangular\fR])" 4 +.IX Item "$term->selection_make ($eventtime[, $rectangular])" +Tries to make a selection as set by \f(CW\*(C`selection_beg\*(C'\fR and +\&\f(CW\*(C`selection_end\*(C'\fR. If \f(CW$rectangular\fR is true (default: false), a +rectangular selection will be made. This is the prefered function to make +a selection. .ie n .IP "$success = $term\->selection_grab ($eventtime)" 4 .el .IP "$success = \f(CW$term\fR\->selection_grab ($eventtime)" 4 .IX Item "$success = $term->selection_grab ($eventtime)" -Try to request the primary selection from the server (for example, as set -by the next method). +Try to request the primary selection text from the server (for example, as +set by the next method). No visual feedback will be given. This function +is mostly useful from within \f(CW\*(C`on_sel_grab\*(C'\fR hooks. .ie n .IP "$oldtext = $term\->selection ([$newtext])" 4 .el .IP "$oldtext = \f(CW$term\fR\->selection ([$newtext])" 4 .IX Item "$oldtext = $term->selection ([$newtext])" @@ -754,15 +773,15 @@ Convert the given locale-encoded octets into a perl string. .el .IP "$term\->scr_xor_span ($beg_row, \f(CW$beg_col\fR, \f(CW$end_row\fR, \f(CW$end_col\fR[, \f(CW$rstyle\fR])" 4 .IX Item "$term->scr_xor_span ($beg_row, $beg_col, $end_row, $end_col[, $rstyle])" XORs the rendition values in the given span with the provided value -(default: \f(CW\*(C`RS_RVid\*(C'\fR). Useful in refresh hooks to provide effects similar -to the selection. +(default: \f(CW\*(C`RS_RVid\*(C'\fR), which \fI\s-1MUST\s0 \s-1NOT\s0\fR contain font styles. Useful in +refresh hooks to provide effects similar to the selection. .ie n .IP "$term\->scr_xor_rect ($beg_row, $beg_col\fR, \f(CW$end_row\fR, \f(CW$end_col\fR[, \f(CW$rstyle1\fR[, \f(CW$rstyle2]])" 4 .el .IP "$term\->scr_xor_rect ($beg_row, \f(CW$beg_col\fR, \f(CW$end_row\fR, \f(CW$end_col\fR[, \f(CW$rstyle1\fR[, \f(CW$rstyle2\fR]])" 4 .IX Item "$term->scr_xor_rect ($beg_row, $beg_col, $end_row, $end_col[, $rstyle1[, $rstyle2]])" Similar to \f(CW\*(C`scr_xor_span\*(C'\fR, but xors a rectangle instead. Trailing whitespace will additionally be xored with the \f(CW$rstyle2\fR, which defaults to \f(CW\*(C`RS_RVid | RS_Uline\*(C'\fR, which removes reverse video again and underlines -it instead. +it instead. Both styles \fI\s-1MUST\s0 \s-1NOT\s0\fR contain font styles. .IP "$term\->scr_bell" 4 .IX Item "$term->scr_bell" Ring the bell! @@ -960,7 +979,8 @@ Return the row number of the first/last row of the line, respectively. .el .IP "$offset = \f(CW$line\fR\->offset_of ($row, \f(CW$col\fR)" 4 .IX Item "$offset = $line->offset_of ($row, $col)" Returns the character offset of the given row|col pair within the logical -line. +line. Works for rows outside the line, too, and returns corresponding +offsets outside the string. .ie n .IP "($row, $col\fR) = \f(CW$line\->coord_of ($offset)" 4 .el .IP "($row, \f(CW$col\fR) = \f(CW$line\fR\->coord_of ($offset)" 4 .IX Item "($row, $col) = $line->coord_of ($offset)" @@ -1132,8 +1152,10 @@ numbers indicate more verbose output. .PD 0 .IP ">= 3 \- script loading and management" 4 .IX Item ">= 3 - script loading and management" -.IP ">=10 \- all events received" 4 -.IX Item ">=10 - all events received" +.IP ">=10 \- all called hooks" 4 +.IX Item ">=10 - all called hooks" +.IP ">=11 \- hook reutrn values" 4 +.IX Item ">=11 - hook reutrn values" .PD .SH "AUTHOR" .IX Header "AUTHOR" diff --git a/doc/rxvtperl.3.txt b/doc/rxvtperl.3.txt index e33777a8..ab963dfc 100644 --- a/doc/rxvtperl.3.txt +++ b/doc/rxvtperl.3.txt @@ -33,10 +33,13 @@ PREPACKAGED EXTENSIONS selection (enabled by default) (More) intelligent selection. This extension tries to be more - intelligent when the user extends selections (double-click). Right - now, it tries to select urls and complete shell-quoted arguments, - which is very convenient, too, if your ls supports - "--quoting-style=shell". + intelligent when the user extends selections (double-click and + further clicks). Right now, it tries to select words, urls and + complete shell-quoted arguments, which is very convenient, too, if + your ls supports "--quoting-style=shell". + + A double-click usually selects the word under the cursor, further + clicks will enlarge the selection. It also offers the following bindable keyboard command: @@ -57,21 +60,26 @@ PREPACKAGED EXTENSIONS searchable-scrollback (enabled by default) Adds regex search functionality to the scrollback buffer, triggered - by a hotkey (default: "M-s"). When in search mode, normal terminal - input/output is suspended. - - "/" starts an incremental regex search, "n" searches further, "p" or - "N" jump to the previous match, "G" jumps to the bottom and clears - the history, "enter" leaves search mode at the current position and - "escape" returns to the original position. + by a hotkey (default: "M-s"). While in search mode, normal terminal + input/output is suspended and a regex is displayed at the bottom of + the screen. + + Inputting characters appends them to the regex and continues + incremental search. "BackSpace" removes a character from the regex, + "Up" and "Down" search upwards/downwards in the scrollback buffer, + "End" jumps to the bottom. "Escape" leaves search mode and returns + to the point where search was started, while "Enter" or "Return" + stay at the current position and additionally stores the first match + in the current line into the primary selection. digital-clock Displays a digital clock using the built-in overlay. mark-urls Uses per-line display filtering ("on_line_update") to underline urls - and make them clickable. When clicked, the program specified in the - resource "urlLauncher" (default "x-www-browser") will be started. + and make them clickable. When middle-clicked, the program specified + in the resource "urlLauncher" (default "x-www-browser") will be + started with the URL as first argument. block-graphics-to-ascii A not very useful example of filtering all text output to the @@ -189,7 +197,10 @@ API DOCUMENTATION Called whenever the user tries to extend the selection (e.g. with a double click) and is either supposed to return false (normal operation), or should extend the selection itelf and return true to - suppress the built-in processing. + suppress the built-in processing. This can happen multiple times, as + long as the callback returns true, it will be called on every + further click by the user and is supposed to enlarge the selection + more and more, if possible. See the selection example extension. @@ -474,9 +485,17 @@ API DOCUMENTATION Return the current values of the selection mark, begin or end positions, and optionally set them to new values. + $term->selection_make ($eventtime[, $rectangular]) + Tries to make a selection as set by "selection_beg" and + "selection_end". If $rectangular is true (default: false), a + rectangular selection will be made. This is the prefered function to + make a selection. + $success = $term->selection_grab ($eventtime) - Try to request the primary selection from the server (for example, - as set by the next method). + Try to request the primary selection text from the server (for + example, as set by the next method). No visual feedback will be + given. This function is mostly useful from within "on_sel_grab" + hooks. $oldtext = $term->selection ([$newtext]) Return the current selection text and optionally replace it by @@ -531,15 +550,16 @@ API DOCUMENTATION $term->scr_xor_span ($beg_row, $beg_col, $end_row, $end_col[, $rstyle]) XORs the rendition values in the given span with the provided value - (default: "RS_RVid"). Useful in refresh hooks to provide effects - similar to the selection. + (default: "RS_RVid"), which *MUST NOT* contain font styles. Useful + in refresh hooks to provide effects similar to the selection. $term->scr_xor_rect ($beg_row, $beg_col, $end_row, $end_col[, $rstyle1[, $rstyle2]]) Similar to "scr_xor_span", but xors a rectangle instead. Trailing whitespace will additionally be xored with the $rstyle2, which defaults to "RS_RVid | RS_Uline", which removes reverse video again - and underlines it instead. + and underlines it instead. Both styles *MUST NOT* contain font + styles. $term->scr_bell Ring the bell! @@ -689,7 +709,8 @@ API DOCUMENTATION $offset = $line->offset_of ($row, $col) Returns the character offset of the given row|col pair within - the logical line. + the logical line. Works for rows outside the line, too, and + returns corresponding offsets outside the string. ($row, $col) = $line->coord_of ($offset) Translates a string offset into terminal coordinates again. @@ -829,7 +850,8 @@ ENVIRONMENT == 0 - fatal messages >= 3 - script loading and management - >=10 - all events received + >=10 - all called hooks + >=11 - hook reutrn values AUTHOR Marc Lehmann diff --git a/src/perl/searchable-scrollback b/src/perl/searchable-scrollback index 4669f492..93d2f8d1 100644 --- a/src/perl/searchable-scrollback +++ b/src/perl/searchable-scrollback @@ -121,7 +121,7 @@ sub key_press { delete $self->{manpage_overlay}; - if ($keysym == 0xff0d || $keysym == 0xff8d) { + if ($keysym == 0xff0d || $keysym == 0xff8d) { # enter if ($self->{found}) { my ($br, $bc, $er, $ec) = @{ $self->{found}[0] }; $self->selection_beg ($br, $bc); @@ -129,31 +129,19 @@ sub key_press { $self->selection_make ($event->{time}); } $self->leave; - } elsif ($keysym == 0xff1b) { + } elsif ($keysym == 0xff1b) { # escape $self->view_start ($self->{view_start}); $self->leave; - } elsif ($keysym == 0xff57) { + } elsif ($keysym == 0xff57) { # end $self->{row} = $self->nrow - 1; $self->view_start (0); - } elsif ($keysym == 0xff52) { + } elsif ($keysym == 0xff52) { # up $self->{row}-- if $self->{row} > -$self->nsaved; $self->search (-1); - } elsif ($keysym == 0xff54) { + } elsif ($keysym == 0xff54) { # down $self->{row}++ if $self->{row} < $self->nrow; $self->search (+1); - } elsif ($string eq "n") { - if ($self->{found} && @{ $self->{found} }) { - push @{ $self->{history} }, [$self->view_start, $self->{found}]; - $self->search (-1); - $self->idle; - } - } elsif ($string eq "p" or $string eq "N") { - if (my $prev = pop @{ $self->{history} }) { - $self->view_start ($prev->[0]); - $self->{found} = $prev->[1]; - $self->want_refresh; - } - } elsif ($keysym == 0xff08) { + } elsif ($keysym == 0xff08) { # backspace substr $self->{search}, -1, 1, ""; $self->search; $self->idle; diff --git a/src/urxvt.pm b/src/urxvt.pm index da189655..04b95caa 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -42,9 +42,13 @@ You can activate them like this: =item selection (enabled by default) (More) intelligent selection. This extension tries to be more intelligent -when the user extends selections (double-click). Right now, it tries to -select urls and complete shell-quoted arguments, which is very convenient, -too, if your F supports C<--quoting-style=shell>. +when the user extends selections (double-click and further clicks). Right +now, it tries to select words, urls and complete shell-quoted +arguments, which is very convenient, too, if your F supports +C<--quoting-style=shell>. + +A double-click usually selects the word under the cursor, further clicks +will enlarge the selection. It also offers the following bindable keyboard command: @@ -72,13 +76,17 @@ evalution, web-browser starting etc.), depending on content. =item searchable-scrollback (enabled by default) Adds regex search functionality to the scrollback buffer, triggered -by a hotkey (default: C). When in search mode, normal terminal -input/output is suspended. - -C starts an incremental regex search, C searches further, C

or -C jump to the previous match, C jumps to the bottom and clears the -history, C leaves search mode at the current position and C -returns to the original position. +by a hotkey (default: C). While in search mode, normal terminal +input/output is suspended and a regex is displayed at the bottom of the +screen. + +Inputting characters appends them to the regex and continues incremental +search. C removes a character from the regex, C and C +search upwards/downwards in the scrollback buffer, C jumps to the +bottom. C leaves search mode and returns to the point where search +was started, while C or C stay at the current position and +additionally stores the first match in the current line into the primary +selection. =item digital-clock @@ -88,7 +96,8 @@ Displays a digital clock using the built-in overlay. Uses per-line display filtering (C) to underline urls and make them clickable. When middle-clicked, the program specified in the -resource C (default C) will be started. +resource C (default C) will be started with +the URL as first argument. =item block-graphics-to-ascii -- 2.34.1