Browse Source

New command to submit a bug report

Carsten Dominik 16 years ago
parent
commit
464210a0d1
4 changed files with 79 additions and 11 deletions
  1. 1 0
      doc/ChangeLog
  2. 17 9
      doc/org.texi
  3. 3 0
      lisp/ChangeLog
  4. 58 2
      lisp/org.el

+ 1 - 0
doc/ChangeLog

@@ -2,6 +2,7 @@
 
 
 	* org.texi (Agenda commands): Improve documentation of the keys to
 	* org.texi (Agenda commands): Improve documentation of the keys to
 	include inactive time stamps into the agenda view.
 	include inactive time stamps into the agenda view.
+	(Feedback): Document the new bug report command.
 
 
 2009-08-14  Dan Davison <davison@stats.ox.ac.uk>  (tiny change)
 2009-08-14  Dan Davison <davison@stats.ox.ac.uk>  (tiny change)
 
 

+ 17 - 9
doc/org.texi

@@ -646,15 +646,23 @@ active region by using the mouse to select a region, or pressing
 
 
 If you find problems with Org, or if you have questions, remarks, or ideas
 If you find problems with Org, or if you have questions, remarks, or ideas
 about it, please mail to the Org mailing list @email{emacs-orgmode@@gnu.org}.
 about it, please mail to the Org mailing list @email{emacs-orgmode@@gnu.org}.
-If you are not a member of the mailing list, your mail will be reviewed by a
-moderator and then passed through to the list.
-
-For bug reports, please provide as much information as possible,
-including the version information of Emacs (@kbd{C-h v emacs-version
-@key{RET}}) and Org (@kbd{C-h v org-version @key{RET}}), as well as
-the Org related setup in @file{.emacs}.  If an error occurs, a
-backtrace can be very useful (see below on how to create one).  Often a
-small example file helps, along with clear information about:
+If you are not a member of the mailing list, your mail will be passed to the
+list after a moderator has approved it.
+
+For bug reports, please provide as much information as possible, including
+the version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org
+(@kbd{M-x org-version @key{RET}}), as well as the Org related setup in
+@file{.emacs}.  The easiest way to do this is to use the command
+@example
+@kbd{M-x org-submit-bug-report}
+@end example
+@noindent which will put all this information into an Emacs mail buffer so
+that you only need to add your description.  If you re not sending the Email
+from within Emacs, please copy and paste the content into your Email program.
+
+If an error occurs, a backtrace can be very useful (see below on how to
+create one).  Often a small example file helps, along with clear information
+about:
 
 
 @enumerate
 @enumerate
 @item What exactly did you do?
 @item What exactly did you do?

+ 3 - 0
lisp/ChangeLog

@@ -1,6 +1,9 @@
 2009-08-18  Carsten Dominik  <carsten.dominik@gmail.com>
 2009-08-18  Carsten Dominik  <carsten.dominik@gmail.com>
 
 
 	* org.el (org-hierarchical-todo-statistics): Improve docstring.
 	* org.el (org-hierarchical-todo-statistics): Improve docstring.
+	(org-version): Return the version text.
+	(org-org-menu): Add a menu entry for the new bug reporter.
+	(org-submit-bug-report): New command.
 
 
 	* org-list.el (org-hierarchical-checkbox-statistics): Improve
 	* org-list.el (org-hierarchical-checkbox-statistics): Improve
 	docstring.
 	docstring.

+ 58 - 2
lisp/org.el

@@ -120,9 +120,9 @@ With prefix arg HERE, insert it at point."
 	     (setq git-version (concat git-version ".dirty")))
 	     (setq git-version (concat git-version ".dirty")))
 	   (setq org-version (concat org-version " (" git-version ")")))))
 	   (setq org-version (concat org-version " (" git-version ")")))))
     (let ((version (format "Org-mode version %s" org-version)))
     (let ((version (format "Org-mode version %s" org-version)))
+      (if here (insert version))
       (message version)
       (message version)
-      (if here
-	  (insert version)))))
+      version)))
 
 
 ;;; Compatibility constants
 ;;; Compatibility constants
 
 
@@ -15346,6 +15346,7 @@ See the individual commands for more information."
      "--"
      "--"
      ["Expand This Menu" org-create-customize-menu
      ["Expand This Menu" org-create-customize-menu
       (fboundp 'customize-menu-create)])
       (fboundp 'customize-menu-create)])
+    ["Send bug report" org-submit-bug-report t]
     "--"
     "--"
     ("Refresh/Reload"
     ("Refresh/Reload"
      ["Refresh setup current buffer" org-mode-restart t]
      ["Refresh setup current buffer" org-mode-restart t]
@@ -15359,6 +15360,61 @@ With optional NODE, go directly to that node."
   (interactive)
   (interactive)
   (info (format "(org)%s" (or node ""))))
   (info (format "(org)%s" (or node ""))))
 
 
+;;;###autoload
+(defun org-submit-bug-report ()
+  "Submit a bug report on Org-mode via mail.
+
+Don't hesitate to report any problems or inaccurate documentation.
+
+If you don't have setup sending mail from (X)Emacs, please copy the
+output buffer into your mail program, as it gives us important
+information about your Org-mode version and configuration."
+  (interactive)
+  (require 'reporter)
+  (org-load-modules-maybe)
+  (org-require-autoloaded-modules)
+  (let ((reporter-prompt-for-summary-p "Bug report subject: "))
+    (reporter-submit-bug-report
+     "emacs-orgmode@gnu.org"
+     (org-version)
+     (let (list)
+       (save-window-excursion
+	 (switch-to-buffer (get-buffer-create "*Warn about privacy*"))
+	 (delete-other-windows)
+	 (erase-buffer)
+	 (insert "You are about to submit a bug report to the Org-mode mailing list.
+
+The bug reporter would like to add your Org-mode and Outline
+configuration to the bug report.  This greatly simplifies the work of the
+maintainer, so please consider doing that.
+
+HOWEVER, some variables you have customized may contain private information
+like names of customers.  So if you answer yes to the prompt, you might want
+to check and remove such private information before sending the email.")
+	 (add-text-properties (point-min) (point-max) '(face org-warning))
+	 (ding)
+	 (when (yes-or-no-p "Include your Org-mode configuration ")
+	   (mapatoms
+	    (lambda (v)
+	      (and (boundp v)
+		   (string-match "\\`\\(org-\\|outline-\\)" (symbol-name v))
+		   (or (and (symbol-value v)
+			    (string-match "\\(-hook\\|-function\\)\\'" (symbol-name v)))
+		       (and
+			(get v 'custom-type) (get v 'standard-value)
+			(not (equal (symbol-value v) (eval (car (get v 'standard-value)))))))
+		   (push v list)))))
+	 (kill-buffer (get-buffer "*Warn about privacy*"))
+	 list))
+     nil nil
+     "Remember to cover the basics, that is, what you expected to happen and
+what in fact did happen.  You don't know hoe to make a good report?  See
+
+     http://orgmode.org/manual/Feedback.html#Feedback
+
+Your bug report will be posted to the Org-mode mailing list.
+------------------------------------------------------------------------")))
+
 (defun org-install-agenda-files-menu ()
 (defun org-install-agenda-files-menu ()
   (let ((bl (buffer-list)))
   (let ((bl (buffer-list)))
     (save-excursion
     (save-excursion