From: "Drew Adams" <drew.adams@oracle.com>
To: "'Glenn Morris'" <rgm@gnu.org>, <13141@debbugs.gnu.org>
Subject: bug#13141: [PATCH]: bug#13141: 24.3.50; Be able to customize the info included by default for`report-emacs-bug'
Date: Tue, 11 Dec 2012 11:59:56 -0800 [thread overview]
Message-ID: <CFD4B47B74BB4BBFAD8FC1F34FA11432@us.oracle.com> (raw)
In-Reply-To: <9k62485q68.fsf@fencepost.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 738 bytes --]
> tags 13141 wontfix
> stop
>
> "Drew Adams" wrote:
>
> > Enhancement request: Let users customize the info that is included
> > by default in the bug-report editing buffer
>
> There is no need for such complexity.
> You don't have to faithfully use emacs -Q; M-x
> report-emacs-bug for each
> of your 1000+ bug reports, you can just mail bug-gnu-emacs
> and make your
> own call as to what info is needed. For example, it is
> obvious that none
> of the boilerplate information has any relevance to this request.
> And configuration options have no relevance to doc bugs, etc.
> If you don't want to make that call, then accept the defaults and move
> on.
This is not about me. (Is it about you, perhaps?)
Attached is a patch.
[-- Attachment #2: emacsbug.patch --]
[-- Type: application/octet-stream, Size: 10566 bytes --]
diff -c emacsbug.el emacsbug-patched-2012-12-11.el
*** emacsbug.el Tue Dec 11 11:41:54 2012
--- emacsbug-patched-2012-12-11.el Tue Dec 11 11:53:46 2012
***************
*** 58,63 ****
--- 58,81 ----
:group 'emacsbug
:type 'boolean)
+ (defcustom report-emacs-bug-included-fields '(version settings major-mode
+ minor-modes recent-input
+ recent-messages load-shadows
+ features)
+ "Fields to include by default for command `report-emacs-bug'.
+ The fields are included automatically in the buffer where you edit
+ your bug report."
+ :type '(set
+ (const :tag "Emacs version info" version)
+ (const :tag "Important settings" settings)
+ (const :tag "Major mode" major-mode)
+ (const :tag "Minor modes" minor-modes)
+ (const :tag "Recent input" recent-input)
+ (const :tag "Recent messages" recent-messages)
+ (const :tag "Load-path shadows" load-shadows)
+ (const :tag "Features" features))
+ :group 'convenience)
+
;; User options end here.
(defvar report-emacs-bug-orig-text nil
***************
*** 229,323 ****
(let ((txt (delete-and-extract-region (1+ user-point) (point))))
(insert (propertize "\n" 'display txt)))
! (insert "\n\nIn " (emacs-version) "\n")
! (if (stringp emacs-bzr-version)
! (insert "Bzr revision: " emacs-bzr-version "\n"))
! (if (fboundp 'x-server-vendor)
! (condition-case nil
! ;; This is used not only for X11 but also W32 and others.
! (insert "Windowing system distributor `" (x-server-vendor)
! "', version "
! (mapconcat 'number-to-string (x-server-version) ".") "\n")
! (error t)))
! (let ((lsb (with-temp-buffer
! (if (eq 0 (ignore-errors
! (call-process "lsb_release" nil '(t nil)
! nil "-d")))
! (buffer-string)))))
! (if (stringp lsb)
! (insert "System " lsb "\n")))
! (when (and system-configuration-options
! (not (equal system-configuration-options "")))
! (insert "Configured using:\n `configure "
! system-configuration-options "'\n\n")
! (fill-region (line-beginning-position -1) (point)))
! (insert "Important settings:\n")
! (mapc
! (lambda (var)
! (let ((val (getenv var)))
! (if val (insert (format " value of $%s: %s\n" var val)))))
! '("EMACSDATA" "EMACSDOC" "EMACSLOADPATH" "EMACSPATH"
! "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES"
! "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG" "XMODIFIERS"))
! (insert (format " locale-coding-system: %s\n" locale-coding-system))
! (insert (format " default enable-multibyte-characters: %s\n"
! (default-value 'enable-multibyte-characters)))
! (insert "\n")
! (insert (format "Major mode: %s\n"
! (format-mode-line
! (buffer-local-value 'mode-name from-buffer)
! nil nil from-buffer)))
! (insert "\n")
! (insert "Minor modes in effect:\n")
! (dolist (mode minor-mode-list)
! (and (boundp mode) (buffer-local-value mode from-buffer)
! (insert (format " %s: %s\n" mode
! (buffer-local-value mode from-buffer)))))
! (insert "\n")
! (insert "Recent input:\n")
! (let ((before-keys (point)))
! (insert (mapconcat (lambda (key)
! (if (or (integerp key)
! (symbolp key)
! (listp key))
! (single-key-description key)
! (prin1-to-string key nil)))
! (or recent-keys (recent-keys))
! " "))
! (save-restriction
! (narrow-to-region before-keys (point))
! (goto-char before-keys)
! (while (progn (move-to-column 50) (not (eobp)))
! (search-forward " " nil t)
! (insert "\n"))))
! (let ((message-buf (get-buffer "*Messages*")))
! (if message-buf
! (let (beg-pos
! (end-pos message-end-point))
! (with-current-buffer message-buf
! (goto-char end-pos)
! (forward-line -10)
! (setq beg-pos (point)))
! (insert "\n\nRecent messages:\n")
! (insert-buffer-substring message-buf beg-pos end-pos))))
! ;; After Recent messages, to avoid the messages produced by
! ;; list-load-path-shadows.
! (unless (looking-back "\n")
(insert "\n"))
! (insert "\n")
! (insert "Load-path shadows:\n")
! (let* ((msg "Checking for load-path shadows...")
! (result "done")
! (shadows (progn (message "%s" msg)
! (condition-case nil (list-load-path-shadows t)
! (error
! (setq result "error")
! "Error during checking")))))
! (message "%s%s" msg result)
! (insert (if (zerop (length shadows))
! "None found.\n"
! shadows)))
! (insert (format "\nFeatures:\n%s\n" features))
(fill-region (line-beginning-position 0) (point))
;; This is so the user has to type something in order to send easily.
(use-local-map (nconc (make-sparse-keymap) (current-local-map)))
--- 247,349 ----
(let ((txt (delete-and-extract-region (1+ user-point) (point))))
(insert (propertize "\n" 'display txt)))
! (when (member 'version report-emacs-bug-included-fields)
! (insert "\n\nIn " (emacs-version) "\n")
! (if (stringp emacs-bzr-version)
! (insert "Bzr revision: " emacs-bzr-version "\n"))
! (if (fboundp 'x-server-vendor)
! (condition-case nil
! ;; This is used not only for X11 but also W32 and others.
! (insert "Windowing system distributor `" (x-server-vendor)
! "', version "
! (mapconcat 'number-to-string (x-server-version) ".") "\n")
! (error t)))
! (let ((lsb (with-temp-buffer
! (if (eq 0 (ignore-errors
! (call-process "lsb_release" nil '(t nil)
! nil "-d")))
! (buffer-string)))))
! (if (stringp lsb)
! (insert "System " lsb "\n")))
! (when (and system-configuration-options
! (not (equal system-configuration-options "")))
! (insert "Configured using:\n `configure "
! system-configuration-options "'\n\n")
! (fill-region (line-beginning-position -1) (point))))
! (when (member 'settings report-emacs-bug-included-fields)
! (insert "Important settings:\n")
! (mapc
! (lambda (var)
! (let ((val (getenv var)))
! (if val (insert (format " value of $%s: %s\n" var val)))))
! '("EMACSDATA" "EMACSDOC" "EMACSLOADPATH" "EMACSPATH"
! "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES"
! "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG" "XMODIFIERS"))
! (insert (format " locale-coding-system: %s\n" locale-coding-system))
! (insert (format " default enable-multibyte-characters: %s\n"
! (default-value 'enable-multibyte-characters)))
! (insert "\n"))
! (when (member 'major-mode report-emacs-bug-included-fields)
! (insert (format "Major mode: %s\n"
! (format-mode-line
! (buffer-local-value 'mode-name from-buffer)
! nil nil from-buffer)))
! (insert "\n"))
! (when (member 'minor-modes report-emacs-bug-included-fields)
! (insert "Minor modes in effect:\n")
! (dolist (mode minor-mode-list)
! (and (boundp mode) (buffer-local-value mode from-buffer)
! (insert (format " %s: %s\n" mode
! (buffer-local-value mode from-buffer)))))
! (insert "\n"))
! (when (member 'recent-input report-emacs-bug-included-fields)
! (insert "Recent input:\n")
! (let ((before-keys (point)))
! (insert (mapconcat (lambda (key)
! (if (or (integerp key)
! (symbolp key)
! (listp key))
! (single-key-description key)
! (prin1-to-string key nil)))
! (or recent-keys (recent-keys))
! " "))
! (save-restriction
! (narrow-to-region before-keys (point))
! (goto-char before-keys)
! (while (progn (move-to-column 50) (not (eobp)))
! (search-forward " " nil t)
! (insert "\n")))))
! (when (member 'recent-messages report-emacs-bug-included-fields)
! (let ((message-buf (get-buffer "*Messages*")))
! (if message-buf
! (let (beg-pos
! (end-pos message-end-point))
! (with-current-buffer message-buf
! (goto-char end-pos)
! (forward-line -10)
! (setq beg-pos (point)))
! (insert "\n\nRecent messages:\n")
! (insert-buffer-substring message-buf beg-pos end-pos))))
! ;; After Recent messages, to avoid the messages produced by
! ;; list-load-path-shadows.
! (unless (looking-back "\n")
! (insert "\n"))
(insert "\n"))
! (when (member 'load-shadows report-emacs-bug-included-fields)
! (insert "Load-path shadows:\n")
! (let* ((msg "Checking for load-path shadows...")
! (result "done")
! (shadows (progn (message "%s" msg)
! (condition-case nil (list-load-path-shadows t)
! (error
! (setq result "error")
! "Error during checking")))))
! (message "%s%s" msg result)
! (insert (if (zerop (length shadows))
! "None found.\n"
! shadows))))
! (when (member 'features report-emacs-bug-included-fields)
! (insert (format "\nFeatures:\n%s\n" features)))
(fill-region (line-beginning-position 0) (point))
;; This is so the user has to type something in order to send easily.
(use-local-map (nconc (make-sparse-keymap) (current-local-map)))
Diff finished. Tue Dec 11 11:54:47 2012
next prev parent reply other threads:[~2012-12-11 19:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 16:00 bug#13141: 24.3.50; Be able to customize the info included by default for `report-emacs-bug' Drew Adams
2012-12-11 16:12 ` Dani Moncayo
2012-12-11 16:18 ` Drew Adams
2012-12-11 16:24 ` Dani Moncayo
2012-12-11 16:28 ` Drew Adams
2012-12-11 19:13 ` Jambunathan K
2012-12-11 19:19 ` Glenn Morris
2012-12-11 19:34 ` Stefan Monnier
2013-01-20 9:45 ` bug#13141: 24.3.50; Be able to customize the info included by default for`report-emacs-bug' Drew Adams
2013-01-21 1:22 ` Stefan Monnier
2013-01-21 1:35 ` Drew Adams
2013-01-21 1:54 ` Stefan Monnier
2013-01-21 2:09 ` Drew Adams
2012-12-11 19:27 ` bug#13141: 24.3.50; Be able to customize the info included by default for `report-emacs-bug' Drew Adams
2012-12-11 16:29 ` Stefan Monnier
2012-12-11 16:37 ` Drew Adams
2012-12-11 19:45 ` Glenn Morris
2012-12-11 19:59 ` Drew Adams [this message]
2013-01-19 23:10 ` bug#13141: please review bug #13141 Drew Adams
2013-01-20 0:35 ` Dmitry Gutov
2013-01-20 0:35 ` Dmitry Gutov
2013-01-20 0:54 ` Xue Fuqiao
2013-01-20 0:54 ` Xue Fuqiao
2013-01-20 7:19 ` Stephen J. Turnbull
2013-01-20 19:46 ` Harald Hanche-Olsen
2013-01-20 7:19 ` Stephen J. Turnbull
2013-01-20 1:03 ` Drew Adams
2013-01-20 1:03 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CFD4B47B74BB4BBFAD8FC1F34FA11432@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=13141@debbugs.gnu.org \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.