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#63311: 30.0.50; [PATCH] smtpmail-send-it split Date: Wed, 01 Nov 2023 14:59:23 +0200 Message-ID: <834ji5aatw.fsf@gnu.org> References: <87jzxmsyyr.fsf@ledu-giraud.fr> <83ttwqhahy.fsf@gnu.org> <874joq34bk.fsf@ledu-giraud.fr> <83o7mygevr.fsf@gnu.org> <87wn1hzv9j.fsf@ledu-giraud.fr> <871qjoe7cw.fsf@ledu-giraud.fr> <837ctf575q.fsf@gnu.org> <87ilcypot3.fsf@ledu-giraud.fr> <83pm763y3r.fsf@gnu.org> <87h6si5aor.fsf@ledu-giraud.fr> <83a5ya3u16.fsf@gnu.org> <871qjm56ej.fsf@ledu-giraud.fr> <87r0l9ejmm.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31061"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63311@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 01 14:01:07 2023 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 1qyAqI-0007sS-Rp for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Nov 2023 14:01:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyAq5-0004tU-EN; Wed, 01 Nov 2023 09:00:53 -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 1qyApg-0004pu-5i for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 09:00:34 -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 1qyApf-0000Py-Tx for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 09:00:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qyAqE-0007ad-8N for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 09:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Nov 2023 13:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63311 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63311-submit@debbugs.gnu.org id=B63311.169884361929093 (code B ref 63311); Wed, 01 Nov 2023 13:01:02 +0000 Original-Received: (at 63311) by debbugs.gnu.org; 1 Nov 2023 13:00:19 +0000 Original-Received: from localhost ([127.0.0.1]:50174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyApX-0007Z9-0D for submit@debbugs.gnu.org; Wed, 01 Nov 2023 09:00:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyApS-0007Yr-7f for 63311@debbugs.gnu.org; Wed, 01 Nov 2023 09:00:18 -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 1qyAoo-0008VY-4i; Wed, 01 Nov 2023 08:59:34 -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=6YY0dkM/mgNUNfzWcWClMSl+da0H/hCV2/0/vpRduV4=; b=g9Il+5bf2zrR aT8H7hmwIVUtHaVoYI1zc3d1JeIhb2VakbXTbufQZqX+7Aj83YSUeInsIcO5RCYArmEKFOcvbDtRs I97sfLWKBWrEXDKhs8UO5+r0RgYkGqocPvoCkQr7Y9N9YS/GCFPUhDwXrrD7ZWz32M6DyzB7ES4yu A38RqexZxafXwIkjBBTq9dL5YzxcC6KIzoo2tSDD2ALqjVQnjPgu6BNYEW3ULbg1VbNHw9udqQlxQ GTYf3HAnSXiZmuT3AGP+hQtVPdxUnaYgRTI1FxnvigYX3N1dt9q2Efb/pQA+6jrBkQmDbCzBOHNhz oKDtN4wQnXQasySFYHu91w==; In-Reply-To: <87r0l9ejmm.fsf@ledu-giraud.fr> (message from Manuel Giraud on Wed, 01 Nov 2023 13:35:45 +0100) 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:273601 Archived-At: > From: Manuel Giraud > Cc: 63311@debbugs.gnu.org > Date: Wed, 01 Nov 2023 13:35:45 +0100 > > I'm reviving this old bug report because I think I have made some > progress. Here is a new patch that tries to send mail asynchronously. > This seems to work for me but, of course, it needs testing, testing and > even more testing. Thank you for working on this. I have several questions about it: . I'm not sure I understand how will the success/failure of sending be communicated back to the callers. Currently, when the sending succeeds, there's a message in echo-area, and if the message was a reply, then Emacs marks the original message as "have been replied to". How will this work with async sending? . What happens if sending fails for some reason? It could be that the problem is detected by smtpmail itself, or it could be that some low-level code signals an error -- what happens in both cases? . With which MUA are you testing this? . What happens if another message is sent while the previous one is still being sent? . What did you try to do in Emacs while the message was being sent, and did you see any problems with the foreground responsiveness? For that matter, how long did it take for the background thread to send the message? If that was short enough, like 1 sec or so, I suggest to test this with sending a larger message, like a message with a large attachment. That's because the most important situation where async sending is valuable is when it takes a long time to send a message, either because it's a large message or because the connection is slow or unreliable.