unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: D. Goel <deego@glue.umd.edu>
Subject: patch to emacsbug.el proposed..
Date: 31 Aug 2002 15:57:32 -0400	[thread overview]
Message-ID: <87hehaol77.fsf@computer.localdomain> (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

             reply	other threads:[~2002-08-31 19:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-31 19:57 D. Goel [this message]
2002-09-02  0:01 ` patch to emacsbug.el proposed 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

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hehaol77.fsf@computer.localdomain \
    --to=deego@glue.umd.edu \
    /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 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).