text.tex

来自「早期freebsd实现」· TEX 代码 · 共 724 行 · 第 1/3 页

TEX
724
字号
then anytime a \MH/ command was given \eg{notseen} as a \arg{msg} or\arg{msgs} argument,it would substitute all messages that are not a member of the sequence\eg{seen}.That is,\example refile notseen +new\endexampledoes just that.The value of the \entry{Sequence-Negation} entry in the profile can beany string.Hence,experienced users of \MH/ do not use a word,but rather a special character which their shell does not interpret(users of the \pgm{CShell} use a single carat, \eg{`\^'},while users of the Bourne shell use an exclamation-mark, \eg{`!'\/}).This is because there is nothing to prevent a user of \MH/ from defining asequence with this string as its prefix,if the string is nothing but letters and digits.Obviously,this could lead to confusing behaviorif the \entry{Sequence-Negation} entry leads \MH/ to believe that twosequences are opposites, by virtue of their names differing by the prefixstring.\subsubsection{The Previous Sequence}Many times users find themselves issuing a series of commands on the samesequences of messages.If the user first defined these messages as a sequence,then considerable typing may be saved.If the user doesn't have this foresight,\MH/ provides a handy way of remembering the \arg{msgs} or\arg{msg} argument last given to a \MH/ command by the user.If the entry \entry{Previous-Sequence} is defined in the \profile/ file,then when the command finishes,it will define the sequence(s) named in the value of this entry as beingdefined as those messages that were specified.Hence, a profile entry of\example Previous-Sequence: pseq\endexampledirects any \MH/ command that accepts a \arg{msg} or \arg{msgs} argument todefine the sequence \eg{pseq} as those messages when it finishes.More than one sequence name may be placed in this entry,separated with spaces.The one disadvantage of this approachis that all \MH/ commands have to update the sequence information forthe folder each time they run(although most commands read this information,usually only \pgm{pick} and \pgm{mark} have to write this information out).\section{Composition of Mail}Two new facilities have been added to give the \MH/ user greater power incomposing and sending mail:the {\it draft folder},which allows a user to maintain a folder of message drafts;and, {\it draft pushing},which permits a user to \pgm{send} the current draft in the background.\subsection{The Draft Folder}The \pgm{comp}, \pgm{dist}, \pgm{forw}, and \pgm{repl} commands have twohidden switches, \switch{draftfolder~+folder} and \switch{draftmessage~msg}.If \switch{draftfolder~+folder} is used,these commands are directed to construct a draft message in the indicatedfolder.If \switch{draftmessage~msg} is not used, it defaults to \arg{new}(unless the user invokes \pgm{comp} with \switch{use},in which case the default is \arg{cur}).Hence, the user may have several message compositions in progresssimultaneously.Now, all of the \MH/ tools are available on each of the user's messagedrafts(e.g., \pgm{show}, \pgm{scan}, \pgm{pick}, and so on).If the folder does not exist,the user is asked if it should be created (just like with \pgm{refile\/}).Also,the last draft message the user was composing is known as \arg{cur} in thedraft folder.\parFurthermore,the \pgm{send} command has these switches as well.Hence, from the shell,the user can send off whatever drafts desired using thestandard \MH/ \arg{msgs} convention with \switch{draftmessage msgs}.If no \arg{msgs} are given, it defaults to \arg{cur}.\parIn addition,all five programs have a \switch{nodraftfolder} switch,which undoes the last occurance of \switch{draftfolder~folder}(useful if the latter occurs in the user's \MH/ profile).\parIf the user does not give the \switch{draftfolder~+folder} switch,then all these commands act ``normally''.Note that the \switch{draft} switch to \pgm{send} and \pgm{show}still refers to the file called \eg{draft} in the user's \MH/directory.In the interests of economy of expression,when using \pgm{comp} or \pgm{send},the user needn't prefix the draft \arg{msg} or \arg{msgs} with\switch{draftmessage}.Both of these commands accept a \arg{file} or \arg{files} argument,and they will, if given \switch{draftfolder~+folder} treat these argumentsas \arg{msg} or \arg{msgs}.%\nfootnote{This may appear to be inconsistant, at first,but it saves a lot of typing.}Hence,\example send -draftf +draft first\endexampleis the same as\example send -draftf +draft -draftm first\endexample\parTo make all this a bit more clear, here are some examples.Let's assume that the following entries are in the \profile/ file:\example    comp: -draftfolder +draft\\    dist: -draftfolder +draft\\    forw: -draftfolder +draft\\    repl: -draftfolder +draft\\    sendf: -draftfolder +draft%\endexampleFurthermore,let's assume that the program \pgm{sendf} is a symbolic link in the user's \file{\$HOME/bin/} directory to \pgm{send}.Then, any of the commands\example    comp\\    dist\\    forw\\    repl%\endexampleconstructs the message draft in the \eg{draft} folder using the \arg{new}message number.Furthermore,they each define \arg{cur} in this folder to be that message draft.If the user were to use the \pgm{quit} option at \whatnow/ level,then later on,if no other draft composition was done,the draft could be sent with simply\example sendf\endexampleOr,if more editing was required,the draft could be edited with\example comp -use\endexampleInstead,if other drafts had been composed in the meantime,so that this message draft was no longer known as \arg{cur} in the \eg{draft}folder,then the user could \pgm{scan} the folder to see which message draft in thefolder should be used for editing or sending.Clever users could even employ \pgm{pick} to do the work:\example    comp -use \bq{pick +draft -to bug-mh}\\\noalign{\leftline{or}}    sendf \bq{pick +draft -to bug-mh}%\endexampleNote that in the \pgm{comp} example,the output from \pgm{pick} must resolve to a single message draft(it makes no sense to talk about composing two or more drafts with oneinvocation of \pgm{comp\/}).In contrast,in the \pgm{send} example,as many message drafts as desired can appear,since \pgm{send} doesn't mind sending more than one draft at a time.\parNote that the argument \switch{draftfolder~+folder} is notincluded in the profile entry for \pgm{send},since when \pgm{comp}, et. al., invoke \pgm{send} directly,they supply \pgm{send} with the \unix/ pathname of the message draft,and {\it not} a \arg{draftmessage~msg} argument.As far as \pgm{send} is concerned,a {\it draft folder} is not being used.\parIt is important to realize that \MH/ treats the draft folder like a standard\MH/ folder in nearly all respects.There are two exceptions:\underbar{first}under no circumstancs will the \arg{draftfolder~folder} switch cause thenamed folder to become the current folder.%\nfootnote{Obviously,if the folder appeared in the context of a standard \arg{+folder}argument to an \MH/ program, as in\example scan +draft\endexampleit might become the current folder, depending on the context changes of the\MH/ program in question.}\underbar{Second},although conceptually \pgm{send} deletes the \arg{msgs} named in the draftfolder,it does not call \entry{delete-prog} to perform the deletion.\subsection{What Happens if the Draft Exists}When the \pgm{comp}, \pgm{dist}, \pgm{forw}, and \pgm{repl} commands areinvoked and the draft you indicated already exists,these programs will prompt the user for a reponse directing the program'saction.In \mh4, the prompt is\begingroup    \smallertype    \example	``/usr/src/uci/mh/mhbox/draft'' exists; replace, list, or quit?%    \endexample\endgroupThe appropriate responses and their meanings are:\smallskip{\advance\leftskip by\parindent\item{\underbar{replace}:} deletes the draft and starts afresh.\item{\underbar{list}:} lists the draft.\item{\underbar{quit}:} leaves the draft intact and exits.\smallskip}\noindentIn addition, if you specified \switch{draftfolder~folder} to the command,then one other response will be accepted:\smallskip{\advance\leftskip by\parindent\item{\underbar{new}:} finds a new draft,just as if \switch{draftmessage~new} had been given.\smallskip}\noindentFinally, the \pgm{comp} command will accept one more response:\smallskip{\advance\leftskip by\parindent\item{\underbar{use}:} re-uses the draft,just as if \switch{use} had been given.\smallskip}\subsection{The Push Option at\/{ }\whatnow/ Level}The \pgm{comp}, \pgm{dist}, \pgm{forw}, and \pgm{repl} commands takean additional option for the \whatnow/ query.The \pgm{push} option, which must be spelled out fully,directs the command to \pgm{send} the draftin a special detached fashion,with all normal output is discarded.If \pgm{push} is used and the draft can not be sent,then \MH/ will send the user a message,indicating the name of the draft file,and an explanation of the failure.Although using \pgm{push} calls \man{send}(1),the \pgm{send} command will consult the profile entry for \pgm{push}.\parThe user can also invoke \pgm{send} from the shell with the \switch{push}switch,which makes \pgm{send} act like it had been \pgm{push\/}'d by one of thecomposition commands.%\nfootnote{Note that in this case,\pgm{send} consults the profile entry for whatever name it was invoked as,such as \pgm{sendf}.}\parThe \pgm{send} program also has two other switches,\switch{unique} and \switch{nounique}.If \pgm{push\/}'d,then the \switch{unique} switch tells \pgm{send} to rename the draft file toa unique filename.This allows the user to have several drafts being sent simultaneously

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?