From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: reporter: pops up windows, doesn't remove them Date: Mon, 19 Apr 2010 11:53:46 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1271692543 17433 80.91.229.12 (19 Apr 2010 15:55:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Apr 2010 15:55:43 +0000 (UTC) To: "emacs-devel@gnu.org devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 19 17:55:42 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O3tK2-0002SQ-8h for ged-emacs-devel@m.gmane.org; Mon, 19 Apr 2010 17:55:42 +0200 Original-Received: from localhost ([127.0.0.1]:46491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3tK1-0000Kb-SM for ged-emacs-devel@m.gmane.org; Mon, 19 Apr 2010 11:55:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3tIN-00084N-Ui for emacs-devel@gnu.org; Mon, 19 Apr 2010 11:54:00 -0400 Original-Received: from [140.186.70.92] (port=56653 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3tIM-00083X-IH for emacs-devel@gnu.org; Mon, 19 Apr 2010 11:53:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3tIG-0006I1-EK for emacs-devel@gnu.org; Mon, 19 Apr 2010 11:53:58 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:34861) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3tIG-0006Hj-9T for emacs-devel@gnu.org; Mon, 19 Apr 2010 11:53:52 -0400 Original-Received: by vws17 with SMTP id 17so298976vws.0 for ; Mon, 19 Apr 2010 08:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=LQQAoiw8nx7YnlGyz4pQvKIY84WxTEp8g7JkvQVw3hM=; b=khkf0D42/jVjshb9u/ERhdiKhgfRNC4q+pr/KAoZqax3XfG20cnUI/7UrV/6gA2nVy PycT7ixuvuBp471aKC49Wsckl/9d8i7+ICHydfqfYeGaDv3owobaoH8cyWmTYAr1+xJE rY9OGlZJGpPEdtMxiiFE/5FWTxV4E4zY4/MTs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=RE4W0vAwCdgNzilavpBnOCgRUlE0XV126diJ0jCRKSppj7ejEKW4Wwu+l8LAFwUe9O VUKVQbsAXZfuMSpqHWgJfVra275wo7ZwaIL4IXWNt/qWO+nUqt6A01P3/b690gijApAE SeCUQymuJ8ho/6Q+2uZqOm2GHlzvxDEBIMreQ= Original-Received: by 10.220.126.222 with SMTP id d30mr3651998vcs.198.1271692430559; Mon, 19 Apr 2010 08:53:50 -0700 (PDT) Original-Received: from [192.168.1.42] (pool-96-236-188-251.pitbpa.east.verizon.net [96.236.188.251]) by mx.google.com with ESMTPS id q11sm19309539vch.4.2010.04.19.08.53.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 19 Apr 2010 08:53:48 -0700 (PDT) X-Mailer: Apple Mail (2.1078) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123880 Archived-At: 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. =20 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)) - )) + ))) =20 (defun reporter-bug-hook () "Prohibit sending mail if empty bug report."