all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: "emacs-devel@gnu.org devel" <emacs-devel@gnu.org>
Subject: reporter: pops up windows, doesn't remove them
Date: Mon, 19 Apr 2010 11:53:46 -0400	[thread overview]
Message-ID: <FFC911FD-2312-4F07-85B1-2CCAC5531955@gmail.com> (raw)

I found two issues with reporter.el, `reporter-submit-bug-report'.

With "*mail*" in same-window-buffer-names, and `pop-up-windows' non-nil, and called from a frame with one window displaying buffer foo, this function will switch to the mail buffer in the window, then split it and pop up a second window below with foo.  Unfortunately, when the mail buffer is deleted, the newly popped up remains, and we have a frame with two windows displaying foo.  That's inconvenient.

Second, the design of `reporter-submit-bug-report' overrides `same-window-buffer-names' for one set of calls to pop-to-buffer/display-buffer, but doesn't already do so for the call to `reporter-compose-outgoing'.  I think it should be consistent.  If it does override it, then for all calls.  This takes care of the above problem (as a workaround), as in the patch below.  As an alternative, one could consistently respect the user settings and only intervene if necessary (as it does now), but then one should take care of the first point above.  

Do you want me to file a bug, commit the change below, or do nothing?


diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el
index 877cc5a..0f09629 100644
--- a/lisp/mail/reporter.el
+++ b/lisp/mail/reporter.el
@@ -319,6 +319,8 @@ This function does not send a message; it uses the given information
 to initialize a message, which the user can then edit and finally send
 \(or decline to send).  The variable `mail-user-agent' controls which
 mail-sending package is used for editing and sending the message."
+    (let (same-window-buffer-names same-window-regexps)
+      ;; `reporter-compose-outgoing' may pop up the window.
   (let ((reporter-eval-buffer (current-buffer))
 	final-resting-place
 	after-sep-pos
@@ -334,11 +336,10 @@ mail-sending package is used for editing and sending the message."
     ;; do the work
     (require 'sendmail)
     ;; If mailbuf did not get made visible before, make it visible now.
-    (let (same-window-buffer-names same-window-regexps)
       (pop-to-buffer mailbuf)
       ;; Just in case the original buffer is not visible now, bring it
       ;; back somewhere
-      (and pop-up-windows (display-buffer reporter-eval-buffer)))
+      (and pop-up-windows (display-buffer reporter-eval-buffer))
     (goto-char (point-min))
     (mail-position-on-field "to")
     (insert address)
@@ -385,7 +386,7 @@ mail-sending package is used for editing and sending the message."
 	   )
       (message "Please enter your report.  Type %s to send, %s to abort."
 	       sendkey abortkey))
-    ))
+    )))
 
 (defun reporter-bug-hook ()
   "Prohibit sending mail if empty bug report."





                 reply	other threads:[~2010-04-19 15:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=FFC911FD-2312-4F07-85B1-2CCAC5531955@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=emacs-devel@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.