From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: D. Goel Newsgroups: gmane.emacs.devel Subject: patch to emacsbug.el proposed.. Date: 31 Aug 2002 15:57:32 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <87hehaol77.fsf@computer.localdomain> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1030823897 15458 127.0.0.1 (31 Aug 2002 19:58:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 31 Aug 2002 19:58:17 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17lENs-00041D-00 for ; Sat, 31 Aug 2002 21:58:16 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17lEvG-00060h-00 for ; Sat, 31 Aug 2002 22:32:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17lEPH-0003oE-00; Sat, 31 Aug 2002 15:59:44 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17lENE-0003mQ-00 for emacs-devel@gnu.org; Sat, 31 Aug 2002 15:57:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17lENB-0003m9-00 for emacs-devel@gnu.org; Sat, 31 Aug 2002 15:57:35 -0400 Original-Received: from 24-197-159-102.charterga.net ([24.197.159.102] helo=computer) by monty-python.gnu.org with esmtp (Exim 4.10) id 17lENB-0003m4-00 for emacs-devel@gnu.org; Sat, 31 Aug 2002 15:57:33 -0400 Original-Received: from deego by computer with local (Exim 3.35 #1 (Debian)) id 17lENA-0001uA-00 for ; Sat, 31 Aug 2002 15:57:32 -0400 Original-To: emacs-devel@gnu.org Original-Lines: 112 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7221 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7221 if i want to insert system-info in a message or article, i always have to M-x report-emacs-bug and then kill and yank from there... imho, it would be nice if the system-info part of M-x report-emacs-bug could be separated into a nice function called, say insert-system-info.. The patch below does that. Have tested it, works fine, and does not affect the functionality of M-x report-emacs-bug at all. The new function is currently called report-emacs-bug-insert-system-info, for the sake of namespace, but i would really prefer that it be called insert-system-info. The latter does not pollute anything, afaiu. ==================================================== cd ~/pub/pub/spcusr/usr/local/share/emacs/21.3.50/lisp/mail/ diff -u /home/deego/pub/pub/spcusr/usr/local/share/emacs/21.3.50/lisp/mail/emacsbug-original.el /home/deego/pub/pub/spcusr/usr/local/share/emacs/21.3.50/lisp/mail/emacsbug.el --- /home/deego/pub/pub/spcusr/usr/local/share/emacs/21.3.50/lisp/mail/emacsbug-original.el 2002-08-31 15:37:42.000000000 -0400 +++ /home/deego/pub/pub/spcusr/usr/local/share/emacs/21.3.50/lisp/mail/emacsbug.el 2002-08-31 15:50:45.000000000 -0400 @@ -69,6 +69,44 @@ :group 'emacsbug :type 'boolean) + +;;;###autoload +(defun report-emacs-bug-insert-system-info (&optional recent-keys) + (interactive) + (insert "\n\n\n") + + (insert "In " (emacs-version) "\n") + (if (and system-configuration-options + (not (equal system-configuration-options ""))) + (insert "configured using `configure " + system-configuration-options "'\n\n")) + (insert "Important settings:\n") + (mapcar + '(lambda (var) + (insert (format " value of $%s: %s\n" var (getenv var)))) + '("LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES" + "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG")) + (insert (format " locale-coding-system: %s\n" locale-coding-system)) + (insert (format " default-enable-multibyte-characters: %s\n" + default-enable-multibyte-characters)) + (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"))))) + ;;;###autoload (defun report-emacs-bug (topic &optional recent-keys) "Report a bug in GNU Emacs. @@ -124,39 +162,9 @@ (insert "\n\n") (setq user-point (point)) - (insert "\n\n\n") + + (report-emacs-bug-insert-system-info recent-keys) - (insert "In " (emacs-version) "\n") - (if (and system-configuration-options - (not (equal system-configuration-options ""))) - (insert "configured using `configure " - system-configuration-options "'\n\n")) - (insert "Important settings:\n") - (mapcar - '(lambda (var) - (insert (format " value of $%s: %s\n" var (getenv var)))) - '("LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES" - "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG")) - (insert (format " locale-coding-system: %s\n" locale-coding-system)) - (insert (format " default-enable-multibyte-characters: %s\n" - default-enable-multibyte-characters)) - (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 Diff finished at Sat Aug 31 15:50:57