Pick For Professionals, Part 1: The Update Processor
Jonathan E. Sisk
The Update Processor is a full-screen data and text entry mechanism. It provides a single-threaded approach to standardizing text and data entry throughout the system.
UP has three distinct applications or "modes" of operation:
- (T) - Text entry. This includes programs, procs, macros, menus, lists, and other free-form text.
- (D) - Data entry. This includes files like the users file, file dictionaries using the "ud" macro, the "help" system (EPick), and in some of the "front-ends" (user interfaces) to system routines like "create- account".
- (S) - TCL Command Stack. The TCL Command stack records every command issued at the TCL prompt. Any command previously issued can be retrieved later and either executed or modified before execution.
To save ink, time and redundancy, the following legend applies throughout this article:
Legend:
- T - Text entry
- D - Data entry
- S - TCL Command Line
When a particular command bears one of the above legends, it only applies to that particular "mode" of operation. This is because the same command may have a different effect depending upon the mode you are in when you execute it. For example, a Ctrl+d in text entry moves the cursor to the previous sentence , while at TCL a Ctrl+d retrieves the previous command.
Starting up the Update Processor
The Update Processor requires one of the three "update" verbs and a file.reference:
:u file.reference item-id {item-id...} {(option{s})}
The "u", "up" and "update" commands all invoke the Update Processor. An asterisk (*) can be substituted for the item-id to update all items in the file.The options available to UP include:
- c - Clears screen between each item.
- i - Includes the item-id.
- l - Look-only. Item(s) can not be saved. (This is the default setting for "help").
- s - Turns off the spelling checker, if not already deactivated by the TCL command, "speller- off".
Examples:
(T) Text Entry
- :u dm,bp, file-save
- :up documentation *
- :update md system-coldstart
(D) Data Entry
- :u users dm
- :help who
(S) TCL Command Stack: No need to "start" it -- UP is always "up" on the command stack (at TCL).
Important Notes About UP Commands:
All UP commands are prefixed by a Control Key, indicated throughout this article with the symbol, "[Ctrl]". Some UP commands require two keystrokes. The [Ctrl] key should not be pressed on the second character of any UP command.
Also, all UP commands are "case-insensitive". This means that the upper-case character and the lower- case character will both do the same thing. All commands in this article are shown in lower case, but may of course be entered as upper case.
Inserting and Replacing Text
[Ctrl]+r
(T,D,S) Toggles between "insert" and "overtype" (replace) mode. Watch for an "I" or "O"
indicator in the upper right-hand corner of the screen. In "insert" (I) mode, as characters
are entered, existing characters are pushed to the right or down. In "overtype" (O) mode,
any characters entered are typed over existing characters.
[Ctrl]+m
(T) In "insert" mode, this inserts a new line (attribute) in the item.
(S) At TCL, this is the same as a [return], [enter] or [linefeed]
[Ctrl]+w
(T,D,S) Inserts one space at the current cursor position.
[Ctrl]+v
(T,D) Inserts a new value at the current cursor position.
(S) No effect.
Moving the Cursor
[Ctrl]+m
(T) In "overtype" mode, this moves to the beginning of the next paragraph . In "insert"
mode, this inserts a blank line.
(D) Moves to the next attribute not defined as being "display-only".
(S) If a command is present, this sends it to TCL to be processed.
[Ctrl]+n
(T,D) Moves the cursor "straight down" to the same column position on the next row or
attribute.
(S) No effect.
[Ctrl]+b
(T,D) Moves the cursor "straight up" to the same column position on the previous row or field.
(S) No effect.
[Ctrl]+u
(T,S) Moves the cursor right to the first character of the next word.
(D) On a "plain" attribute, this moves the cursor right one word, like above. On an
attribute defined as having a "remote index", this retrieves the next item from the remote
index. In "help", several attributes have remote indexes, including the "type", "category",
"compat" and "see.also" attributes.
[Ctrl]+y
(T,S) Moves the cursor left to the first character of the previous word.
(D) On a "plain" attribute, this moves the cursor left one word, like above. On an attribute
defined as having a "remote index", this retrieves the previous item from the remote
index.
[Ctrl]+k
(T,D,S) Moves the cursor right one character.
[Ctrl]+j
(T,D,S) Moves the cursor left one character.
[Ctrl]+i
(T,D,S) Moves the cursor right to the next defined tab stop.
[Ctrl]+f
(T) Moves to the beginning of the next sentence.
(D) On a "plain" attribute, this moves to the beginning of the next sentence or value. On
an attribute defined as having a "local index", this exits the current item and moves to
the next item found in the given index. (This is known in the Pick vernacular as
"cruising"). In "help", several attributes have local indexes, including the "token",
"category", "compat" and "type" attributes.
(S) Moves "forward" and displays the next command in the stack.
[Ctrl]+d
(T) Moves to the beginning of the previous sentence.
(D) On a "plain" attribute, this moves to the beginning of the previous sentence or value.
On an attribute defined as having a "local index", this exits the current item and moves
to the previous item found in the given index. In "help", several attributes have local
indexes, including the "token", "category", "compat" and "type" attributes.
(S) Moves "backward" and displays the previous command in the stack.
[Ctrl]+g
(T) Moves to the end of the current paragraph.
(D) On a "plain" attribute, this moves to the end of the current attribute or value. On an
attribute defined as having a "remote index", the first [Ctrl]+g moves to the end of the
attribute or value. Issuing another [Ctrl]+g at this position retrieves the corresponding
item from the remote index, and enters it for updating. (This feature is known in Pick
parlance as "zooming"). When the "zoomed to" item is filed or exited, control returns to
the original item and the screen is automatically redisplayed. In "help", several attributes
have remote indexes, including the "see.also", "category", "compat" and "type"
attributes.
(S) Moves to the end of the TCL command.
[Ctrl]+t
(T,D) Moves to the top of the current item.
(S) Moves to cursor to the beginning of the current command line.
[Ctrl]+ze
(T,D) Moves to the end of the current item.
(S) No effect.
[Ctrl]+zn or [Ctrl]+p
(T,D) Moves to the top of the next screen, sort of like the "P" (List 22 lines) command in
the line editor (Good old "ED").
(S) No effect.
[Ctrl]+zy
(T,D) Moves to the top of the previous screen.
(S) No effect.
[Ctrl]+zh
(T,D) Moves the cursor down one-half page (usually 12 lines).
(S) No effect.
[Ctrl]+zq
(T,D) Moves the cursor down one-quarter page (usually 6 lines).
(S) No effect.
[Ctrl]+zp
(T,D) Redisplays the current screen. This doesn't actually move the cursor, but seemed
appropriate for this category.
(S) No effect.
[Ctrl]+za
(T,D) Redisplays the current screen with the current line/attribute at the top.
(S) No effect.
[Ctrl]+zb
(T,D) Redisplays the current screen with the current line/attribute at the bottom.
(S) No effect.
[Ctrl]+z+num
(T,D) Goes to line or attribute number specified by num. After entering the "z", when a
number key is pressed, the prompt "go to line#: ? " appears with the number you have
entered. This requires a [Ctrl]+m, [enter] or [return] to complete the action.
(S) No effect.
[Ctrl]+zc
(T,D,S) Displays the currently-assigned tab stop positions.
[Ctrl]+zt
(T,D) Allows defining or changing tab stop positions. Each numeric tab stop may be
separated from the previous by a space or a comma.
(S) No effect.
Deleting Text
[Ctrl]+L
(T,D,S) Deletes the character at the current cursor position. In text mode (*), this can be
used to delete the attribute ("paragraph") mark between two attributes, which appends
the following line/attribute to the end of the current line.
[Ctrl]+o
(T,D,S) Deletes the character at the cursor position, along with the rest of the word. That's usually everything up to the next blank.
[Ctrl]+h
(T,D,S) Deletes the character to the left of the cursor. This is the same as a "backspace".
[Ctrl]+e
(T,D,S) Deletes the current character and all characters to the end of the sentence.
[Ctrl]+zo
(T,D) Deletes the current character and the rest of the paragraph.
(S) No effect.
[Ctrl]+zd
(T,D) Deletes the current character and the rest of the item.
(S) No effect.
Oops! Correcting Boo-Boos
[Ctrl]+zz
(T,D,S) Undoes the last delete command.
Moving and Copying Text
[Ctrl]+cd
(T,D) Marks the beginning of a block of text to be moved or deleted.
(S) No effect.
[Ctrl]+cl
(T,D) Marks the beginning of a block of text to be copied.
(S) No effect.
[Ctrl]+cc
(T,D) Completes previously marked cut. The text is stored in the temporary "cut buffer"
(Pick's equivalent to a Windows "clipboard").
(S) No effect.
[Ctrl]+cp
(T,D) Pastes contents of "cut buffer" at current cursor position.
(S) Moves ("pops") the current command to the top of the command stack.
[Ctrl]+cw
(T,D) Writes contents of "cut buffer" to a given filename and / or item-id.
(S) No effect.
[Ctrl]+cr
(T,D) Merges or pastes from a different item-id at the current cursor position.
(S) No effect.
In both the [Ctrl]+cr and [Ctrl]+cw commands, UP prompts for the item-id to merge from or to paste to. The response to the prompt can include any or all of the following:
- (filename - This indicates a filename other than the one being updated.
- item-id - This indicates the item-id.
- starting line - This indicates the beginning line (attribute) number with [Ctrl]+cr only.
- ending line - This indicates the ending line (attribute) number with [Ctrl]+cr only.
Example:
[Ctrl]+cr
paste from:(dm,bp, file-save 2-4[Ctrl]+m
Filing, Exiting and Deleting Items
[Ctrl]+xf
(T,D) Files the current item and either returns to TCL or to the next item.
(S) [Ctrl]+x clears and cancels the TCL command line.
[Ctrl]+xs
(T,D) Files the current item and remains in UP.
(S) [Ctrl]+x clears and cancels the TCL command line.
[Ctrl]+xi
(T,D) Files the current item under a different filename and/or item-id. Note that when the
item is being written to a different file, the filename must be preceded with a left
parenthesis "(".
(S) [Ctrl]+x clears and cancels the TCL command line.
[Ctrl]+xp
(T,D) Files the current item and prints a copy to the currently assigned printer.
(S) [Ctrl]+x clears and cancels the TCL command line.
[Ctrl]+xc
(T) On PICK/BASIC programs, this files the item, then compiles and catalogs it.
(D) It is unadvisable to try and compile data.
(S) [Ctrl]+x clears and cancels the TCL command line.
[Ctrl]+xr
(T) On PICK/BASIC programs, this files the item, compiles it, then runs it. In "macros"
and "menus", this files the item and then "runs" it.
(D) It is unadvisable to try and compile data.
(S) [Ctrl]+x clears and cancels the TCL command line.
[Ctrl]+xe
(T,D) Exits the current item and either returns to TCL or to the next item. If the item has
changed, a prompt appears asking if the item should be exited or filed.
(S) [Ctrl]+x clears and cancels the TCL command line.
[Ctrl]+xx
(T,D) Exactly like [Ctrl]+xe.
(S) [Ctrl]+x clears and cancels the TCL command line.
[Ctrl]+xb
(T,D) When more than one item is being updated, such as when the UP was invoked
following a select or get-list, this exits the current item and goes back to the previous
item in the list.
(S) [Ctrl]+x clears and cancels the TCL command line.
[Ctrl]+xk
(T,D) Exits the current item and unconditionally returns to TCL. If an active-list is in
effect, the list is terminated. If the item has changed, a prompt appears asking if the item
should be exited or filed.
(S) [Ctrl]+x clears and cancels the TCL command line.
[Ctrl]+xo
(T,D) Deletes the current item and either returns to TCL or to the next item. The "recover-
item" command will recover an item deleted with this command provided that a) three of
the nine planets are in alignment, b) you are not having a triple-critical day, biorhythm-
wise or c) you issue the command reasonably soon after deleting the item, like before
doing anything else.
(S) [Ctrl]+x clears and cancels the TCL command line.
Searching and Replacing Text
[Ctrl]+a str m
(T,D,S) Searches forward from current cursor (or stack) position to the next occurrence
of the string of characters indicated by str.
[Ctrl]+a
(T,D,S) Repeats last search.
string[Ctrl]+a
Searches "backward" through stack for the last command issued that contained the
string of characters indicated by string.
[Ctrl]+a str1 r str2 n
(T,D) Searches forward from current position and replaces all occurrences of the string of
characters indicated by str1 with str2.
(S) No effect.
[Ctrl]+a str1 r str2 m
(T,D) Searches forward from current position and replaces selected occurrences of the
string of characters indicated by str1 with str2.
(S) No effect.
When a match is found, the cursor is positioned on the first character position of the
found string and UP waits for one of the following responses:
- [Ctrl]+a - Skips this replacement and looks for next.
- [Ctrl]+r - Replaces this occurrence and looks for next.
- [Ctrl]+n - Replaces this occurrence and all remaining occurrences.
- [Ctrl]+x - Exits search and replace mode.
Using the Spelling Checker
Perhaps the nicest feature of the UP Spelling Checker is that it can be easily disabled.
It could be practical, but it relies on the "words" file, which comes empty from "The Factory". This means, of course, that you would have to define every word in your choice of language in order to use it.
[Ctrl]+a
(T,D,S) When the spelling checker is active, each word is checked as it is typed. When
an "illegal" word is being formed, either by an invalid combination of characters such as
"zq" or by not being in the "words" file shipped with AP, the UP stops entry and requires
a response. This command accepts the spelling as shown. Since the "words" file from
the factory is empty, the spelling checker is of marginal use, unless you are willing to
build it from scratch.
[Ctrl]+aa
(T,D,S) Accepts character and places word into the "words" file, then continues.
[Ctrl]+aaa
(T,D,S) Turns off the spelling checker.
Update Processor / TCL Command Stack Permuted Command Summary
Here's a quick "cross-index" of all Update Processor commands, organized by description. Think about what you want to do, then use that as the index to find the appropriate command.
Accept word spelling and put in words file - [Ctrl]+aa
Accept word spelling as shown - [Ctrl]+a
Bottom of current item - [Ctrl]+ze
Cancel last delete - [Ctrl]+zz
Cancel TCL command - [Ctrl]+x
Complete cut for moving or copying - [Ctrl]+cc
Cruise forward in remote index - [Ctrl]+u
Cruise backward in remote index - [Ctrl]+y
Current tab stop settings - [Ctrl]+zc
Cut text to copy - [Ctrl]+cl
Cut text to delete or move - [Ctrl]+cd
Delete character at cursor position - [Ctrl]+l (lower-case "L")
Delete character to left of cursor - [Ctrl]+h or [backspace]
Delete current item - [Ctrl]+xo
Delete to end of item - [Ctrl]+zd
Delete to end of paragraph - [Ctrl]+zo
Delete to end of sentence - [Ctrl]+e
Delete word - [Ctrl]+o
Disable spelling checker - [Ctrl]+aaa
Display tab stop settings - [Ctrl]+zc
Execute TCL command - command + [Ctrl]+m or [Enter]
Exit item and active list without saving - [Ctrl]+xk
Exit item and return to previous item in active list - [Ctrl]+xb
Exit to TCL or next item without saving - [Ctrl]+xe
File and run menu, macro or PICK/BASIC program - [Ctrl]+xr
File current item and print - [Ctrl]+xp
File current item and remain in UP - [Ctrl]+xs
File current item and return to TCL or next item - [Ctrl]+xf
File current item under different item-id - [Ctrl]+xi + {(filename } + {id}
File, compile and catalog PICK/BASIC program - [Ctrl]+xc
File, compile and run PICK/BASIC program - [Ctrl]+xr
Find previous command containing string - string + [Ctrl]+a
Freshen screen display - [Ctrl]+zp
Get me outta here! - [Ctrl]+xe or [Ctrl]+xx
Go to line / attribute number - [Ctrl]+z + number
Insert a new line / attribute in text mode - [Ctrl]+m or [Enter]
Insert space at current position - [Ctrl]+w
Insert (multi-)value - [Ctrl]+v
Mark beginning of text to copy - [Ctrl]+cl
Mark beginning of text to delete or move - [Ctrl]+cd
Mark end of text for moving or copying - [Ctrl]+cc
Move backward to previous item in local index - [Ctrl]+d
Move backward to previous item in remote index - [Ctrl]+y
Move current command to top of stack - [Ctrl]+cp
Move current line to bottom of screen and redisplay - [Ctrl]+zb
Move current line to top of screen and redisplay - [Ctrl]+za
Move cursor up one page - [Ctrl]+zy
Move cursor down 1/2 page - [Ctrl]+zh
Move cursor down 1/4 page - [Ctrl]+zq
Move cursor down 22 lines / 1 page - [Ctrl]+p or [Ctrl]+zn
Move cursor forward one page - [Ctrl]+p or [Ctrl]+zn
Move cursor forward to next paragraph - [Ctrl]+m or [return] or [enter] or [linefeed]
Move cursor left one character - [Ctrl]+j
Move cursor right one character - [Ctrl]+k
Move cursor straight down one line - [Ctrl]+n
Move cursor straight up one line - [Ctrl]+b
Move cursor to beginning of TCL command line - [Ctrl]+t
Move cursor to bottom of current item - [Ctrl]+ze
Move cursor to end of paragraph / attribute - [Ctrl]+g
Move cursor to next sentence - [Ctrl]+f
Move cursor to next tab stop - [Ctrl]+i or [Tab]
Move cursor to next word - [Ctrl]+u
Move cursor to previous sentence - [Ctrl]+d
Move cursor to previous word - [Ctrl]+y
Move cursor to specific line / attribute number - [Ctrl]+z + number
Move cursor to top of current item - [Ctrl]+t
Move cursor up 22 lines / 1 page - [Ctrl]+zy
Move forward to next item in local index - [Ctrl]+f
Move forward to next item in remote index - [Ctrl]+u
Move to next attribute in data entry mode - [Ctrl]+m or [Enter]
Oops! Undo last delete operation - [Ctrl]+zz
Paste cut buffer at current cursor position - [Ctrl]+cp
Pop current command to top of stack - [Ctrl]+cp
Redisplay current screen - [Ctrl]+zp
Repeat last search - [Ctrl]+a
Reset current TCL command - [Ctrl]+x
Retrieve next item from remote index - [Ctrl]+u
Retrieve next item in local index - [Ctrl]+f
Retrieve previous item in local index - [Ctrl]+d
Retrieve previous item from remote index - [Ctrl]+y
Retrieve text from file - [Ctrl]+cr + {(filename } + {id} + {n{-n}}
Save current item and print - [Ctrl]+xp
Save current item and remain in UP - [Ctrl]+xs
Save current item under different item-id - [Ctrl]+xi + {(filename } + {id}
Search and replace all occurrences - [Ctrl]+a + str1 + [Ctrl]+r + str2 + [Ctrl]+n
Search and replace selected occurrences - [Ctrl]+a + str1 + [Ctrl]+r + str2 + [Ctrl]+m
Search for text or previous command - [Ctrl]+a + string + [Ctrl]+m or
Set tab stops - [Ctrl]+zt
Starting UP - :u, up, update file.reference {* or item-id ...}
Toggle between Insert and Overtype mode - [Ctrl]+r
Top of current item - [Ctrl]+t
Turn off spelling checker - [Ctrl]+aaa
Undo last delete - [Ctrl]+zz
Write cut buffer to file - [Ctrl]+cw
Zoom to remote indexed file - [Ctrl]+gg
Definitions and Footnotes:
A "sentence" is a series of words terminated by a period or paragraph mark.
A "paragraph" and "attribute" are the same thing -- a string of characters ending with an attribute mark. Note that attribute marks are transparent.
Search strings are not case-sensitive. To make them case-sensitive they must be enclosed in single or double quotes.
When text is replaced at the beginning of a sentence, the initial letter is automatically replaced with an upper-case character. This feature can be bypassed by enclosing the "replacement" string in quotes.
This article was originally written for, and published in, PICKWORLD Magazine in 1993.
