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: Manuel Giraud
Subject: Re: Non file buffers and default-directory
Date: Sun, 23 Apr 2023 13:46:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

[...]

> Btw, if someone is looking for a worthy development task which could
> be handled by threads, I have one: make smtpmail-send-it run from a
> thread, thus avoiding to lock up Emacs until the email message is sent
> (or fails to be sent).  This is especially important when the link is
> flaky, in which case sending an email message could lock up Emacs for
> many seconds.

FTR, I've tried the following:
--8<---------------cut here---------------start------------->8---
(defun my-send-mail-function ()
  (make-thread #'smtpmail-send-it))

(setq send-mail-function 'my-send-mail-function)
--8<---------------cut here---------------end--------------->8---

This seems to work but I guess that you were thinking of something else.
-- 
Manuel Giraud



reply via email to

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