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.help Subject: Re: Non file buffers and default-directory Date: Thu, 27 Apr 2023 09:05:16 +0300 Message-ID: <831qk5uag3.fsf@gnu.org> References: <87edohf3ip.fsf@ledu-giraud.fr> <87zg745p85.fsf@gmx.de> <87y1moe1aa.fsf@ledu-giraud.fr> <87v8hr6gvl.fsf@gmx.de> <874jpa611r.fsf@ledu-giraud.fr> <87v8hprb5w.fsf@mbork.pl> <87zg714qb8.fsf@gmx.de> <87pm7xplz3.fsf@ledu-giraud.fr> <87r0sc4cmv.fsf@gmx.de> <87ttx810mz.fsf@ledu-giraud.fr> <831qkb27st.fsf@gnu.org> <87pm7v256a.fsf@univ-nantes.fr> <87cz3vukop.fsf@gmx.de> <83leijyrb2.fsf@gnu.org> <87pm7u95yf.fsf@gnu.org> <83fs8qzrab.fsf@gnu.org> <87cz3r28ye.fsf@ledu-giraud.fr> <83ildjvply.fsf@gnu.org> <87bkjb4zkf.fsf@dataswamp.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38797"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 27 08:05:24 2023 Return-path: Envelope-to: geh-help-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 1pruku-0009qm-DA for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 27 Apr 2023 08:05:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prukN-0004X7-F3; Thu, 27 Apr 2023 02:04:51 -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 1prukG-0004Wl-Uw for help-gnu-emacs@gnu.org; Thu, 27 Apr 2023 02:04:46 -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 1prukG-0002Mt-MJ for help-gnu-emacs@gnu.org; Thu, 27 Apr 2023 02:04:44 -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=yrTUFsgKnH4u61Y7awnvSMOZWAwVz56RBILB92FzazA=; b=OWcb0VCizWkj WmISvoNLaof++enmQaoqutvzFnMsw2c7/QUWCt7RgACjFWk/Yd+mLaO59KHt5JOE4BFKfmt6Uy8t4 Twbz21/izbDVPeJGxpBlj+KdokLUk8jOAYGj6zgbBzIQ0uwPbncscl4QA+a0vmP4bT6KJemRcTemn 9GfycCjGtJtnJuL7E8Pao+iaVHxsEpInPSGyj5zMR7a28VZJs0ZEWh63KBhEWg9LBB9me53YM0+S3 RYhR/Qt9uGKKHR4WQfToFORQiEVYyFc8fXgHzXWphusS15K5bm0SX3EPMeyLpLtscsMRfiVKsKSov lCdca+8TvyDHjRVMuhtcjQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prukF-0003qz-UR for help-gnu-emacs@gnu.org; Thu, 27 Apr 2023 02:04:44 -0400 In-Reply-To: <87bkjb4zkf.fsf@dataswamp.org> (message from Emanuel Berg on Tue, 25 Apr 2023 19:54:56 +0200) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143412 Archived-At: > From: Emanuel Berg > Date: Tue, 25 Apr 2023 19:54:56 +0200 > > Eli Zaretskii wrote: > > > Thanks. This is promising, but it also means that some > > changes are needed in smtpmail-send-it to avoid the bad and > > the ugly part. (And further discussions should probably move > > to emacs-devel.) > > > > Thank you for doing this, I think it will be a very > > important feature when it becomes available. > > How do you do a defun with any/arbitrary Elisp code and call > it without Emacs becoming nonresponsive executing the code, no > matter how simple/complex, for the duration of the time the > code is executing? You use Lisp threads. If done correctly, Emacs will respond to user input while another thread is waiting for a sub-process (in this case, network connection to the SMTP server) to produce output. See the node "Threads" in the ELisp Reference manual. > Note that if this period is prolonged because of > "non-nonresponsive" interactive activity outside of this code, > such a prolongment, slim or big, is okay in this sense > (prevent nonresponsiveness), as that is another issue. Parse error.