From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69738: Followup Date: Sun, 14 Apr 2024 12:44:34 +0300 Message-ID: <8634ronurh.fsf@gnu.org> References: <4a0215b2e7bb416cf352e867183f745a@posteo.net> <1ed9ea789788d6a6450c86920199b6c6@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13195"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69738@debbugs.gnu.org To: rameiko87@posteo.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 14 11:46:03 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rvwR0-0003F2-AJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Apr 2024 11:46:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvwQt-0006A6-PS; Sun, 14 Apr 2024 05:45:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rvwQs-00069w-1o for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 05:45:54 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rvwQr-0001NP-Pb for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 05:45:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rvwR2-0000x4-Kk for bug-gnu-emacs@gnu.org; Sun, 14 Apr 2024 05:46:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Apr 2024 09:46:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69738 X-GNU-PR-Package: emacs Original-Received: via spool by 69738-submit@debbugs.gnu.org id=B69738.17130879223252 (code B ref 69738); Sun, 14 Apr 2024 09:46:04 +0000 Original-Received: (at 69738) by debbugs.gnu.org; 14 Apr 2024 09:45:22 +0000 Original-Received: from localhost ([127.0.0.1]:34338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvwQL-0000qK-Bg for submit@debbugs.gnu.org; Sun, 14 Apr 2024 05:45:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rvwQI-0000p9-1K for 69738@debbugs.gnu.org; Sun, 14 Apr 2024 05:45:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rvwQ1-0000yL-5f; Sun, 14 Apr 2024 05:45:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=0JFZR+GpgV7PmoZy64+MWk+U1EPP5GUAZBrfGyDocM0=; b=TPTdnhN1H1Tb 0XzFnc0ODLIRqpHEDPDE0RerGMqxF58UQ/rhkVer8epMS+KhfklLMwebB6m1zSG3Iovuy5VoUOT02 JkGpXAIaFTEau3y2NpTHZDt6ZhGyWsswM35egmUWAdpyA3xnGkCUuSFWGGDaI4RlPf3VhsQVoZTXf 0Zj4RcnCGR1f9Ui1R4ENSMJi0elfKbIBsAa6kzvFRaSfC3N+YmmJDC8CAn0fHxogXWw78Qog3+o7b Cc9Hy8xfgHbdN030u4MD6WSkj6I/tpfIeVnM47tkgj0RtgzSpR6ONtUs1fq9bQT5AK9fYRWPxC6+Y C/RjDMO1o9soxTxDoi+7Hg==; In-Reply-To: <1ed9ea789788d6a6450c86920199b6c6@posteo.net> (rameiko87@posteo.net) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283266 Archived-At: > Date: Sat, 13 Apr 2024 17:44:32 +0000 > From: rameiko87@posteo.net > > Hello, > > I use emacs -nw. I tried but just can't: the current way that > rmail-mail-return is implemented makes no sense when > rmail-mail-new-frame is true: every time I send an email I'm left with > an extra frame displaying the duplicate of a buffer which either is > already open on another frame, or which was buried and for some reason > now resuscitates. Every time I have to manually delete such frame. It's > very reasonable to expect that after creating a new frame just to send > an email, then such frame is gotten rid of when the message is send (or > aborted or whatever), and we're back to the original frame (as was > originally implied by the manual). > > The fact that it's such a reasonable expectation and that it takes so > much inconvenience to delete the extra frame manually every time, makes > me think that it should be this way by default, hence the manual was > good and the code was to be changed... and I bet that every person which > uses -nw with rmail-mail-new-frame will agree with me; is there any good > reason to keep it this way, which escapes my analysis? Does the patch below solve your use cases? diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index d422383..5ab67b2 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -3755,9 +3755,12 @@ rmail-mail-return ;; probably wants to delete it now. ((display-multi-frame-p) (delete-frame)) - ;; The previous frame is where normally they have the Rmail buffer - ;; displayed. - (t (other-frame -1)))) + (t + ;; The previous frame is where normally they have the Rmail buffer + ;; displayed. + (let ((fr (selected-frame))) + (other-frame -1) + (delete-frame fr))))) (defun rmail-mail () "Send mail in another window.