Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mark(1mh) — Ultrix/UWS 4.0 VAX

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

folder(1mh)

pick(1mh)

sortm(1mh)

mark(1mh)

Name

mark − mark messages

Syntax

mark [+foldername] [msgs] [−sequence name...] [−add] [−delete] [−list] [−public] [−nopublic] [−zero] [−nozero] [−help]

Description

Use the mark command to assign a name to a sequence of messages within the current folder.  You can then use this message sequence with any MH command that takes a msg or msgs argument. 

The following example shows how you can create a message sequence called “out” containing messages 10−20 in the current directory.  The second part of the example shows how this sequence can be used in conjunction with the rmm command, to delete all the messages in the sequence.

% mark 10-20 -sequence out
 % rmm out

You can specify a folder other than the current folder, by using the <+folder> argument.

Sequences still point to the same messages even if you sort all the messages in the folder with sortm.

If you delete a message or refile it in another folder, it is also deleted from the sequence. 

You can use mark in conjunction with pick to give you a very powerful and flexible way to manipulate messages.  The following example shows how you can combine the two commands together to select all messages from Adrian and put them in a sequence named Ateam.  See pick() for more details of the power of pick.

mark ‘pick -from Adrian‘ -sequence Ateam

Note that you cannot use special characters, such as hyphens, in sequence names.  Sequence names can consist of alphanumeric characters, but the first character must be alphabetic.

If you create a sequence using mark, the ordering of messages within the folder remains unchanged.  So if messages 3, 7 and 9 are put into the sequence, they are still shown as messages 3, 7 and 9 if you use scan after incorporating them into the sequence. The scan command does not show any differences between messages that are in sequences and ordinary messages within a folder.

Options

If you use mark on its own without specifying −sequence name, it displays the sequences that have been created in the current folder.  The following example shows how this works.  It also illustrates that one message can be in more than one sequence at the same time. 

% mark
cur: 19
one: 2 7 9
Two: 2-4

An identical result can be obtained if you use mark−list

A message sequence is a keyword, just like one of the reserved message names, such as first or next. Unlike the reserved message names, you can define, modify, and remove the semantics of a message sequence. Message sequences are folder-specific, for example: the sequence name seen in folder +inbox need not have any relation whatsoever to the sequence of the same name in a folder of a different name.

You can manipulate sequences with three options:

−add
−delete
−list

These switches are mutually exclusive: the last occurrence of any of them overrides any previous occurrence of the other two. 

The −add switch tells mark to add messages to sequences or to create a new sequence. For each sequence named via the −sequence <name> argument the messages named in <msgs> (which defaults to the current message if no msgs are given), are added to the sequence. The messages to be added need not be absent from the sequence. If you specify the −zero option, all messages in the sequence are removed from the sequence, before the new messages are added to it.  Note the messages are removed from the sequence only.  They are not deleted or removed from your folder.

If you specify −add−nozero the specified messages are appended to the sequence.

The −delete switch tells mark to delete messages from sequences, and is the opposite of −add. For each of the specified sequences, the named messages are removed from the sequence. These messages need not be already present in the sequence. If the −zero switch is specified, then all the messages in the folder are appended to the sequence prior to the removal of the messages.  The following example shows how this works in a folder with sixteen messages.

% mark -delete -zero 7 -sequence notseven
 % mark
notseven: 1-6 8-16

Hence, −delete −zero means that each sequence should contain all messages except those indicated, while −delete −nozero means that only the indicated messages should be removed from each sequence. As expected, the command mark −sequence seen −delete all deletes the sequence seen from the current folder.

When creating (or modifying) a sequence, the −public switch indicates that the sequence should be made readable for other MH users. In contrast, the −nopublic switch indicates that the sequence should be exclusive to your MH environment.

The −list switch tells mark to list the sequences defined for the folder and the messages associated with those sequences.

You can list each sequence named by using the −sequence name switch.  If you do not specify the sequence name, −list lists all sequences, and the messages associated with those sequences, in the specified folder. The −zero switch does not affect the operation of −list.

The name used to denote a message sequence must consist solely of alphabetic characters, and cannot be one of the reserved message names (such as, first cur and so forth).

You can define up to a maximum of 10 sequences in any one folder. 

The name used to denote a message sequence cannot occur as part of a message range: for example, constructs like seen:20 or seen −10 are forbidden.

The defaults for this command are:

+folder defaults to the current folder
−add if msgs is specified, −list otherwise
msgs defaults to cur (or all if −list is specified)
−nopublic if the folder is read−only, −public otherwise
−nozero

Files

$HOME/.mh_profile Your user profile

Profile Components

Path: To your MH directory
Current-Folder: To find the default current folder

See Also

folder(1mh), pick(1mh), sortm(1mh)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026