GNU bug report logs - #69738
[BUG] rmail-mail-new-frame doesn't delete the new frame after composing the message on Emacs 29.2

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: rameiko87@HIDDEN; Done: Eli Zaretskii <eliz@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 69738 <at> debbugs.gnu.org:


Received: (at 69738) by debbugs.gnu.org; 20 Apr 2024 11:12:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 20 07:12:35 2024
Received: from localhost ([127.0.0.1]:35785 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ry8do-0006Zt-1G
	for submit <at> debbugs.gnu.org; Sat, 20 Apr 2024 07:12:35 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35402)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ry8dj-0006Yx-9I
 for 69738 <at> debbugs.gnu.org; Sat, 20 Apr 2024 07:12:18 -0400
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 <eliz@HIDDEN>)
 id 1ry8dO-0007hZ-Vt; Sat, 20 Apr 2024 07:11:54 -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=fjeRs4j5TsuFXRudr4gSebEMhAi+BBiLce1Rfmru7UI=; b=M90POCIIdc07
 hbi3N9e+dqefdWqjLnLh+EOhmGf4foUa7GfP0zk389oL02R0a50+EN8Ut11OOR5XWhF7RmZQ+mRQj
 NPhEMTf0LjBHwdtT/1s0/W0i+aXC4XV3a6DDrno5wGBWE+q/soQ9m0ZiC+W4QeKmozRGiaH+1CgcN
 Pst4FrYsCAGEfEKRHkBQgv+SlwJQgvu27PJ11YdqP1SIdT18VQMM53MqeUiJlQx4VOr1wVtSqX1vv
 Asjfl7XKGrhjj6K4HTlocfN73Ft8d3mga7AsPvhk0ci3V7tNkFaX0BZI54FIrE0rDRlZwVXJjlthA
 2oZVMJo63JeAuYMNVSyJiQ==;
Date: Sat, 20 Apr 2024 14:11:51 +0300
Message-Id: <86wmos8f0o.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rameiko87@HIDDEN
In-Reply-To: <4d7b2d2317ad9512628fbd2725f33d8b@HIDDEN>
 (rameiko87@HIDDEN)
Subject: Re: bug#69738: Followup
References: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
 <1ed9ea789788d6a6450c86920199b6c6@HIDDEN> <8634ronurh.fsf@HIDDEN>
 <ba169c975429048e188dd8b32c65436a@HIDDEN> <86bk6bnbzl.fsf@HIDDEN>
 <cd1101bc38cb3f72699bda6b8d07905a@HIDDEN> <867cgzn5jw.fsf@HIDDEN>
 <4d7b2d2317ad9512628fbd2725f33d8b@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738
Cc: 69738 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Date: Mon, 15 Apr 2024 10:15:55 +0000
> From: rameiko87@HIDDEN
> Cc: 69738 <at> debbugs.gnu.org
> 
> > So please show a minimal
> > recipe for reproducing this, after applying the patch I sent, and
> > starting from "emacs -Q -nw".  There's probably something I'm missing.
> 
> emacs -nw -Q (FRAME 1 IS SCRATCH)
> C-x 5 2
> M-x load-file PATCH
> M-x rmail (FRAME 2 IS RMAIL)
> M-: (setq rmail-mail-new-frame t)
> C-x 5 2
> C-x b *Messages* (FRAME 3 IS MESSAGES)
> C-x 5 o (BACK TO FRAME 2)
> m (NEW MAIL OPENS ON FRAME 4)
> C-u - C-x 5 o (THIS IS WHAT THE PATCH DOES, REVERTING BACK TO FRAME 1 
> WHICH IS SCRATCH AND NOT RMAIL)
> 
> Does it make sense?

I guess it does, although it evidently breaks the expectations of
Rmail.  Please try a more thorough patch below.

> Curiously, replacing the last line by C-c C-k kills the draft but 
> doesn't change the frame (note that I applied the patch). I deduce that 
> rmail-mail-return is not called by C-c C-k... Am I doing something 
> wrong?

It looks like "C-c C-k" (implemented in message.el) was not intended
to return to the original buffer.

diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index d422383..437f120 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -3684,7 +3684,12 @@ rmail-start-mail
 				   other-headers)
   (let ((switch-function
 	 (cond (same-window nil)
-	       (rmail-mail-new-frame 'switch-to-buffer-other-frame)
+	       (rmail-mail-new-frame
+                (progn
+                  ;; Record the frame from which we invoked this command.
+                  (modify-frame-parameters (selected-frame)
+				           '((rmail-orig-frame . t)))
+                  'switch-to-buffer-other-frame))
 	       (t 'switch-to-buffer-other-window)))
 	yank-action)
     (if replybuffer
@@ -3714,6 +3719,11 @@ rmail-start-mail
 	  (modify-frame-parameters (selected-frame)
 				   '((mail-dedicated-frame . t)))))))
 
+(defun rmail--find-orig-rmail-frame ()
+  (car (filtered-frame-list
+        (lambda (frame)
+          (eq (frame-parameter frame 'rmail-orig-frame) t)))))
+
 (defun rmail-mail-return (&optional newbuf)
   "Try to return to Rmail from the mail window.
 If optional argument NEWBUF is specified, it is the Rmail buffer
@@ -3755,9 +3765,19 @@ 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
+    ;; Try to find the original Rmail frame and make it the top frame.
+    (let ((fr (selected-frame))
+          (orig-fr (rmail--find-orig-rmail-frame)))
+      (if orig-fr
+          (progn
+            (modify-frame-parameters orig-fr '((rmail-orig-frame . nil)))
+            (select-frame-set-input-focus orig-fr))
+        ;; If we cannot find the frame from which we started, punt, and
+        ;; display the previous frame, which is where they normally have
+        ;; the Rmail buffer displayed.
+        (other-frame -1))
+      (delete-frame fr)))))
 
 (defun rmail-mail ()
   "Send mail in another window.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.

Message received at 69738 <at> debbugs.gnu.org:


Received: (at 69738) by debbugs.gnu.org; 15 Apr 2024 10:16:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 15 06:16:18 2024
Received: from localhost ([127.0.0.1]:36873 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rwJNo-0008FH-J5
	for submit <at> debbugs.gnu.org; Mon, 15 Apr 2024 06:16:18 -0400
Received: from mout02.posteo.de ([185.67.36.66]:58905)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rameiko87@HIDDEN>) id 1rwJNl-00085R-5g
 for 69738 <at> debbugs.gnu.org; Mon, 15 Apr 2024 06:16:14 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id DF56B240103
 for <69738 <at> debbugs.gnu.org>; Mon, 15 Apr 2024 12:15:55 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1713176155; bh=g7Ku4cR9ITtnI9DUhe1LhsZM5y9XHObkQk5+wTZHpn0=;
 h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To:
 Cc:Subject:Message-ID:From;
 b=SeEBY4Rvu+p3fRVf/MdKiN556SU8/TPb1XCKZ5pRK3kpkKNp5kJbNTG5TTQcG4K9O
 0VjUE9C1fKUTYzFo+jmYdezXE98r/sRqByHZ/d4oQOcP/AzJ+zq9Ta/yZnSOfPOrQK
 hYhWWGq5sC/ZSRytRgRerSebU25wEBBv5IZZap+/SrLO/KarClLRG79izyhk5pL0NV
 RVnEd9o90IZsKixVx3I7a42Ccr10Ye2TG0kwZKj5p8YmnrcsHTkvrJq8NP/YhJ0PVx
 pFpqy4ozMDJOr95jgbe/KXrLmn3bNkhGvE4+x636k/aceSkBeq9IMSroVUddY2HOx1
 5dDyZp/FwQ+xQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VJ33H24L7z6tw4;
 Mon, 15 Apr 2024 12:15:55 +0200 (CEST)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Mon, 15 Apr 2024 10:15:55 +0000
From: rameiko87@HIDDEN
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69738: Followup
In-Reply-To: <867cgzn5jw.fsf@HIDDEN>
References: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
 <1ed9ea789788d6a6450c86920199b6c6@HIDDEN> <8634ronurh.fsf@HIDDEN>
 <ba169c975429048e188dd8b32c65436a@HIDDEN> <86bk6bnbzl.fsf@HIDDEN>
 <cd1101bc38cb3f72699bda6b8d07905a@HIDDEN> <867cgzn5jw.fsf@HIDDEN>
Message-ID: <4d7b2d2317ad9512628fbd2725f33d8b@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738
Cc: 69738 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> So please show a minimal
> recipe for reproducing this, after applying the patch I sent, and
> starting from "emacs -Q -nw".  There's probably something I'm missing.

emacs -nw -Q (FRAME 1 IS SCRATCH)
C-x 5 2
M-x load-file PATCH
M-x rmail (FRAME 2 IS RMAIL)
M-: (setq rmail-mail-new-frame t)
C-x 5 2
C-x b *Messages* (FRAME 3 IS MESSAGES)
C-x 5 o (BACK TO FRAME 2)
m (NEW MAIL OPENS ON FRAME 4)
C-u - C-x 5 o (THIS IS WHAT THE PATCH DOES, REVERTING BACK TO FRAME 1 
WHICH IS SCRATCH AND NOT RMAIL)

Does it make sense?

Curiously, replacing the last line by C-c C-k kills the draft but 
doesn't change the frame (note that I applied the patch). I deduce that 
rmail-mail-return is not called by C-c C-k... Am I doing something 
wrong?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.

Message received at 69738 <at> debbugs.gnu.org:


Received: (at 69738) by debbugs.gnu.org; 14 Apr 2024 18:50:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 14 14:50:51 2024
Received: from localhost ([127.0.0.1]:36152 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rw4wE-0007zn-QC
	for submit <at> debbugs.gnu.org; Sun, 14 Apr 2024 14:50:51 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52896)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rw4wB-0007ya-IB
 for 69738 <at> debbugs.gnu.org; Sun, 14 Apr 2024 14:50:49 -0400
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 <eliz@HIDDEN>)
 id 1rw4vt-00035F-S5; Sun, 14 Apr 2024 14:50:31 -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=+eZavDOCHBhyvyzGDSMZTAYW4N49M7brMBTgkGjbg+8=; b=JqrR5d7ur9Di
 u1NTEYKWc4hr59Y6LMmj9lC+97HExDrQzmZuTLxfUsluVa8mtVLBL9Z9QzT2lxQL5Jb38XovUwx5n
 6o4ZNIOKckItLdEwtOBfo2DUMUbbq5WG70mtS9yMgLIMq11GDXoaQ5TgGi5yfPX6YxcGe/QHfyQSH
 YsHPu1tRM7/6DXG2L6Rul/w6ysQhXVaW6SOHi2TntMTN2agLRAZ9rBSIvxnb8KiWLTuY/hSmMEqnV
 XoNPiLT3IBVXlUiJeLpx44zB9Q/s/r0IUKDg+mRkyyrycVlu6OQdSyH5KUlE8yRpDiH98GAQs4NYt
 /WB+I1e40QgYIO/3kIa7og==;
Date: Sun, 14 Apr 2024 21:50:28 +0300
Message-Id: <865xwjn5hn.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rameiko87@HIDDEN
In-Reply-To: <06b44e7b07fcb2d06c7a7f56e4934014@HIDDEN>
 (rameiko87@HIDDEN)
Subject: Re: bug#69738: Followup
References: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
 <1ed9ea789788d6a6450c86920199b6c6@HIDDEN> <8634ronurh.fsf@HIDDEN>
 <ba169c975429048e188dd8b32c65436a@HIDDEN> <86bk6bnbzl.fsf@HIDDEN>
 <cd1101bc38cb3f72699bda6b8d07905a@HIDDEN>
 <06b44e7b07fcb2d06c7a7f56e4934014@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738
Cc: 69738 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 14 Apr 2024 17:55:55 +0000
> From: rameiko87@HIDDEN
> Cc: 69738 <at> debbugs.gnu.org
> 
> Actually the neat solution is probably to treat frames as a ring, so 
> that C-x 5 o would go back to the previous frame. Is there any reason 
> why frames were not conceived as a ring, but ``rigidly''?

Thanks, but it's a non-starter to change how frames are managed, just
to solve this minor issue.  The solution cannot be too complicated,
certainly not with TTY frames, where even the window manager isn't
involved.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.

Message received at 69738 <at> debbugs.gnu.org:


Received: (at 69738) by debbugs.gnu.org; 14 Apr 2024 18:49:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 14 14:49:34 2024
Received: from localhost ([127.0.0.1]:36147 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rw4uz-0007lh-84
	for submit <at> debbugs.gnu.org; Sun, 14 Apr 2024 14:49:34 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38124)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rw4uv-0007jt-99
 for 69738 <at> debbugs.gnu.org; Sun, 14 Apr 2024 14:49:31 -0400
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 <eliz@HIDDEN>)
 id 1rw4ue-0002oI-JW; Sun, 14 Apr 2024 14:49:12 -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=U/QDUbI4NRltS34JM6f6sAwArmPlMx1yhEglkO1pXBQ=; b=OiPu8K+yOAGg
 qNmHP/+0//LDMQdsNpSomGDjYqL35fQhBHPGwBmppf7OxXgvOKjp4XQgZXP9nr1sOURdqZ2ZS91m9
 rGkHrrrZ6vDhkrBkzG7FRlpZxrEv1NJoouYqesH121v5dUHKAWWRoG29lBAAiw6Mo/WKJIaWymmfo
 QZwQfqe44QPh5ocTr1y57XlIWHBLw+SD6BQAtbgnWQ4tjHzvopR7n+wkPRS9IaC39SZJwh4qyF/jl
 6F0TnjkQKmHu374WlDwYLv8U/dl/6bTPHbX6sfKwpH6BcrSlIee7SMwAOAv9bhfTrWMblJnvX6dkj
 fmyEaJL1CizLKGN8EW9VLg==;
Date: Sun, 14 Apr 2024 21:49:07 +0300
Message-Id: <867cgzn5jw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rameiko87@HIDDEN
In-Reply-To: <cd1101bc38cb3f72699bda6b8d07905a@HIDDEN>
 (rameiko87@HIDDEN)
Subject: Re: bug#69738: Followup
References: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
 <1ed9ea789788d6a6450c86920199b6c6@HIDDEN> <8634ronurh.fsf@HIDDEN>
 <ba169c975429048e188dd8b32c65436a@HIDDEN> <86bk6bnbzl.fsf@HIDDEN>
 <cd1101bc38cb3f72699bda6b8d07905a@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738
Cc: 69738 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 14 Apr 2024 17:47:06 +0000
> From: rameiko87@HIDDEN
> Cc: 69738 <at> debbugs.gnu.org
> 
> To answer your question: your patch doesn't work, and the reason is that 
> I have Rmail on frame #6 and Elfeed on frame #3. Rmail-reply creates 
> frame #42, from which both C-x 5 0 and C-x 5 o land on frame #27. C-u - 
> C-x 5 o goes from #42 to #3, and also from #27 to #3 after #42 was 
> deleted.

Strange, it did work for me.  Moreover, the original code always
succeeds to switch back to the frame where I have the Rmail buffer, it
just doesn't delete the frame where the outgoing mail was composed, so
I don't think I understand why the same code doesn't work for you.
But I never got to 42 frames, of course.  So please show a minimal
recipe for reproducing this, after applying the patch I sent, and
starting from "emacs -Q -nw".  There's probably something I'm missing.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.

Message received at 69738 <at> debbugs.gnu.org:


Received: (at 69738) by debbugs.gnu.org; 14 Apr 2024 17:56:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 14 13:56:20 2024
Received: from localhost ([127.0.0.1]:36119 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rw45T-00004y-2h
	for submit <at> debbugs.gnu.org; Sun, 14 Apr 2024 13:56:19 -0400
Received: from mout02.posteo.de ([185.67.36.66]:52251)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rameiko87@HIDDEN>) id 1rw45N-0008UV-BO
 for 69738 <at> debbugs.gnu.org; Sun, 14 Apr 2024 13:56:17 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 18574240103
 for <69738 <at> debbugs.gnu.org>; Sun, 14 Apr 2024 19:55:55 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1713117356; bh=oYx4svH3wB/tM8T750Sz4pckEnBmUYAXrlvtK13NjbQ=;
 h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To:
 Cc:Subject:Message-ID:From;
 b=M87H4mXiJ6zmgt4mq1dLR3L8O47cWg0B0LEb9LBAjer0jSh6HhDMbClcv1BRxA/71
 2QKSugPEU9qIbK8dJb5/XArhsuEztlO95ZWqPQ/V/c1mfH6xa3io+jg91AjIMqrCVn
 dm/2TCXhZ9Nag0jUzrqHOwXYz94/NlXoszh2PC6c5k3+yM3mLHqnvlAHUxw0M5SP5C
 JBZu25vKbAUKA6kSWeZpWzrZWhWv7B/0/pXDYFJbHekdg8bKBlhDE5H+Z84fQc+bCy
 sDNxeADqy6DPFvWvmDQtKmfwOhtKWCd8zLPVJBewWzguSiTOn/k8Dx0WIyvu6ZaAte
 XakcFjsm7hoGg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VHdJW3wY6z6tvk;
 Sun, 14 Apr 2024 19:55:55 +0200 (CEST)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Sun, 14 Apr 2024 17:55:55 +0000
From: rameiko87@HIDDEN
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69738: Followup
In-Reply-To: <cd1101bc38cb3f72699bda6b8d07905a@HIDDEN>
References: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
 <1ed9ea789788d6a6450c86920199b6c6@HIDDEN> <8634ronurh.fsf@HIDDEN>
 <ba169c975429048e188dd8b32c65436a@HIDDEN> <86bk6bnbzl.fsf@HIDDEN>
 <cd1101bc38cb3f72699bda6b8d07905a@HIDDEN>
Message-ID: <06b44e7b07fcb2d06c7a7f56e4934014@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738
Cc: 69738 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Actually the neat solution is probably to treat frames as a ring, so 
that C-x 5 o would go back to the previous frame. Is there any reason 
why frames were not conceived as a ring, but ``rigidly''?


> Dear Eli,
> 
> To answer your question: your patch doesn't work, and the reason is
> that I have Rmail on frame #6 and Elfeed on frame #3. Rmail-reply
> creates frame #42, from which both C-x 5 0 and C-x 5 o land on frame
> #27. C-u - C-x 5 o goes from #42 to #3, and also from #27 to #3 after
> #42 was deleted.
> 
> As for the current code for GUI, I can't understand why it _works_
> since the same exact problem should arise. I never used the GUI but I
> would expect that it actually doesn't work for GUI either, for the
> same reasons above. I think the design of Emacs makes the order of
> frames rigid, so every new frame can be arbitrarily far from the
> original Rmail frame.
> 
> One way is to remember the frame where Rmail was and revert back to
> that one after deleting the reply frame.
> 
> On 14.04.2024 18:30, Eli Zaretskii wrote:
>>> Why not just remove the condition of (display-multi-frame-p)? It's
>>> neater, and I can't see any drawbacks compared to your patch (but the
>>> fact that your code insists on switching to other before deleting the
>>> frame makes me think there must be some reason...?)
>> 
>> Yes, I have my reasons: I'd like to make sure we switch to the exact
>> frame the user wants -- the one showing the Rmail buffer.  Unlike on
>> GUI displays, only a single frame is shown on a TTY, so if we
>> accidentally switch to the wrong frame, the user will not see the
>> frame they need, something that does happen on GUI terminals.
>> 
>> Does the patch as I sent it work for you?  If not, please tell what
>> doesn't work.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.

Message received at 69738 <at> debbugs.gnu.org:


Received: (at 69738) by debbugs.gnu.org; 14 Apr 2024 17:47:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 14 13:47:26 2024
Received: from localhost ([127.0.0.1]:36109 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rw3ws-00071k-DM
	for submit <at> debbugs.gnu.org; Sun, 14 Apr 2024 13:47:26 -0400
Received: from mout01.posteo.de ([185.67.36.65]:58171)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rameiko87@HIDDEN>) id 1rw3wq-00071Q-Ih
 for 69738 <at> debbugs.gnu.org; Sun, 14 Apr 2024 13:47:25 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id E8D3A240027
 for <69738 <at> debbugs.gnu.org>; Sun, 14 Apr 2024 19:47:06 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1713116826; bh=LiI6sk64a+0NZKdFKKBEP0rwQaQH5R26iU8KhvOY7O0=;
 h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To:
 Cc:Subject:Message-ID:From;
 b=Ednym4ip0cq5OSwkYHR7D2dxUht+iQmbBPXuGpZv90wWM2iw8yeRQ9STlzAP51fQs
 o7YciN793+JKlTxHEjKYyKpKF+2QJIhO1dXlrfqmXdFUM1OVYrPEpvY0yEZDAvdEMd
 5Nokr1UafV/FRQL5xyi86m6riHM93jo76mtdTjY9PsIGUG9ylzp4+zY6YJDXyfYaQ9
 t2JyrBrKM0TSGQFDCfEGM7s814InQdG0wGh0zxJNBuuOKsXdpit3sivUWSShTxxs7j
 xKfnSFAwCKJbl6PJ/Rgo4NLZsbASUxLY8JjDZkuB+M7KU+ewJALVMIqoyeVQ7Es6qg
 p4xBLToXXFSKQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VHd6L3ZTBz6tvb;
 Sun, 14 Apr 2024 19:47:06 +0200 (CEST)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Sun, 14 Apr 2024 17:47:06 +0000
From: rameiko87@HIDDEN
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69738: Followup
In-Reply-To: <86bk6bnbzl.fsf@HIDDEN>
References: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
 <1ed9ea789788d6a6450c86920199b6c6@HIDDEN> <8634ronurh.fsf@HIDDEN>
 <ba169c975429048e188dd8b32c65436a@HIDDEN> <86bk6bnbzl.fsf@HIDDEN>
Message-ID: <cd1101bc38cb3f72699bda6b8d07905a@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738
Cc: 69738 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Dear Eli,

To answer your question: your patch doesn't work, and the reason is that 
I have Rmail on frame #6 and Elfeed on frame #3. Rmail-reply creates 
frame #42, from which both C-x 5 0 and C-x 5 o land on frame #27. C-u - 
C-x 5 o goes from #42 to #3, and also from #27 to #3 after #42 was 
deleted.

As for the current code for GUI, I can't understand why it _works_ since 
the same exact problem should arise. I never used the GUI but I would 
expect that it actually doesn't work for GUI either, for the same 
reasons above. I think the design of Emacs makes the order of frames 
rigid, so every new frame can be arbitrarily far from the original Rmail 
frame.

One way is to remember the frame where Rmail was and revert back to that 
one after deleting the reply frame.

On 14.04.2024 18:30, Eli Zaretskii wrote:
>> Why not just remove the condition of (display-multi-frame-p)? It's
>> neater, and I can't see any drawbacks compared to your patch (but the
>> fact that your code insists on switching to other before deleting the
>> frame makes me think there must be some reason...?)
> 
> Yes, I have my reasons: I'd like to make sure we switch to the exact
> frame the user wants -- the one showing the Rmail buffer.  Unlike on
> GUI displays, only a single frame is shown on a TTY, so if we
> accidentally switch to the wrong frame, the user will not see the
> frame they need, something that does happen on GUI terminals.
> 
> Does the patch as I sent it work for you?  If not, please tell what
> doesn't work.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.

Message received at 69738 <at> debbugs.gnu.org:


Received: (at 69738) by debbugs.gnu.org; 14 Apr 2024 16:30:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 14 12:30:36 2024
Received: from localhost ([127.0.0.1]:36057 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rw2kS-0001Ju-Ti
	for submit <at> debbugs.gnu.org; Sun, 14 Apr 2024 12:30:35 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50890)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rw2kN-0001CN-W3
 for 69738 <at> debbugs.gnu.org; Sun, 14 Apr 2024 12:30:30 -0400
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 <eliz@HIDDEN>)
 id 1rw2k5-0007PO-3H; Sun, 14 Apr 2024 12:30:11 -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=z1tRVd91lG3VZzpxhqpK5qOXqKcz6Yl49VbyovPx3NU=; b=SIvgxTHaZRso
 KzIgnC7Q8QTlPAXtyvJt107hFk1HzbDqdu4EaF21EvIV7Gmxe80cXh4pGmle80xQxlMduCvl7wAw+
 PsEnGl+E31LwCctRRtS680pjiXXLUE4pWQxNp5XFBxPpznQIj57y20OJ7366cUEq9zT2xJAFs4+oc
 piDKNFc5lAAzdR1KwN4U2Z7nSD5NUR1Lqz93zFsjRudi0l3XfPZ8yQt7RPaWWbnD8bTuDN14lOU3b
 uaJzoZxVq0aS651gaci8v/K76EIwBbi/0HLzvIQRw3QMBwFFJVgf6kqfC3rTJHmriKgHMVGCPLeqi
 6EKK1HRaGlDsWnsZTgCmMg==;
Date: Sun, 14 Apr 2024 19:30:06 +0300
Message-Id: <86bk6bnbzl.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rameiko87@HIDDEN
In-Reply-To: <ba169c975429048e188dd8b32c65436a@HIDDEN>
 (rameiko87@HIDDEN)
Subject: Re: bug#69738: Followup
References: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
 <1ed9ea789788d6a6450c86920199b6c6@HIDDEN> <8634ronurh.fsf@HIDDEN>
 <ba169c975429048e188dd8b32c65436a@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738
Cc: 69738 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 14 Apr 2024 16:14:20 +0000
> From: rameiko87@HIDDEN
> Cc: 69738 <at> debbugs.gnu.org
> 
> Why not just remove the condition of (display-multi-frame-p)? It's 
> neater, and I can't see any drawbacks compared to your patch (but the 
> fact that your code insists on switching to other before deleting the 
> frame makes me think there must be some reason...?)

Yes, I have my reasons: I'd like to make sure we switch to the exact
frame the user wants -- the one showing the Rmail buffer.  Unlike on
GUI displays, only a single frame is shown on a TTY, so if we
accidentally switch to the wrong frame, the user will not see the
frame they need, something that does happen on GUI terminals.

Does the patch as I sent it work for you?  If not, please tell what
doesn't work.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.

Message received at 69738 <at> debbugs.gnu.org:


Received: (at 69738) by debbugs.gnu.org; 14 Apr 2024 16:14:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 14 12:14:40 2024
Received: from localhost ([127.0.0.1]:36006 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rw2V6-00073j-0t
	for submit <at> debbugs.gnu.org; Sun, 14 Apr 2024 12:14:40 -0400
Received: from mout01.posteo.de ([185.67.36.65]:44889)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rameiko87@HIDDEN>) id 1rw2V4-00072U-3o
 for 69738 <at> debbugs.gnu.org; Sun, 14 Apr 2024 12:14:39 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id E0846240027
 for <69738 <at> debbugs.gnu.org>; Sun, 14 Apr 2024 18:14:20 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1713111260; bh=FRDGxMhFDGCw6m/tT6pr/SX/HdQKZ+K0dSS1cMuPA5k=;
 h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To:
 Cc:Subject:Message-ID:From;
 b=X7zwsTNHDL1HRZSUGiIMaLw4exoeYnxOtxFF8oQLHXRAvgoxKy8MH/K+JUv9+m+Px
 1BxEsqdbSfHd+MJw0YKcjm5APnIsy7ERpOgEmXEjV5DozucXfpV6LjY+KsrCJaj8b3
 YifcnAMAvdwSsMEIPZZEkyL1xQH4lsR3fbQ/vA12bQw4nM+ypN9onLIIha/BBb/WX6
 2Me/zg0+SVYyz+F34bzorG7wSXGoaesWjKAMYtyaxda63ZAdj1ytdt+HEGK+kEtdfa
 e0+w6eBlxZF/FWBGyTsmDdk3jr4G+5YoVusubUN4y514hj0N5LhANE+vP7t/mXrVya
 8o3fZ9fotlOXg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VHb3J3GHdz6tsf;
 Sun, 14 Apr 2024 18:14:20 +0200 (CEST)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Sun, 14 Apr 2024 16:14:20 +0000
From: rameiko87@HIDDEN
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69738: Followup
In-Reply-To: <8634ronurh.fsf@HIDDEN>
References: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
 <1ed9ea789788d6a6450c86920199b6c6@HIDDEN> <8634ronurh.fsf@HIDDEN>
Message-ID: <ba169c975429048e188dd8b32c65436a@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738
Cc: 69738 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Why not just remove the condition of (display-multi-frame-p)? It's 
neater, and I can't see any drawbacks compared to your patch (but the 
fact that your code insists on switching to other before deleting the 
frame makes me think there must be some reason...?)

> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.

Message received at 69738 <at> debbugs.gnu.org:


Received: (at 69738) by debbugs.gnu.org; 14 Apr 2024 09:45:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 14 05:45:21 2024
Received: from localhost ([127.0.0.1]:34338 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rvwQL-0000qK-Bg
	for submit <at> debbugs.gnu.org; Sun, 14 Apr 2024 05:45:21 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53854)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rvwQI-0000p9-1K
 for 69738 <at> debbugs.gnu.org; Sun, 14 Apr 2024 05:45:19 -0400
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 <eliz@HIDDEN>)
 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==;
Date: Sun, 14 Apr 2024 12:44:34 +0300
Message-Id: <8634ronurh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rameiko87@HIDDEN
In-Reply-To: <1ed9ea789788d6a6450c86920199b6c6@HIDDEN>
 (rameiko87@HIDDEN)
Subject: Re: bug#69738: Followup
References: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
 <1ed9ea789788d6a6450c86920199b6c6@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738
Cc: 69738 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 13 Apr 2024 17:44:32 +0000
> From: rameiko87@HIDDEN
> 
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.

Message received at 69738 <at> debbugs.gnu.org:


Received: (at 69738) by debbugs.gnu.org; 13 Apr 2024 17:44:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 13 13:44:56 2024
Received: from localhost ([127.0.0.1]:33740 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rvhQt-0007Mr-Ca
	for submit <at> debbugs.gnu.org; Sat, 13 Apr 2024 13:44:55 -0400
Received: from mout02.posteo.de ([185.67.36.66]:34969)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rameiko87@HIDDEN>) id 1rvhQn-0007L5-Ri
 for 69738 <at> debbugs.gnu.org; Sat, 13 Apr 2024 13:44:53 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id D67E6240103
 for <69738 <at> debbugs.gnu.org>; Sat, 13 Apr 2024 19:44:32 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1713030272; bh=rfXnSsQir3AjrK7uHyT683cJIW9JL8uJwRT4Hgm1FdY=;
 h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To:
 Subject:Message-ID:From;
 b=H80MIqXk+pdzML8aIrKbk2VG1VxxstjTtjHlphy9IxGvJU5frPU9R2g+ihepzDvDh
 vC79Ua4m/KESAAlPxsTKXA4TxwK+wEXLV6QZnfUitQENAEn0ciLZfyGUlT6e0pYo8b
 OMjFcm4YPKnpUfc4+w0wx+8/iFjkKu9mnqGqS2UKEj7dnaJd35bufX6e5aH4FKyLnd
 yAKkThbghG8rkviC4jBUmRb1qZdpZpqau7oqkf4NZC7qSVGJZKMvGgr1vd985CfVj1
 LX5hvHe0+FFg3irCh5epFVHG0wkULf51gVFtoKyieY/BoteMYqytKcpD0Uv7Pj4p5b
 s+3IRK2/0eqgw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VH15r2P1Jz9rxD
 for <69738 <at> debbugs.gnu.org>; Sat, 13 Apr 2024 19:44:32 +0200 (CEST)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Sat, 13 Apr 2024 17:44:32 +0000
From: rameiko87@HIDDEN
To: 69738 <at> debbugs.gnu.org
Subject: Followup
Message-ID: <1ed9ea789788d6a6450c86920199b6c6@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.

Message received at 69738-done <at> debbugs.gnu.org:


Received: (at 69738-done) by debbugs.gnu.org; 21 Mar 2024 08:58:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 21 04:58:17 2024
Received: from localhost ([127.0.0.1]:34305 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rnEFc-0003zW-L5
	for submit <at> debbugs.gnu.org; Thu, 21 Mar 2024 04:58:16 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33086)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rnEFb-0003zK-C6
 for 69738-done <at> debbugs.gnu.org; Thu, 21 Mar 2024 04:58:16 -0400
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 <eliz@HIDDEN>)
 id 1rnEEs-0004pi-57; Thu, 21 Mar 2024 04:57:30 -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=aPtiDYDedPPsACxZr3Ym1JNRWxz4okZhEq9DJyGFDtw=; b=SFEuzPFChXav
 1QayuSFsZXxaXnGC3I8mRspKAhHf/R2a+/ascxaHIa4aUf+x+XpChmwrP9in5C0MaApGFxS1VqI/k
 G739yYFQSk4qxHVr8Ad4f3w+eHAcD6k+nsMEP9arQxUG3G0bt+zM8ksYPbOqvF2V5YKjiByg33UvA
 Y3Gs7w8e0O//acS+cc41MDj4Xg4yev24oUKFPYEgP1ly7eZgq1DjePsqprfvfHw1sxVBIjMsR7zYD
 R/0o9ml9rzCTOFyWZOPR0MR1cKNjETV1p+26/O6TgmnqGhlJjigj0YDCfl9Hwq9TwfNG39OzokBk5
 O2/8OS+spA82PlL0Ftdl+w==;
Date: Thu, 21 Mar 2024 10:57:25 +0200
Message-Id: <86edc42c96.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rameiko87@HIDDEN
In-Reply-To: <86plvztv14.fsf@HIDDEN> (message from Eli Zaretskii on Tue, 12
 Mar 2024 15:54:47 +0200)
Subject: Re: bug#69738: [BUG] rmail-mail-new-frame doesn't delete the new frame
 after composing the message on Emacs 29.2
References: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
 <86plvztv14.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738-done
Cc: 69738-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 69738 <at> debbugs.gnu.org
> Date: Tue, 12 Mar 2024 15:54:47 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> 
> > Date: Mon, 11 Mar 2024 22:49:54 +0000
> > From: rameiko87@HIDDEN
> > 
> > For brevity I don't include the steps for C-c nor for C-s but only for 
> > C-d and C-k; but I can assure you that the case of C-c would yield the 
> > same result; I wonder what the desired result would be for C-s instead.
> > 
> > Steps to reproduce:
> > 
> > emacs -Q -nw
> > M-: (setq rmail-mail-new-frame t)
> > M-x rmail
> > m
> > C-c C-d
> > 
> > alternatively, use C-c C-k on the last line.
> > 
> > Expected result:
> > The frame is deleted (as the manual specifies at the end of 34.10).
> > 
> > Actual result:
> > The frame is not deleted.
> 
> It's a documentation bug: that frame is deleted only if certain
> conditions are met.  One of those conditions is that there are
> visible frames on display besides the frame where the message was
> composed.  In the -nw session, that condition is not met.  See
> rmail-mail-return for more details about what is actually being done
> in each case.
> 
> IOW: this is a feature, and (IMO) a reasonable one at that, it just
> needs a better documentation.

I've now made the documentation more accurate (on the emacs-29
branch), and I'm therefore closing this bug.




Notification sent to rameiko87@HIDDEN:
bug acknowledged by developer. Full text available.
Reply sent to Eli Zaretskii <eliz@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 69738 <at> debbugs.gnu.org:


Received: (at 69738) by debbugs.gnu.org; 12 Mar 2024 13:55:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 12 09:55:44 2024
Received: from localhost ([127.0.0.1]:42736 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rk2bQ-0006lz-Td
	for submit <at> debbugs.gnu.org; Tue, 12 Mar 2024 09:55:44 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52586)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rk2bO-0006jJ-0Y
 for 69738 <at> debbugs.gnu.org; Tue, 12 Mar 2024 09:55:35 -0400
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 <eliz@HIDDEN>)
 id 1rk2ai-0005qs-3K; Tue, 12 Mar 2024 09:54:53 -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=8k8s/EGF+Qj2/Q7b7tWOjSmD+vSmUisgXqtQS047sa8=; b=LR1k2rShztSD
 O9+uw0/Y1zATDtJKlMq9xZnIgKd8hggJpV95FruQoRAknrt/9bYMPCjQl5OuP77FLcAa64lhNB50r
 diGDBnjpK6mJBtL7nFcn1ZLgCKwJSApUNXjI1WtnXSgtzXDwUYBETgB8DQxlIu44eKkRf02BTq75V
 SsdCLvnMlJwcgmi1L7qmiS2+HZjVYIEi4n3+p6kDA15kUQJnUm31T13tFdlfpk+ZQpit3DtdPQLGt
 pWWQfM03Cch9wgvF7w14FVYJMevGdqH3OWk98UNoi07zXNJYbAmnqHtucinx01MOJxucRMuaD9zZS
 OadY3RH1QidIi6c+42LsKA==;
Date: Tue, 12 Mar 2024 15:54:47 +0200
Message-Id: <86plvztv14.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rameiko87@HIDDEN
In-Reply-To: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
 (rameiko87@HIDDEN)
Subject: Re: bug#69738: [BUG] rmail-mail-new-frame doesn't delete the new frame
 after composing the message on Emacs 29.2
References: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69738
Cc: 69738 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 11 Mar 2024 22:49:54 +0000
> From: rameiko87@HIDDEN
> 
> For brevity I don't include the steps for C-c nor for C-s but only for 
> C-d and C-k; but I can assure you that the case of C-c would yield the 
> same result; I wonder what the desired result would be for C-s instead.
> 
> Steps to reproduce:
> 
> emacs -Q -nw
> M-: (setq rmail-mail-new-frame t)
> M-x rmail
> m
> C-c C-d
> 
> alternatively, use C-c C-k on the last line.
> 
> Expected result:
> The frame is deleted (as the manual specifies at the end of 34.10).
> 
> Actual result:
> The frame is not deleted.

It's a documentation bug: that frame is deleted only if certain
conditions are met.  One of those conditions is that there are
visible frames on display besides the frame where the message was
composed.  In the -nw session, that condition is not met.  See
rmail-mail-return for more details about what is actually being done
in each case.

IOW: this is a feature, and (IMO) a reasonable one at that, it just
needs a better documentation.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Mar 2024 22:50:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 11 18:50:42 2024
Received: from localhost ([127.0.0.1]:41454 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rjoTh-0003G3-SB
	for submit <at> debbugs.gnu.org; Mon, 11 Mar 2024 18:50:42 -0400
Received: from lists.gnu.org ([209.51.188.17]:52200)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rameiko87@HIDDEN>) id 1rjoTc-0003Fk-87
 for submit <at> debbugs.gnu.org; Mon, 11 Mar 2024 18:50:40 -0400
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 <rameiko87@HIDDEN>)
 id 1rjoT3-00084M-RI
 for bug-gnu-emacs@HIDDEN; Mon, 11 Mar 2024 18:50:01 -0400
Received: from mout01.posteo.de ([185.67.36.65])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rameiko87@HIDDEN>)
 id 1rjoT1-0003pd-TR
 for bug-gnu-emacs@HIDDEN; Mon, 11 Mar 2024 18:50:01 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 9C6D1240028
 for <bug-gnu-emacs@HIDDEN>; Mon, 11 Mar 2024 23:49:55 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1710197395; bh=srCW5uSj48ByrZxpgy0/Vqqck4TgPQkgJAYSIUSGwxY=;
 h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To:
 Subject:Message-ID:From;
 b=YtEuLfBdOi1L0Ga8A7cM5cdfOEBDeJMGnTVkPlZXv+bkWxb8stJQm33biyF7yN1jy
 Q2Eg79B+Fc4HJKXAfLnS4Q2k7zK+VZtoA3jh5s3KrHAJvtL+ZoaJdiWB94utLqjCmh
 6ioqVOZUQXrWQw+NK8F6OqU5PS3hABOf/Si14phqHDDUc1IZUkV9V7SZT6sAAqW72X
 ZSyt4TI1DMM+YYvvpsakn9o5zI7ZcqsV2wxKsc/He+J6aHcgMJWUiu9wsau4xWbrO7
 fxm9A/mZgg8SK7+uDXjSgtMpDu8XLoAvBXJN3R0W7uGghq7uzlBzhzshrPyGXEl9Qt
 MfZjo4DzgbeqA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4TtsRR12Cyz9rxK
 for <bug-gnu-emacs@HIDDEN>; Mon, 11 Mar 2024 23:49:54 +0100 (CET)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Mon, 11 Mar 2024 22:49:54 +0000
From: rameiko87@HIDDEN
To: bug-gnu-emacs@HIDDEN
Subject: [BUG] rmail-mail-new-frame doesn't delete the new frame after
 composing the message on Emacs 29.2
Message-ID: <4a0215b2e7bb416cf352e867183f745a@HIDDEN>
Received-SPF: pass client-ip=185.67.36.65; envelope-from=rameiko87@HIDDEN;
 helo=mout01.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

For brevity I don't include the steps for C-c nor for C-s but only for 
C-d and C-k; but I can assure you that the case of C-c would yield the 
same result; I wonder what the desired result would be for C-s instead.

Steps to reproduce:

emacs -Q -nw
M-: (setq rmail-mail-new-frame t)
M-x rmail
m
C-c C-d

alternatively, use C-c C-k on the last line.

Expected result:
The frame is deleted (as the manual specifies at the end of 34.10).

Actual result:
The frame is not deleted.




Acknowledgement sent to rameiko87@HIDDEN:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#69738; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 20 Apr 2024 11:15:03 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.