From: Eli Zaretskii <eliz@gnu.org>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: 63311@debbugs.gnu.org
Subject: bug#63311: 30.0.50; [PATCH] smtpmail-send-it split
Date: Wed, 01 Nov 2023 21:29:43 +0200 [thread overview]
Message-ID: <83r0l98e6w.fsf@gnu.org> (raw)
In-Reply-To: <87bkcde4bz.fsf@ledu-giraud.fr> (message from Manuel Giraud on Wed, 01 Nov 2023 19:06:08 +0100)
> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: 63311@debbugs.gnu.org
> Date: Wed, 01 Nov 2023 19:06:08 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > . 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.
What happens if the foreground Lisp program displays something in the
echo-area at that time? I'm asking because I don't think it's a good
idea to show this from a background thread.
> > . 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 ...*"
Signaling an error in a non-main thread causes the thread exit
silently, with the error stored in a variable, so something should be
done to show the error to the user.
> > . 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.
So you have several threads sending at the same time? If so, what
happens with their errors and success messages?
> > 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.
If you don't see problems with responsiveness, this is encouraging.
IME, such problems happen quite frequently, for example if you type
during the time the background thread does its job.
Thanks.
next prev parent reply other threads:[~2023-11-01 19:29 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 13:13 bug#63311: 30.0.50; [PATCH] smtpmail-send-it split Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05 18:57 ` Eli Zaretskii
[not found] ` <874joq34bk.fsf@ledu-giraud.fr>
2023-05-06 6:20 ` Eli Zaretskii
2023-05-06 9:34 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-09 9:52 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-10 11:47 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-11 13:28 ` Eli Zaretskii
2023-05-11 20:59 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-12 5:41 ` Eli Zaretskii
2023-05-12 6:24 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-12 7:09 ` Eli Zaretskii
2023-05-12 7:57 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-01 12:35 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-01 12:59 ` Eli Zaretskii
2023-11-01 18:06 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-01 19:29 ` Eli Zaretskii [this message]
2023-11-01 19:55 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-02 5:48 ` Eli Zaretskii
2023-11-02 10:44 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-02 11:26 ` Eli Zaretskii
2023-11-05 14:24 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-05 15:46 ` Eli Zaretskii
2023-11-05 16:12 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-05 16:17 ` Eli Zaretskii
2023-11-06 10:21 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-06 12:40 ` Eli Zaretskii
2023-11-06 15:56 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-06 16:28 ` Eli Zaretskii
2023-11-06 17:57 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-06 19:21 ` Eli Zaretskii
2023-11-06 20:55 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-07 3:26 ` Eli Zaretskii
2023-11-07 9:06 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-07 12:12 ` Eli Zaretskii
2023-11-07 12:56 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-07 13:17 ` Eli Zaretskii
2023-11-03 2:31 ` Richard Stallman
2023-11-03 7:18 ` Eli Zaretskii
2023-11-03 13:49 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-03 14:29 ` Eli Zaretskii
2023-05-12 7:10 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83r0l98e6w.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=63311@debbugs.gnu.org \
--cc=manuel@ledu-giraud.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).