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: Thu, 02 Nov 2023 07:48:08 +0200 Message-ID: <83msvw904n.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> <834ji5aatw.fsf@gnu.org> <87bkcde4bz.fsf@ledu-giraud.fr> <83r0l98e6w.fsf@gnu.org> <87lebhckp2.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26428"; 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 Thu Nov 02 06:49:54 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 1qyQaY-0006hY-8d for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Nov 2023 06:49:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyQaE-0006qB-BY; Thu, 02 Nov 2023 01:49:34 -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 1qyQa7-0006py-Ie for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 01:49:28 -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 1qyQa7-0006xX-AR for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 01:49:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qyQag-00033E-1Y for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 01:50: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: Thu, 02 Nov 2023 05:50: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.169890414211554 (code B ref 63311); Thu, 02 Nov 2023 05:50:02 +0000 Original-Received: (at 63311) by debbugs.gnu.org; 2 Nov 2023 05:49:02 +0000 Original-Received: from localhost ([127.0.0.1]:53652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyQZh-00030B-RA for submit@debbugs.gnu.org; Thu, 02 Nov 2023 01:49:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyQZe-0002yw-1K for 63311@debbugs.gnu.org; Thu, 02 Nov 2023 01:49:00 -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 1qyQYz-0006sP-2P; Thu, 02 Nov 2023 01:48:17 -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=szsI+e99wdpqAPKvDkiAkshsAxol6FmU0kEJUlCfSvE=; b=VSS0FcO9L4ns VIWOqCeyKIgWROhbdfljO9Mw3R6DbATDYb3QdeFw+bsJZVrycpOiVSF2ePcFSwiGdT+uAgCEBBn/F KLQwxKPhN3yZvMizPlyFXaf/xlwDqOFXqEMFHifPnf4w9EHvgEyEupph+JgdFbJJDvxYnug4+35je JCxv4f8TUQQY6qIxI4XYJxqg58Aa29X0B6TDtCZtW2C7XrW+VEvTzq4hiWauoMHHxFkFav0b5GJz8 BXbZfBW4Qi5tAiy+wQ+AZw4Zhd7KFExERSMsH8Sci/iE0U1UYmTaLiUmk9btlvwje3/LPF8duWYHG dce+4LGG8OiXjIxXEfOmyw==; In-Reply-To: <87lebhckp2.fsf@ledu-giraud.fr> (message from Manuel Giraud on Wed, 01 Nov 2023 20:55:37 +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:273629 Archived-At: > From: Manuel Giraud > Cc: 63311@debbugs.gnu.org > Date: Wed, 01 Nov 2023 20:55:37 +0100 > > Eli Zaretskii writes: > > >> 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. > > Sorry I did not test this. But maybe when this starts working, we > should consider removing the progress report for large messages. I think when messages are sent in the background, there should be a different series of messages: one at the beginning, when the thread is launched, and one when the thread exits. Both of these should be output by the main thread, not the thread which sends. The sending progress messages will not be shown, since they are mostly useless anyway (if the user wants the sending to be in the background, it generally means he/she doesn't care much about the progress, since Emacs is not waiting for the sending to complete). If we need more detailed messages in some cases, we could have a special buffer which the user could then view if needed. > > So you have several threads sending at the same time? If so, what > > happens with their errors and success messages? > > Their was no errors because those sendings did not generate any. The > success messages appeared in the *Messages* buffer. One more reason to move the messages to the main thread, to avoid threads "fighting" for the echo area. > > 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. > > Yes this is just a start and should be tested on normal/regular usage. > As always, when I start working on this I rediscover that there is many > housekeeping done afterward by the 'smtpmail-send-it' callers (marking > as sent via mail,...): this should be taken into account too. So it may > be encouraging but I think this is just a start. Right, thanks. When this is available, I will probably become a heavy user of this feature. It should probably be an opt-in feature initially, so as to let people try it without disrupting their production workflows too much.