From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63311: 30.0.50; [PATCH] smtpmail-send-it split Date: Wed, 01 Nov 2023 19:06:08 +0100 Message-ID: <87bkcde4bz.fsf@ledu-giraud.fr> 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> <834ji5aatw.fsf@gnu.org> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34925"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 63311@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 01 19:07:21 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 1qyFce-0008rc-NP for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Nov 2023 19:07:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyFc4-0004lc-F5; Wed, 01 Nov 2023 14:06:44 -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 1qyFbp-0004j4-BD for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 14:06:31 -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 1qyFbn-00018L-Ow for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 14:06:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qyFcM-0003Jw-6X for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2023 14:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Nov 2023 18:07: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.169886201512750 (code B ref 63311); Wed, 01 Nov 2023 18:07:02 +0000 Original-Received: (at 63311) by debbugs.gnu.org; 1 Nov 2023 18:06:55 +0000 Original-Received: from localhost ([127.0.0.1]:52531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyFcB-0003JV-9k for submit@debbugs.gnu.org; Wed, 01 Nov 2023 14:06:55 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]:28561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyFc5-0003JF-Tl for 63311@debbugs.gnu.org; Wed, 01 Nov 2023 14:06:50 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=TgpNGjJz zkMiDnKiShzlEa4Zt/wPw3oh916V+lRCmGg=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=kxUw3FxYMjff1oLGncMe8oUf5G0wfV 7RKtr3GP25RQ61+ksCDyMHSMGzGlkHWndWuIHXJ2r1nj20LM2S0LLZBQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=TgpNGjJzzkMiDnKi ShzlEa4Zt/wPw3oh916V+lRCmGg=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=T/QesP8wnStbiVcRHOnmEMJkH5EY2ebm2IrX6q FzbREY2O7qLGNsLHmxDVSppL2NKWUzkg+71RDcakv3s94ijpVCUNfHbDu3wv5B0FlVRUEW +Gw5Yb37/tWs3D6CNMh2HsisGisG1bzPdUcwIXuIiB2VIrcnahn3hTNT5plMG3D9lyTF4f REWyW8ma2hmGZLG6gbMCPHxBCBmO16MtuJKaCPw7/OniUFBIC4+meIch2lqCtwwcLveE5v JyrQb3/mUWFfpEWIsgOGp4iVJ5aES0IP1hFiok4jKHOP9kDkc+bUSBnaI/FVW3d/03pPCV +AlNZoh+wSPl0uBY9RtmQjIQ== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id bd2b3b93 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 1 Nov 2023 19:06:09 +0100 (CET) In-Reply-To: <834ji5aatw.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 01 Nov 2023 14:59:23 +0200") 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:273612 Archived-At: Eli Zaretskii writes: >> 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? The progress and "Sending email done" still shows in echo-area and *Messages* buffer but asynchronously. As for the "have been replied too" part, it happens right after 'C-c C-c' so a message that should error later down the line will be named as "*sent reply...": this is a problem. > . 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? Some errors should be handled in 'smtpmail-send-mail' and signal by calling (error). But other errors won't be. For instance, I tried to send a mail to a non existent address and I get no error whatsoever: the buffer is also called "*sent ...*" > . With which MUA are you testing this? I'm testing gnus and message-mode. > . What happens if another message is sent while the previous one is > still being sent? That I have tested. It works because the temporary buffer where everything takes place is generated by 'generate-new-buffer' which creates a unique name if needed. > . What did you try to do in Emacs while the message was being sent, > and did you see any problems with the foreground responsiveness? I did not do some intensive usage just moving to other buffers. I've not seen any problem with 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. Yes I have tested with longer to send message otherwise I would not be able to see the asynchronous process. -- Manuel Giraud