Mercurial > emacs
comparison lisp/mail/reporter.el @ 4855:e12addbc2c52
(reporter-submit-bug-report, reporter-mailer): reporter-mailer
variable can now take a list of mailers, trying each one until an
commandp one is found.
Fixed elisp archive address.
Handle dumping of buffer local variables via reporter-eval-buffer.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 18 Oct 1993 05:37:51 +0000 |
parents | 4df93ff816c4 |
children | 9cde7d7fea1f |
comparison
equal
deleted
inserted
replaced
4854:a964061ab350 | 4855:e12addbc2c52 |
---|---|
1 ;;; reporter.el --- customizable bug reporting of lisp programs | 1 ;;; reporter.el --- customizable bug reporting of lisp programs |
2 ;; Copyright (C) 1993 Free Software Foundation, Inc. | |
3 | 2 |
4 ;; Author: 1993 Barry A. Warsaw, Century Computing Inc. <bwarsaw@cen.com> | 3 ;; Author: 1993 Barry A. Warsaw, Century Computing Inc. <bwarsaw@cen.com> |
5 ;; Maintainer: bwarsaw@cen.com | 4 ;; Maintainer: bwarsaw@cen.com |
6 ;; Created: 19-Apr-1993 | 5 ;; Created: 19-Apr-1993 |
6 ;; Version: 1.23 | |
7 ;; Last Modified: 1993/09/02 20:28:36 | |
7 ;; Keywords: bug reports lisp | 8 ;; Keywords: bug reports lisp |
8 | 9 |
10 ;; Copyright (C) 1993 Free Software Foundation, Inc. | |
11 | |
9 ;; This file is part of GNU Emacs. | 12 ;; This file is part of GNU Emacs. |
10 ;; | 13 |
11 ;; This program is free software; you can redistribute it and/or modify | 14 ;; GNU Emacs is free software; you can redistribute it and/or modify |
12 ;; it under the terms of the GNU General Public License as published by | 15 ;; it under the terms of the GNU General Public License as published by |
13 ;; the Free Software Foundation; either version 2 of the License, or | 16 ;; the Free Software Foundation; either version 2, or (at your option) |
14 ;; (at your option) any later version. | 17 ;; any later version. |
15 ;; | 18 |
16 ;; This program is distributed in the hope that it will be useful, | 19 ;; GNU Emacs is distributed in the hope that it will be useful, |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
19 ;; GNU General Public License for more details. | 22 ;; GNU General Public License for more details. |
20 ;; | 23 |
21 ;; You should have received a copy of the GNU General Public License | 24 ;; You should have received a copy of the GNU General Public License |
22 ;; along with this program; if not, write to the Free Software | 25 ;; along with GNU Emacs; see the file COPYING. If not, write to |
23 ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 26 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
24 | 27 |
25 ;; Introduction | 28 ;; Introduction |
26 ;; ============ | 29 ;; ============ |
27 ;; This program is for lisp package authors and is used to ease | 30 ;; This program is for lisp package authors and is used to ease |
28 ;; reporting of bugs. When invoked, reporter-submit-bug-report will | 31 ;; reporting of bugs. When invoked, reporter-submit-bug-report will |
54 ;; Mailing List | 57 ;; Mailing List |
55 ;; ============ | 58 ;; ============ |
56 ;; I've set up a mailing list to report bugs or suggest enhancements, | 59 ;; I've set up a mailing list to report bugs or suggest enhancements, |
57 ;; etc. This list's intended audience is elisp package authors who are | 60 ;; etc. This list's intended audience is elisp package authors who are |
58 ;; using reporter and want to stay current with releases. Here are the | 61 ;; using reporter and want to stay current with releases. Here are the |
59 ;; relevant addresses: | 62 ;; relevent addresses: |
60 ;; | 63 ;; |
61 ;; Administrivia: reporter-request@anthem.nlm.nih.gov | 64 ;; Administrivia: reporter-request@anthem.nlm.nih.gov |
62 ;; Submissions: reporter@anthem.nlm.nih.gov | 65 ;; Submissions: reporter@anthem.nlm.nih.gov |
63 | 66 |
64 ;; LCD Archive Entry: | 67 ;; LCD Archive Entry: |
65 ;; reporter|Barry A. Warsaw|warsaw@cen.com| | 68 ;; reporter|Barry A. Warsaw|bwarsaw@cen.com| |
66 ;; Customizable bug reporting of lisp programs.| | 69 ;; Customizable bug reporting of lisp programs.| |
67 ;; 1993/05/22 00:29:49|1.18|~/misc/reporter.el.Z| | 70 ;; 1993/09/02 20:28:36|1.23|~/misc/reporter.el.Z| |
68 | 71 |
69 ;;; Code: | 72 ;;; Code: |
70 | 73 |
71 | 74 |
72 ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | 75 ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv |
73 ;; user defined variables | 76 ;; user defined variables |
74 | 77 |
75 (defvar reporter-mailer 'mail | 78 (defvar reporter-mailer '(vm-mail mail) |
76 "*Mail package to use to generate bug report buffer.") | 79 "*Mail package to use to generate bug report buffer. |
80 This can either be a function symbol or a list of function symbols. | |
81 If a list, it tries to use each specified mailer in order until an | |
82 existing one is found.") | |
83 | |
77 | 84 |
78 ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 85 ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
79 ;; end of user defined variables | 86 ;; end of user defined variables |
80 | 87 |
81 (defvar reporter-eval-buffer nil | 88 (defvar reporter-eval-buffer nil |
82 "Buffer to retrieve variable's value from. | 89 "Buffer to retrieve variable's value from. |
83 This is necessary to properly support the printing of buffer-local | 90 This is necessary to properly support the printing of buffer-local |
84 variables. Current buffer will always be the mail buffer being | 91 variables. Current buffer will always be the mail buffer being |
85 composed.") | 92 composed.") |
93 | |
86 | 94 |
87 (defun reporter-dump-variable (varsym) | 95 (defun reporter-dump-variable (varsym) |
88 "Pretty-print the value of the variable in symbol VARSYM." | 96 "Pretty-print the value of the variable in symbol VARSYM." |
89 (let ((val (save-excursion | 97 (let ((val (save-excursion |
90 (set-buffer reporter-eval-buffer) | 98 (set-buffer reporter-eval-buffer) |
148 ADDRESS is the email address for the package's maintainer. PKGNAME is | 156 ADDRESS is the email address for the package's maintainer. PKGNAME is |
149 the name of the mode (you must explicitly concat any version numbers). | 157 the name of the mode (you must explicitly concat any version numbers). |
150 VARLIST is the list of variables to dump (do a `\\[describe-function] reporter-dump-state' | 158 VARLIST is the list of variables to dump (do a `\\[describe-function] reporter-dump-state' |
151 for details). Optional PRE-HOOKS and POST-HOOKS are passed to | 159 for details). Optional PRE-HOOKS and POST-HOOKS are passed to |
152 `reporter-dump-state'. Optional SALUTATION is inserted at the top of the | 160 `reporter-dump-state'. Optional SALUTATION is inserted at the top of the |
153 mail buffer, and point is left after the salutation. | 161 mail buffer, and point is left after the saluation. |
154 | 162 |
155 The mailer used is described in the variable `reporter-mailer'." | 163 The mailer used is described in the variable `reporter-mailer'." |
156 | |
157 (let ((reporter-eval-buffer (current-buffer)) | 164 (let ((reporter-eval-buffer (current-buffer)) |
158 (mailbuf (progn (call-interactively reporter-mailer) | 165 (mailbuf |
159 (current-buffer)))) | 166 (progn |
167 (call-interactively | |
168 (if (nlistp reporter-mailer) | |
169 reporter-mailer | |
170 (let ((mlist reporter-mailer) | |
171 (mailer nil)) | |
172 (while mlist | |
173 (if (commandp (car mlist)) | |
174 (setq mailer (car mlist) | |
175 mlist nil) | |
176 (setq mlist (cdr mlist)))) | |
177 (if (not mailer) | |
178 (error | |
179 "variable `%s' does not contain a command for mailing." | |
180 "reporter-mailer")) | |
181 mailer))) | |
182 (current-buffer)))) | |
160 (require 'sendmail) | 183 (require 'sendmail) |
161 (pop-to-buffer reporter-eval-buffer) | 184 (pop-to-buffer reporter-eval-buffer) |
162 (pop-to-buffer mailbuf) | 185 (pop-to-buffer mailbuf) |
163 (goto-char (point-min)) | 186 (goto-char (point-min)) |
164 ;; different mailers use different separators, some may not even | 187 ;; different mailers use different separators, some may not even |