unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* patch to emacsbug.el proposed..
@ 2002-08-31 19:57 D. Goel
  2002-09-02  0:01 ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: D. Goel @ 2002-08-31 19:57 UTC (permalink / raw)



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-09-05  2:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-31 19:57 patch to emacsbug.el proposed D. Goel
2002-09-02  0:01 ` Richard Stallman
2002-09-02  0:13   ` D. Goel
2002-09-03 13:26     ` Richard Stallman
2002-09-04  1:44       ` Miles Bader
2002-09-05  2:46         ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).