{
    "mode": "info",
    "parameter": "MH-DRAFT",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/MH-DRAFT/json",
    "generated": "2026-07-05T13:01:44Z",
    "sections": {
        "NAME": {
            "content": "mh-draft - draft folder facility for nmh message system\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "There  are a number of interesting advanced facilities for the composi-\ntion of outgoing mail.\n\nThe Draft Folder\nThe comp, dist, forw, repl, send,  and  whom  commands  each  take  the\nswitches -draftfolder +folder and -draftmessage msg, which allow you to\nmanipulate the various draft messages you are composing.\n\nIf -draftfolder +folder is used, draft messages will be constructed  in\nthe  indicated folder.  The \"Draft-Folder\" profile entry may be used to\nspecify a default draft folder.\n\nIf the switch -draftmessage msg is given, the specified draft  is  used\nto  compose  the  message.   If -draftmessage msg is not used, then the\ndraft defaults to `new' (create a new draft) unless  the  user  invokes\ncomp with -use, in which case the default is `cur'.\n\nHence,  the  user may have several message compositions in progress si-\nmultaneously.  Now, all of the nmh tools are available on each  of  the\nuser's  message  drafts  (e.g.   show,  scan, pick, and so on).  If the\nfolder does not exist, the user is asked if it should be created  (just\nlike  with  refile).   The last draft message the user was composing is\nknown as `cur' in the draft folder.\n\nUsing send, the user can send drafts using the standard nmh `msgs' con-\nvention  with  -draftmessage msgs.  If no `msgs' are given, it defaults\nto `cur'.\n\nIn addition, all of these programs have a -nodraftfolder switch,  which\nundoes  the last occurrence of -draftfolder folder (useful if a default\nis specified in the user's nmh profile).\n\nIf the user does not give the -draftfolder  +folder  switch,  then  all\nthese commands act \"normally\".  Note that the -draft switch to send and\nshow still refers to the file called `draft' in the user's  nmh  direc-\ntory.   In  the  interests of economy of expression, when using comp or\nsend, the user needn't prefix the draft `msg' or `msgs' with -draftmes-\nsage.   Both  of these commands accept a `file' or `files' argument and\nthey will, if given -draftfolder  +folder,  treat  these  arguments  as\n`msg' or `msgs'.  (This may appear to be inconsistent, at first, but it\nsaves a lot of typing.)  Hence,\n\nsend -draftfolder +drafts first\n\nis the same as\n\nsend -draftfolder +drafts -draftmessage first\n\nTo make all this a bit more clear, here are some examples.   Let's  as-\nsume that the following entries are in the nmh profile:\n\nDraft-Folder: drafts\nsendf: -draftfolder +drafts\n\nFurthermore,  let's  assume that the program sendf is a (symbolic) link\nin the user's $HOME/bin/ directory to send.  Now,\n\ncomp\ndist\nforw\nrepl\n\nwill construct the message draft in the `draft' folder using the  `new'\nmessage  number.  Furthermore, they each define `cur' in this folder to\nbe that message draft.  If the user were to use the quit option at  the\n`What  now?'  prompt,  then later on, if no other draft composition was\ndone, the draft could be sent with simply\n\nsendf\n\nOr, if more editing was required, the draft could be edited with\n\ncomp -use\n\nIf other drafts had been composed in the meantime, so that this message\ndraft was no longer known as `cur' in the `draft' folder, then the user\ncould scan the folder to see which message draft  should  be  used  for\nediting  or  sending.  Clever users could even employ a backquoted pick\nto do the work:\n\ncomp -use `pick +drafts -to nmh-workers`\n\nor\n\nsendf `pick +drafts -to nmh-workers`\n\nNote that in the comp example, the output from pick must resolve  to  a\nsingle  message draft (it makes no sense to talk about composing two or\nmore drafts with one invocation of comp).  In contrast, in the send ex-\nample, as many message drafts as desired can appear, since send doesn't\nmind sending more than one draft at a time.\n\nNote that the argument -draftfolder +folder is not included in the pro-\nfile entry for send, since when comp, et al, invoke send directly, they\nsupply send with  the  Unix  pathname  of  the  message  draft;  not  a\n-draftmessage  msg  argument.   As  far  as  send is concerned, a draft\nfolder is not being used.\n\nIt is important to realize that nmh treats  the  draft  folder  like  a\nstandard nmh folder in nearly all respects.  There are two exceptions:\n\nFirst, under no circumstances will the -draftfolder folder switch cause\nthe named folder to become  the  current  folder.   Obviously,  if  the\nfolder appeared in the context of a standard +folder argument to an nmh\nprogram, as in\n\nscan +drafts\n\nit might become the current folder, depending on the context changes of\nthe nmh program in question.\n\nSecond,  although  conceptually  send  deletes  the `msgs' named in the\ndraft folder, it does not call delete-prog to perform the deletion.\n\nWhat Happens if the Draft Exists\nWhen the comp, dist, forw, and repl commands are invoked and the  draft\nyou indicated already exists, these programs will prompt the user for a\nresponse directing the program's action.  The prompt is\n\nDraft ``/home/foobar/nmhbox/draft'' exists (xx bytes).\nDisposition?\n\nThe appropriate responses and their meanings are:\n\nreplace   deletes the draft and starts afresh\nlist      lists the draft\nrefile    files the draft into a folder and starts afresh\nquit      leaves the draft intact and exits\n\nIn addition, if you specified -draftfolder folder to the command,  then\none other response will be accepted:\n\nnew       creates a new draft\n\njust as if -draftmessage new had been given.  Finally, the comp command\nwill accept one more response:\n\nuse       re-uses the draft\n\njust as if -use had been given.\n",
            "subsections": []
        },
        "FILES": {
            "content": "$HOME/.mhprofile   The user's profile.\n",
            "subsections": []
        },
        "PROFILE COMPONENTS": {
            "content": "Draft-Folder:       For a default draft folder\n",
            "subsections": []
        },
        "CONTEXT": {
            "content": "None\n\nnmh-1.7.1                         2012-03-18                     MH-DRAFT(5mh)",
            "subsections": []
        }
    },
    "summary": "mh-draft - draft folder facility for nmh message system",
    "flags": [],
    "examples": [],
    "see_also": []
}