# phpman > man > MARK(1mh)

[MARK(1mh)](https://www.chedong.com/phpMan.php/man/MARK/1mh/markdown)                                                                                  [MARK(1mh)](https://www.chedong.com/phpMan.php/man/MARK/1mh/markdown)



## NAME
       mark - manipulate nmh message sequences

## SYNOPSIS
       **mark** [**-help**] [**-version**] [_+folder_] [_msgs_] [**-sequence** _name_ ...]  [**-add** | **-delete**] [**-list**]
            [**-public** | **-nopublic**] [**-zero** | **-nozero**]

## DESCRIPTION
       The **mark** command manipulates message sequences by adding or  deleting  message  numbers  from
       folder-specific message sequences, or by listing those sequences and messages.

       A  message  sequence  is  a  keyword,  just like one of the “reserved” message names, such as
       “first” or “next”.  Unlike the “reserved” message names, which have a fixed  semantics  on  a
       per-folder  basis,  the semantics of a message sequence may be defined, modified, and removed
       by the user.  Message sequences are folder-specific, e.g., the sequence name  “seen”  in  the
       context  of folder “_+inbox_” need not have any relation whatsoever to the sequence of the same
       name in a folder of a different name.

       Three action switches direct the operation of **mark**.  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 (which must occur at least once) the mes‐
       sages  named  via  _msgs_  (which defaults to “cur” if no _msgs_ are given), are added to the se‐
       quence.  The messages to be added need not be absent from the sequence.  If the **-zero**  switch
       is  specified,  the sequence will be emptied prior to adding the messages.  Hence, **-add** **-zero**
       means that each sequence should be initialized to the indicated messages, while **-add**  **-nozero**
       means that each sequence should be appended to by the indicated messages.

       The  **-delete**  switch  tells  **mark** to delete messages from sequences, and is the dual of **-add**.
       For each of the named 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 messages in the folder are added to the sequence (first creating the sequence, if  neces‐
       sary)  before  removing  the  messages.  Hence, **-delete** **-zero** means that each sequence should
       contain all messages except those indicated, while **-delete** **-nozero** means that only the  indi‐
       cated  messages  should  be  removed from each sequence.  As expected, the command “**mark** **-se**‐‐
       **quence** _foo_ **-delete** all” empties the sequence “foo”, and therefore removes that sequence  from
       the current folder's list of sequences.

       When  creating  or  modifying sequences, you can specify the switches **-public** or **-nopublic** to
       force the new or modified sequences to be “public” or “private”.  The  switch  **-public**  indi‐
       cates  that  the sequences should be made “public”.  These sequences will then be readable by
       all **nmh** users with permission to read the  relevant  folders.   In  contrast,  the  **-nopublic**
       switch  indicates that the sequences should be made “private”, and will only be accessible by
       you.  If neither of these switches is specified, then existing sequences will maintain  their
       current  status,  and new sequences will default to “public” if you have write permission for
       the relevant folder.  Check the [_mh-sequence_(5)](https://www.chedong.com/phpMan.php/man/mh-sequence/5/markdown) man page for more details about the difference
       between “public” and “private” sequences.

       The  **-list**  switch  tells **mark** to list both the sequences defined for the folder and the mes‐
       sages associated with those sequences.  **mark** will list the name of  each  sequence  given  by
### -sequence
       this will also be indicated.  If no sequence is specified by the **-sequence** switch,  then  all
       sequences  for this folder will be listed.  The **-zero** switch does not affect the operation of
### -list

       The restrictions on sequences are:

       • The name used to denote a message sequence must consist of an alphabetic character followed
         by  zero or more alphanumeric characters, and cannot be one of the (reserved) message names
         “new”, “first”, “last”, “all”, “next”, or “prev”.

       • Message ranges with user-defined sequence  names  are  restricted  to  the  form  “name:n”,
         “name:+n”,  or  “name:-n”,  and  refer  to  the  first or last `n' messages of the sequence
         `name', respectively.  Constructs of the form “name1-name2” are forbidden for user  defined
         sequences.

## FILES
       $HOME/.mh_profile   The user's profile.

## PROFILE COMPONENTS
       Path:               To determine the user's nmh directory.
       Current-Folder:     To find the default current folder.

## SEE ALSO
       [_flist_(1)](https://www.chedong.com/phpMan.php/man/flist/1/markdown), [_pick_(1)](https://www.chedong.com/phpMan.php/man/pick/1/markdown), [_mh-sequence_(5)](https://www.chedong.com/phpMan.php/man/mh-sequence/5/markdown)

## DEFAULTS
       +folder             The current folder.
       -add                If **-sequence** is specified, **-list** otherwise.
       msgs                The current message, or **all** if **-list** is specified.
### -nozero

## CONTEXT
       If a folder is given, it will become the current folder.

## HELPFUL HINTS
       Use **flist** to find folders with a given sequence, and “**pick** _sequence_ **-list**” to enumerate those
       messages in the sequence (such as for use by a shell script).



nmh-1.7.1                                    2013-03-31                                    [MARK(1mh)](https://www.chedong.com/phpMan.php/man/MARK/1mh/markdown)
