1 @c This is the usage section for send-pr. It is called as
2 @c chapter (Invoking send-pr) by send-pr.texi, and also as
3 @c section (Submitting Problem Reports) by gnats.texi (chapter/section
4 @c identifiers are adjusted accordingly)
6 @c FIXME! This still seems jumbled...
8 You can invoke @code{send-pr} from a shell prompt or from within
9 @sc{gnu} Emacs using @w{@samp{M-x send-pr}}.
12 * using send-pr:: Creating new Problem Reports
13 * send-pr in Emacs:: Using send-pr from within Emacs
14 * send-pr from the shell:: Invoking send-pr from the shell
19 @section Creating new Problem Reports
21 @c FIXME - this is a long node
22 Invoking @code{send-pr} presents a PR @dfn{template} with a number of
23 fields already filled in. Complete the template as thoroughly as
24 possible to make a useful bug report. Submit only one bug with each PR.
27 A template consists of three sections:
31 The top several lines of a blank template consist of a series of
32 comments that provide some basic instructions for completing the Problem
33 Report, as well as a list of valid entries for the @samp{>Category:}
34 field. These comments are all preceded by the string @samp{SEND-PR:}
35 and are erased automatically when the PR is submitted. The
36 instructional comments within @samp{<} and @samp{>} are also removed.
37 (Only these comments are removed; lines you provide that happen to have
38 those characters in them, such as examples of shell-level redirection,
42 @code{send-pr} creates a standard mail header. @code{send-pr} completes
43 all fields except the @samp{Subject:} line with default values.
44 (@xref{Fields,,Problem Report format}.)
46 @item @sc{gnats} fields
47 These are the informational fields that @sc{gnats} uses to route your
48 Problem Report to the responsible party for further action. They should
49 be filled out as completely as possible. (@xref{Fields,,Problem Report
50 format}. Also see @ref{Helpful hints,,Helpful hints}.)
55 For examples of a Problem Report template and complete Problem Report,
59 The default template contains your preconfigured @samp{>Submitter-Id:}.
60 @code{send-pr} attempts to determine values for the @samp{>Originator:}
61 and @samp{>Organization:} fields (@pxref{Fields,,Problem Report
62 format}). @code{send-pr} also attempts to find out some information
63 about your system and architecture, and places this information in the
64 @samp{>Environment:} field if it finds any.
66 You may submit problem reports to different Support Sites from the
67 default site by specifying the alternate site when you invoke
68 @code{send-pr}. Each @code{site} has its own list of categories for
69 which it accepts Problem Reports.
70 @c FIXME! This should go in..
71 @c For a list of sites to whom @code{send-pr} is configured to send
72 @c Problem Reports, type @w{@samp{send-pr -S}}.
74 (@xref{default site,,Setting a default @var{site}}.)
77 @code{send-pr} also provides the mail header section of the template
78 with default values in the @samp{To:}, @samp{From:}, and
79 @samp{Reply-To:} fields. The @samp{Subject:} field is empty.
81 The template begins with a comment section:
83 @cindex template comment section
84 @cindex comment section in the PR template
87 SEND-PR: -*- send-pr -*-
88 SEND-PR: Lines starting with `SEND-PR' will be removed
89 SEND-PR: automatically as well as all comments (the text
90 SEND-PR: below enclosed in `<' and `>').
92 SEND-PR: Please consult the document `Reporting Problems
93 SEND-PR: Using send-pr' if you are not sure how to fill out
94 SEND-PR: a problem report.
96 SEND-PR: Choose from the following categories:
101 and also contains a list of valid @code{>Category:} values for the
102 Support Site to whom you are submitting this Problem Report. One (and
103 only one) of these values should be placed in the @code{>Category:}
106 A complete sample bug report, from template to completed PR, is shown in
107 @ref{An Example}. For a complete list of valid categories, type
108 @w{@samp{send-pr -L}} at your prompt. @xref{Valid Categories,,Valid
109 Categories}, for a sample list of categories, .
112 @c FIXME.. this sounds awkward
113 The mail header is just below the comment section. Fill out the
114 @samp{Subject:} field, if it is not already completed using the value of
115 @samp{>Synopsis:}. The other mail header fields contain default values.
117 @cindex mail header section
120 To: @var{support-site}
121 Subject: @emph{complete this field}
122 From: @var{your-login}@@@var{your-site}
123 Reply-To: @var{your-login}@@@var{your-site}
124 X-send-pr-version: send-pr @value{VERSION}
129 where @var{support-site} is an alias for the Support Site you wish to
132 The rest of the template contains @sc{gnats} fields. Each field is
133 either automatically completed with valid information (such as your
134 @samp{>Submitter-Id:}) or contains a one-line instruction specifying the
135 information that field requires in order to be correct. For example,
136 the @samp{>Confidential:} field expects a value of @samp{yes} or
137 @samp{no}, and the answer must fit on one line; similarly, the
138 @samp{>Synopsis:} field expects a short synopsis of the problem, which
139 must also fit on one line. Fill out the fields as completely as
140 possible. @xref{Helpful hints,,Helpful hints}, for suggestions as to
141 what kinds of information to include.
143 In this example, words in @emph{italics} are filled in with
144 pre-configured information:
146 @cindex @code{send-pr} fields
149 >Submitter-Id: @emph{your submitter-id}
150 >Originator: @emph{your name here}
152 @emph{your organization}
153 >Confidential:<[ yes | no ] (one line)>
154 >Synopsis: <synopsis of the problem (one line)>
155 >Severity: <[non-critical | serious | critical](one line)>
156 >Priority: <[ low | medium | high ] (one line)>
157 >Category: <name of the product (one line)>
158 >Class: <[sw-bug | doc-bug | change-request | support]>
159 >Release: <release number or tag (one line)>
161 <machine, os, target, libraries (multiple lines)>
164 <precise description of the problem (multiple lines)>
166 <code/input/activities to reproduce (multiple lines)>
168 <how to correct or work around the problem, if known
173 @cindex @code{Submitter-Id} field
174 @cindex @code{>Submitter-Id:}
175 When you finish editing the Problem Report, @code{send-pr} mails it to
176 the address named in the @samp{To:} field in the mail header.
177 @code{send-pr} checks that the complete form contains a valid
181 Your copy of @code{send-pr} should have already been customized on
182 installation to reflect your @samp{>Submitter-Id:}. (@xref{Installing
183 send-pr, , Installing @code{send-pr} on your system}.) If you don't
184 know your @samp{>Submitter-Id:}, you can request it using
185 @w{@samp{send-pr --request-id}}. If your organization is not affiliated
186 with the site you send Problem Reports to, a good generic
187 @samp{>Submitter-Id:} to use is @samp{net}.
190 @cindex bad Problem Reports
192 @cindex invalid Problem Reports
193 If your PR has an invalid value in one of the @sc{Enumerated} fields
194 (@pxref{Fields,,Problem Report format}), @code{send-pr} places the PR in
195 a temporary file named @samp{/tmp/pbad@var{nnnn}} on your machine.
196 @var{nnnn} is the process identification number given to your current
197 @code{send-pr} session. If you are running @code{send-pr} from the
198 shell, you are prompted as to whether or not you wish to try editing the
199 same Problem Report again. If you are running @code{send-pr} from
200 Emacs, the Problem Report is placed in the buffer
201 @w{@samp{*send-pr-error*}}; you can edit this file and then submit it
208 @cindex subsequent mail
210 @cindex appending PRs
211 @cindex saving related mail
213 Any further mail concerning this Problem Report should be carbon-copied
214 to the @sc{gnats} mailing address as well, with the category and
215 identification number in the @samp{Subject:} line of the message.
218 Subject: Re: PR @var{category}/@var{gnats-id}: @var{original message subject}
222 Messages which arrive with @samp{Subject:} lines of this form are
223 automatically appended to the Problem Report in the @samp{>Audit-Trail:}
224 field in the order received.
226 @c ---------------------------------------------------------------
227 @node send-pr in Emacs
228 @section Using @code{send-pr} from within Emacs
229 @cindex using @code{send-pr} from within Emacs
230 @cindex @code{send-pr} within Emacs
231 @cindex invoking @code{send-pr} from Emacs
232 @cindex interactive interface
234 You can use an interactive @code{send-pr} interface from within @sc{gnu}
235 Emacs to fill out your Problem Report. We recommend that you
236 familiarize yourself with Emacs before using this feature
237 (@pxref{Introduction,,Introduction,emacs,GNU Emacs}).
239 Call @code{send-pr} with @w{@samp{M-x send-pr}}.@footnote{If typing
240 @w{@samp{M-x send-pr}} doesn't work, see your system administrator for
241 help loading @code{send-pr} into Emacs.} @code{send-pr} responds with a
242 Problem Report template preconfigured for the Support Site from which
243 you received @code{send-pr}. (If you use @code{send-pr} locally, the
244 default Support Site is probably your local site.)
246 You may also submit problem reports to different Support Sites from the
247 default site. To use this feature, invoke @code{send-pr} with
253 @code{send-pr} prompts you for the name of a @var{site}. @var{site} is
254 an alias on your local machine which points to an alternate Support
258 @code{send-pr} displays the template and prompts you in the minibuffer
265 Delete the default value @samp{other} @emph{in the minibuffer} and
266 replace it with the keyword corresponding to your problem (the list of
267 valid categories is in the topmost section of the PR template). For
268 example, if the problem you wish to report has to do with the @sc{gnu} C
269 compiler, and your support organization accepts bugs submitted for this
270 program under the category @samp{gcc}, delete @samp{other} and then type
271 @w{@samp{gcc[@key{RET}]}}. @code{send-pr} replaces the line
274 >Category: <name of the product (one line)>
285 and moves on to another field.
287 @cindex completion in Emacs
288 @cindex name completion in Emacs
289 @w{@code{send-pr}} provides name completion in the minibuffer. For
290 instance, you can also type @w{@samp{gc[@key{TAB}]}}, and @code{send-pr}
291 attempts to complete the entry for you. Typing @w{@samp{g[@key{TAB}]}}
292 may not have the same effect if several possible entries begin with
293 @samp{g}. In that case @code{send-pr} cannot complete the entry because
294 it cannot determine whether you mean @samp{gcc} or, for example,
295 @samp{gdb}, if both of those are possible categories.
296 @w{@code{send-pr}} continues to prompt you for a valid entry until you
299 @w{@code{send-pr}} prompts you interactively to enter each field for
300 which there is a range of specific choices. If you attempt to enter a
301 value which is not in the range of acceptable entries, @code{send-pr}
302 responds with @w{@samp{[No match]}} and allows you to change the entry
303 until it contains an acceptable value. This avoids unusable information
304 (at least in these fields) and also avoids typographical errors which
305 could cause problems later.
307 @code{send-pr} prompts you for the following fields:
309 @c FIXME - should these go before the discussion on completion?
313 >Confidential: (@emph{default}: no)
314 >Severity: (@emph{default}: serious)
315 >Priority: (@emph{default}: medium)
316 >Class: (@emph{default}: sw-bug)
318 >Synopsis: (@emph{this value is copied to @code{Subject:}})
323 After you complete these fields, @w{@code{send-pr}} places the cursor in
324 the @samp{>Description:} field and displays the message
327 To send the problem report use: C-c C-c
331 in the minibuffer. At this point, edit the file in the main buffer to
332 reflect your specific problem, putting relevant information in the
335 @xref{An Example}, for a sample Problem Report.
338 @w{@samp{send-pr}} provides a few key bindings to make moving
339 around in a template buffer more simple:
343 @itemx M-x change-field
344 Changes the field under the cursor. @code{edit-pr} prompts you for a
348 @itemx M-x gnats-backward-field
349 Moves the cursor to the beginning of the value of the current field.
352 @itemx M-x gnats-forward-field
353 Moves the cursor to the end of the value of the current field.
356 @itemx M-x gnats-previous-field
357 Moves the cursor back one field to the beginning of the value of the
361 @itemx M-x gnats-next-field
362 Moves the cursor forward one field to the beginning of the value of the
366 @code{send-pr} takes over again when you type @samp{C-c C-c} to send the
367 message. @code{send-pr} reports any errors in a separate buffer, which
368 remains in existence until you send the PR properly (or, of course,
369 until you explicitly kill the buffer).
371 For detailed instructions on using Emacs, see
372 @ref{Introduction,,,emacs,GNU Emacs}.
374 @node send-pr from the shell
375 @section Invoking @code{send-pr} from the shell
376 @cindex command line options
377 @cindex invoking @code{send-pr} from the shell
378 @cindex shell invocation
380 @c FIXME! Add [ -S ] right after [ -L ]...
382 send-pr [ @var{site} ]
383 [ -f @var{problem-report} | --file @var{problem-report} ]
384 [ -t @var{mail-address} | --to @var{mail-address} ]
386 [ -L | --list ] [ -P | --print ]
387 [ -V | --version] [ -h | --help ]
390 @var{site} is an alias on your local machine which points to an address
391 used by a Support Site. If this argument is not present, the default
392 @var{site} is usually the site which you received @code{send-pr} from,
393 or your local site if you use @sc{gnats} locally.
395 (@xref{default site,,Setting a default @var{site}}.)
398 Invoking @code{send-pr} with no options calls the editor named in your
399 environment variable @code{EDITOR} on a default PR template. If the
400 environment variable @code{PR_FORM} is set, its value is used as a file
401 name which contains a valid template. If @code{PR_FORM} points to a
402 missing or unreadable file, or if the file is empty, @code{send-pr}
403 generates an error message and opens the editor on a default template.
406 @item -f @var{problem-report}
407 @itemx --file @var{problem-report}
408 Specifies a file, @var{problem-report}, where a completed Problem Report
409 already exists. @code{send-pr} sends the contents of the file without
410 invoking an editor. If @var{problem-report} is @samp{-},
411 @w{@code{send-pr}} reads from standard input.
413 @item -t @var{mail-address}
414 @itemx --to @var{mail-address}
415 Sends the PR to @var{mail-address}. The default is preset when
416 @code{send-pr} is configured. @emph{This option is not recommended};
417 instead, use the argument @var{site} on the command line.
420 Sends a request for a @code{>Submitter-Id:} to the Support Site.
424 @cindex listing valid categories
425 Prints the list of valid @code{>Category:} values on standard output.
431 Displays a list of valid @var{site} values on standard output. No mail
437 Displays the PR template. If the variable @code{PR_FORM} is set in your
438 environment, the file it specifies is printed. If @code{PR_FORM} is not
439 set, @code{send-pr} prints the standard blank form. If the file
440 specified by @code{PR_FORM} doesn't exist, @code{send-pr} displays an
441 error message. No mail is sent.
445 Displays the @code{send-pr} version number and a usage summary. No mail
450 Displays a usage summary for @code{send-pr}. No mail is sent.
454 @section Helpful hints
455 @cindex helpful hints
456 @cindex Using and Porting GNU CC
457 @cindex effective problem reporting
458 @cindex kinds of helpful information
459 @cindex information to submit
460 @cindex Report all the facts!
462 There is no orthodox standard for submitting effective bug reports,
463 though you might do well to consult the section on submitting bugs for
464 @sc{gnu} @code{gcc} in @ref{Bugs, , Reporting Bugs, gcc, Using and
465 Porting GNU CC}, by Richard Stallman. This section contains
466 instructions on what kinds of information to include and what kinds of
469 In general, common sense (assuming such an animal exists) dictates the
470 kind of information that would be most helpful in tracking down and
471 resolving problems in software.
474 Include anything @emph{you} would want to know if you were looking at
475 the report from the other end. There's no need to include every minute
476 detail about your environment, although anything that might be different
477 from someone else's environment should be included (your path, for
481 Narratives are often useful, given a certain degree of restraint. If a
482 person responsible for a bug can see that A was executed, and then B and
483 then C, knowing that sequence of events might trigger the realization of
484 an intermediate step that was missing, or an extra step that might have
485 changed the environment enough to cause a visible problem. Again,
486 restraint is always in order (``I set the build running, went to get a
487 cup of coffee (Columbian, cream but no sugar), talked to Sheila on the
488 phone, and then THIS happened@dots{}'') but be sure to include anything
492 Richard Stallman writes, ``The fundamental principle of reporting bugs
493 usefully is this: @strong{report all the facts}. If you are not sure
494 whether to state a fact or leave it out, state it!'' This holds true
495 across all problem reporting systems, for computer software or social
496 injustice or motorcycle maintenance. It is especially important in the
497 software field due to the major differences seemingly insignificant
498 changes can make (a changed variable, a missing semicolon, etc.).
501 Submit only @emph{one} problem with each Problem Report. If you have
502 multiple problems, use multiple PRs. This aids in tracking each problem
503 and also in analyzing the problems associated with a given program.
506 It never hurts to do a little research to find out if the bug you've
507 found has already been reported. Most software releases contain lists
508 of known bugs in the Release Notes which come with the software; see
509 your system administrator if you don't have a copy of these.
512 The more closely a PR adheres to the standard format, the less
513 interaction is required by a database administrator to route the
514 information to the proper place. Keep in mind that anything that
515 requires human interaction also requires time that might be better spent
516 in actually fixing the problem. It is therefore in everyone's best
517 interest that the information contained in a PR be as correct as
518 possible (in both format and content) at the time of submission.