* 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
* Re: patch to emacsbug.el proposed..
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
0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2002-09-02 0:01 UTC (permalink / raw)
Cc: emacs-devel
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...
Isn't that method easier than remembering another command to do the
job?
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..
Would you envision using this interactively, or from a program?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: patch to emacsbug.el proposed..
2002-09-02 0:01 ` Richard Stallman
@ 2002-09-02 0:13 ` D. Goel
2002-09-03 13:26 ` Richard Stallman
0 siblings, 1 reply; 6+ messages in thread
From: D. Goel @ 2002-09-02 0:13 UTC (permalink / raw)
Cc: emacs-devel
>
> Isn't that method easier than remembering another command to do the
> job?
the user can still always follow the older method :). This will just
provide an additional way.
>
>
> 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..
>
> Would you envision using this interactively, or from a program?
[a] Interactively: i think i do, i would even prefer the shorter name
for the command that i suggested, "insert-system-info" and i even want
to locally bind it to a key. Often, i am writing an email to, say,
emacs-devel or gnu.emacs.help (which was not started via
report-emacs-bug), with, say, X problems etc., and then decide that it
would be relevant to include system-info..
[b] From a program: none (yet) that i can think of.
I think it will be nice to provide the user a way to easily insert
system-info, and help towards making "problem-reports" more
descriptive... Just as today peole ask users to post backtrace, they
might also start asking users with X problems etc. to M-x
insert-system-info :).
Anyways, no big deal, there's always the older method :)
DG http://24.197.159.102/~deego/
--
RIAA logic applied to cars--->
http://www.bbspot.com/News/2002/08/ride_sharing.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: patch to emacsbug.el proposed..
2002-09-02 0:13 ` D. Goel
@ 2002-09-03 13:26 ` Richard Stallman
2002-09-04 1:44 ` Miles Bader
0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2002-09-03 13:26 UTC (permalink / raw)
Cc: emacs-devel
> Isn't that method easier than remembering another command to do the
> job?
the user can still always follow the older method :). This will just
provide an additional way.
The question is whether it is worth even the added complexity.
I think not, not for just interactive use.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: patch to emacsbug.el proposed..
2002-09-03 13:26 ` Richard Stallman
@ 2002-09-04 1:44 ` Miles Bader
2002-09-05 2:46 ` Richard Stallman
0 siblings, 1 reply; 6+ messages in thread
From: Miles Bader @ 2002-09-04 1:44 UTC (permalink / raw)
Cc: deego, emacs-devel
Richard Stallman <rms@gnu.org> writes:
> The question is whether it is worth even the added complexity.
> I think not, not for just interactive use.
I don't think just moving some inline code into separate function really
deserves the term `complexity'; it probably even makes the code more
clear. Even if only one person ever uses the new function by itself,
why not do it?
-Miles
--
P.S. All information contained in the above letter is false,
for reasons of military security.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: patch to emacsbug.el proposed..
2002-09-04 1:44 ` Miles Bader
@ 2002-09-05 2:46 ` Richard Stallman
0 siblings, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2002-09-05 2:46 UTC (permalink / raw)
Cc: deego, emacs-devel
I don't think just moving some inline code into separate function really
deserves the term `complexity'; it probably even makes the code more
clear. Even if only one person ever uses the new function by itself,
why not do it?
If we encourage him to expect this function to continue to work, in
effect it is part of the specs of Emacs. I do not think it is worth
adding one function to the specs of Emacs for this.
Breaking this subroutine out of the code might be ok if it makes the
code clearer. But if it is a subroutine, people should not expect it
to continue to exist next month. Perhaps we will find a better way to
subroutinize the code.
^ 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).