{
    "content": [
        {
            "type": "text",
            "text": "# mh-draft(5mh) (man)\n\n**Summary:** mh-draft - draft folder facility for nmh message system\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **DESCRIPTION** (2 lines) — 2 subsections\n  - The Draft Folder (98 lines)\n  - What Happens if the Draft Exists (26 lines)\n- **FILES** (2 lines)\n- **PROFILE COMPONENTS** (2 lines)\n- **CONTEXT** (5 lines)\n\n## Full Content\n\n### NAME\n\nmh-draft - draft folder facility for nmh message system\n\n### DESCRIPTION\n\nThere are a number of interesting advanced facilities for the composition of outgoing mail.\n\n#### The Draft Folder\n\nThe  comp,  dist,  forw,  repl,  send,  and whom commands each take the switches -draftfolder\n+folder and -draftmessage msg, which allow you to manipulate the various draft  messages  you\nare composing.\n\nIf  -draftfolder +folder is used, draft messages will be constructed in the indicated folder.\nThe “Draft-Folder” profile entry may be used to specify a default draft folder.\n\nIf the switch -draftmessage msg is given, the specified draft is used to compose the message.\nIf  -draftmessage  msg is not used, then the draft defaults to `new' (create a new draft) un‐\nless the user invokes comp with -use, in which case the default is `cur'.\n\nHence, the user may have several message compositions in progress simultaneously.   Now,  all\nof  the nmh tools are available on each of the user's message drafts (e.g.  show, scan, pick,\nand so on).  If the folder 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 known as `cur' in the\ndraft folder.\n\nUsing send, the user can send drafts using the standard nmh `msgs' convention with -draftmes‐‐\nsage msgs.  If no `msgs' are given, it defaults to `cur'.\n\nIn addition, all of these programs have a -nodraftfolder switch, which undoes the last occur‐\nrence of -draftfolder folder (useful if a default is specified in the user's nmh profile).\n\nIf the user does not give the -draftfolder +folder switch, then all these commands act  “nor‐\nmally”.  Note that the -draft switch to send and show still refers to the file called `draft'\nin the user's nmh directory.  In the interests of economy of expression, when using  comp  or\nsend,  the  user  needn't prefix the draft `msg' or `msgs' with -draftmessage.  Both of these\ncommands accept a `file' or `files' argument and they will, if  given  -draftfolder  +folder,\ntreat these arguments as `msg' or `msgs'.  (This may appear to be inconsistent, at first, but\nit saves 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 assume that  the  following\nentries 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 in the user's\n$HOME/bin/ directory to send.  Now,\n\ncomp\ndist\nforw\nrepl\n\nwill construct the message draft in the `draft' folder using the `new' message number.   Fur‐\nthermore,  they  each define `cur' in this folder to be that message draft.  If the user were\nto use the quit option at the `What now?' prompt, then later on, if no other  draft  composi‐\ntion was done, 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 draft was no longer\nknown as `cur' in the `draft' folder, then the user could scan the folder to see  which  mes‐\nsage  draft  should  be  used for editing or sending.  Clever users could even employ a back‐\nquoted pick to 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  single  message  draft\n(it  makes  no sense to talk about composing two or more drafts with one invocation of comp).\nIn contrast, in the send example, as many message drafts as desired can  appear,  since  send\ndoesn't mind sending more than one draft at a time.\n\nNote  that  the  argument -draftfolder +folder is not included in the profile entry for send,\nsince when comp, et al, invoke send directly, they supply send with the Unix pathname of  the\nmessage draft; not a -draftmessage msg argument.  As far as send is concerned, a draft folder\nis not being used.\n\nIt is important to realize that nmh treats the draft folder like a  standard  nmh  folder  in\nnearly all respects.  There are two exceptions:\n\nFirst,  under  no circumstances will the -draftfolder folder switch cause the named folder to\nbecome the current folder.  Obviously, if the folder appeared in the context  of  a  standard\n+folder argument to an nmh program, as in\n\nscan +drafts\n\nit  might  become  the current folder, depending on the context changes of the nmh program in\nquestion.\n\nSecond, although conceptually send deletes the `msgs' named in the draft folder, it does  not\ncall delete-prog to perform the deletion.\n\n#### What Happens if the Draft Exists\n\nWhen  the comp, dist, forw, and repl commands are invoked and the draft you indicated already\nexists, these programs will prompt the user for a response directing  the  program's  action.\nThe 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 one other response\nwill be accepted:\n\nnew       creates a new draft\n\njust as if -draftmessage new had been given.  Finally, the comp command will accept one  more\nresponse:\n\nuse       re-uses the draft\n\njust as if -use had been given.\n\n### FILES\n\n$HOME/.mhprofile   The user's profile.\n\n### PROFILE COMPONENTS\n\nDraft-Folder:       For a default draft folder\n\n### CONTEXT\n\nNone\n\n\n\nnmh-1.7.1                                    2012-03-18                                MH-DRAFT(5mh)\n\n"
        }
    ],
    "structuredContent": {
        "command": "mh-draft",
        "section": "5mh",
        "mode": "man",
        "summary": "mh-draft - draft folder facility for nmh message system",
        "synopsis": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": [
                    {
                        "name": "The Draft Folder",
                        "lines": 98
                    },
                    {
                        "name": "What Happens if the Draft Exists",
                        "lines": 26
                    }
                ]
            },
            {
                "name": "FILES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "PROFILE COMPONENTS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "CONTEXT",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}