GNU bug report logs - #63311
30.0.50; [PATCH] smtpmail-send-it split

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Fri, 5 May 2023 15:10:01 UTC

Severity: wishlist

Tags: patch

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 63311 <at> debbugs.gnu.org
Subject: bug#63311: 30.0.50; [PATCH] smtpmail-send-it split
Date: Sun, 05 Nov 2023 17:46:40 +0200
> From: Manuel Giraud <manuel <at> ledu-giraud.fr>
> Cc: 63311 <at> debbugs.gnu.org
> Date: Sun, 05 Nov 2023 15:24:50 +0100
> 
> Hi Eli,
> 
> I'm still struggling with making 'smtpmail-send-it' async.  As I'm using
> message.el, I'm trying to make it work here.  But message.el in written
> in such way that it is quite hard to make it work with a threaded
> 'smtpmail-send-it' call.
> 
> And then, from a message buffer (with a quite large attachment), I've
> just evaluted the following: (make-thread #'message-send)... and
> everything went ok:
>            - Emacs is still responsive: I could switch to other
>              buffers, request the status of a VC handled file.
>              
>            - When the message is finally sent, the buffer is renamed
>              accordingly and tagged as sent via mail.
> 
> So my question is this one: instead of making 'smtpmail-send-it'
> threaded why not have a threaded version of toplevel commands (such as
> 'message-send')?  We could hopefully do the same for sendmail.el.  Of
> course, we should have it as opt-in behind customs
> (message-send-in-background and/or mail-send-in-background?)
> 
> As for when something goes wrong and we end up in an 'error' call, maybe
> we should fix how 'error' behave inside a thread.  What am I missing?

Nothing, AFAIU.  Instead of making smtpmail-send-it optionally working
asynchronously, it should be perfectly valid to have a separate
function called, say, message-send-asynchronously, which would work
with background threads and implement the same protocol as the other
MUA's send-it functions do.




This bug report was last modified 1 year and 220 days ago.

Previous Next


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