help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non file buffers and default-directory


From: Eli Zaretskii
Subject: Re: Non file buffers and default-directory
Date: Thu, 27 Apr 2023 14:14:39 +0300

> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: help-gnu-emacs@gnu.org
> Date: Thu, 27 Apr 2023 12:58:15 +0200
> 
> Thanks for your support.  I'm reading some code now and I start to
> realize that *just* having an async SMTP sender in Emacs won't be that
> easy.
> 
> An example: I'm using Gnus (and message.el) to send mail.  If you look
> at 'message-send' (lisp/gnus/message.el#4396), that I guess is calling
> 'smtpmail-send-it' down the line, you'll see that it is "waiting" for a
> synchronous 'success' to decide what to do next (for example, renaming
> the buffer from *unsent...* to *sent...*).  This won't work as is with
> an async SMTP sender.  I imagine that there are other places with code
> like that and that it could break many workflow.

I know it is not easy, right?  Basically, the function(s) that
actually send the email will have to be broken into two: one that
prepares the message, the other which actually sends it.  It's the
latter that needs to run from a separate thread.  in addition, there
should be some callback that marks the message as sent, and does
whatever else bookkeeping is needed when the send succeeds or fails,
like, for example, if this is a response, marking the original message
as one that was replied-to.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]