📄 mh-sequence.man
字号:
MH-SEQUENCE(5) BSD Programmer's Manual MH-SEQUENCE(5)NNAAMMEE mh-sequence - sequence specification for MH message systemSSYYNNOOPPSSIISS most _M_H commandsDDEESSCCRRIIPPTTIIOONN Most _M_H commands accept a `msg' or `msgs' specification, where `msg' indicates one message and `msgs' indicates one or more messages. To designate a message, you may use either its number (e.g., 1, 10, 234) or one of these "reserved" message names: _N_a_m_e _D_e_s_c_r_i_p_t_i_o_n first the first message in the folder last the last message in the folder cur the most recently accessed message prev the message numerically preceding "cur" next the message numerically following "cur" In commands that take a `msg' argument, the default is "cur". As a shorthand, "." is equivalent to "cur". For example: In a folder containing five messages numbered 5, 10, 94, 177 and 325, "first" is 5 and "last" is 325. If "cur" is 94, then "prev" is 10 and "next" is 177. The word `msgs' indicates that one or more messages may be specified. Such a specification consists of one message designation or of several message designations separated by spaces. A message designation consists either of a message name as defined above, or a message range. A message range is specified as "name1-name2" or "name:n", where `name', `name1' and `name2' are message names, and `n' is an integer. The specification "name1-name2" designates all currently- existing messages from `name1' to `name2' inclusive. The message name "all" is a shorthand for the message range "first-last". The specification "name:n" designates up to `n' messages. These messages start with `name' if `name' is a message number or one of the reserved names "first" "cur", or "next", The messages end with `name' if `name' is "prev" or "last". The interpretation of `n' may be overridden by preceding `n' with a plus or minus sign; `+n' always means up to `n' messages starting with `name', and `-n' always means up to `n' messages ending with `name'.[mh.6] MH.6.8 1MH-SEQUENCE(5) BSD Programmer's Manual MH-SEQUENCE(5) In commands which accept a `msgs' argument, the default is either "cur" or "all", depending on which makes more sense for each command (see the individual man pages for details). Repeated specifications of the same message have the same effect as a single specification of the mes- sage. UUsseerr--DDeeffiinneedd MMeessssaaggee SSeeqquueenncceess In addition to the "reserved" (pre-defined) message names given above, _M_H supports user-defined sequence names. User-defined sequences allow the _M_H user a tremendous amount of power in dealing with groups of messages in the same folder by allowing the user to bind a group of mes- sages to a meaningful symbolic name. The name used to denote a message sequence must consist of an alphabetic character followed by zero or more alphanu- meric characters, and can not be one of the "reserved" message names above. After defining a sequence, it can be used wherever an _M_H command expects a `msg' or `msgs' argument. Some forms of message ranges are allowed with user-defined sequences. The specification "name:n" may be used, and it designates up to the first `n' messages (or last `n' mes- sages for `-n') which are elements of the user-defined sequence `name'. The specifications "name:next" and "name:prev" may also be used, and they designate the next or previous message (relative to the current message) which is an element of the user-defined sequence `name'. The specificaitions "name:first" and "name:last" are equivalent to "name:1" and "name:-1", respectively. The specification "name:cur" is not allowed (use just "cur" instead). The syntax of these message range specifcations is subject to change in the future. User-defined sequence names are specific to each folder. They are defined using the _p_i_c_k and _m_a_r_k commands. PPuubblliicc aanndd PPrriivvaattee UUsseerr--DDeeffiinneedd SSeeqquueenncceess There are two varieties of sequences: _p_u_b_l_i_c sequences and _p_r_i_v_a_t_e sequences. _P_u_b_l_i_c sequences of a folder are accessible to any _M_H user that can read that folder and are kept in the .mh_sequences file in the folder. _P_r_i_v_a_t_e sequences are accessible only to the _M_H user that defined those sequences and are kept in the user's _M_H context file. By default, _p_i_c_k and _m_a_r_k create _p_u_b_l_i_c sequences[mh.6] MH.6.8 2MH-SEQUENCE(5) BSD Programmer's Manual MH-SEQUENCE(5) if the folder for which the sequences are being defined is writable by the _M_H user. Otherwise, _p_r_i_v_a_t_e sequences are created. This can be overridden with the `-public' and `-private' switches to _m_a_r_k. SSeeqquueennccee NNeeggaattiioonn _M_H provides the ability to select all messages not ele- ments of a user-defined sequence. To do this, the user should define the entry "Sequence-Negation" in the _M_H pro- file file; its value may be any string. This string is then used to preface an existing user-defined sequence name. This specification then refers to those messages not elements of the specified sequence name. For example, if the profile entry is: Sequence-Negation: not then anytime an _M_H command is given "notfoo" as a `msg' or `msgs' argument, it would substitute all messages that are not elements of the sequence "foo". Obviously, the user should beware of defining sequences with names that begin with the value of the "Sequence-Negation" profile entry. TThhee PPrreevviioouuss SSeeqquueennccee _M_H provides the ability to remember the `msgs' or `msg' argument last given to an _M_H command. The entry "Previ- ous-Sequence" should be defined in the _M_H profile; its value should be a sequence name or multiple sequence names separated by spaces. If this entry is defined, when when an _M_H command finishes, it will define the sequence(s) named in the value of this entry to be those messages that were specified to the command. Hence, a profile entry of Previous-Sequence: pseq directs any _M_H command that accepts a `msg' or `msgs' argument to define the sequence "pseq" as those messages when it finishes. NNoottee:: there can be a performance penalty in using the "Previous-Sequence" facility. If it is used, aallll _M_H pro- grams have to write the sequence information to the .mh_sequences file for the folder each time they run. If the "Previous-Sequence" profile entry is not included, only _p_i_c_k and _m_a_r_k will write to the .mh_sequences file.[mh.6] MH.6.8 3MH-SEQUENCE(5) BSD Programmer's Manual MH-SEQUENCE(5) TThhee UUnnsseeeenn SSeeqquueennccee Finally, some users like to indicate messages which have not been previously seen by them. Both _i_n_c and _s_h_o_w honor the profile entry "Unseen-Sequence" to support this activ- ity. This entry in the .mh_profile should be defined as one or more sequence names separated by spaces. If there is a value for "Unseen-Sequence" in the profile, then whenever _i_n_c places new messages in a folder, the new mes- sages will also be added to the sequence(s) named in the value of this entry. Hence, a profile entry of Unseen-Sequence: unseen directs _i_n_c to add new messages to the sequence "unseen". Unlike the behavior of the "Previous-Sequence" entry in the profile, however, the sequence(s) will nnoott be zeroed by _i_n_c. Similarly, whenever _s_h_o_w (or _n_e_x_t or _p_r_e_v) displays a mes- sage, that message will be removed from any sequences named by the "Unseen-Sequence" entry in the profile.FFIILLEESS $HOME/.mh_profile The user profile <mh-dir>/context The user context <folder>/.mh_sequences Public sequences for <folder>PPRROOFFIILLEE CCOOMMPPOONNEENNTTSS Sequence-Negation: To designate messages not in a sequence Previous-Sequence: The last message specification given Unseen-Sequence: Those messages not yet seen by the userSSEEEE AALLSSOO mh(1), mark(1), pick(1), mh-profile(5)DDEEFFAAUULLTTSS NoneCCOONNTTEEXXTT AllBBUUGGSS User-defined sequences are stored in the .mh_sequences file as a series of message specifications separated by spaces. If a user-defined sequence contains too many individual message specifications, that line in the file may become too long for _M_H to handle. This will generate the error message ".mh_sequences is poorly formatted". You'll have to edit the file by hand to remove the offend- ing line.[mh.6] MH.6.8 4MH-SEQUENCE(5) BSD Programmer's Manual MH-SEQUENCE(5) This can happen to users who define the "Previ- ous-Sequence" entry in the _M_H profile and have a folder containing many messages with gaps in the numbering. A workaround for large folders is to minimize numbering gaps by using "folder -pack" often.[mh.6] MH.6.8 5
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -