From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: call-process should not block process filters from running Date: Sun, 09 Jul 2023 11:04:43 +0200 Message-ID: <87ttud3178.fsf@gmx.de> References: <83cz1fvjef.fsf@gnu.org> <83h6qnpieb.fsf@gnu.org> <837criq321.fsf@gnu.org> <87r0pprhfd.fsf@catern.com> <1f5d7e77-3ac0-6b6e-9bd6-73302114ebaa@gutov.dev> <875y6zo8b2.fsf@catern.com> <889b8238-be22-4cc0-5884-dcb055641be9@gutov.dev> <871qhlojzo.fsf@catern.com> <87r0plwjj6.fsf@gmx.de> <87r0pimmap.fsf@catern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10032"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: sbaugh@catern.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 09 11:05:46 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qIQMU-0002Sj-Az for ged-emacs-devel@m.gmane-mx.org; Sun, 09 Jul 2023 11:05:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIQLb-00035g-Vz; Sun, 09 Jul 2023 05:04:52 -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 1qIQLa-00035U-3H for emacs-devel@gnu.org; Sun, 09 Jul 2023 05:04:50 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIQLY-0002Jx-Au for emacs-devel@gnu.org; Sun, 09 Jul 2023 05:04:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1688893484; x=1689498284; i=michael.albinus@gmx.de; bh=qJl9UjOv49QAXo7aKScoxWfoPv0MgF8B4TRNVwYe8gA=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=V5BLJdgmzuO1sUEzM8z91KhV002H37qczRTWakuyVpqkF0CFRJqlgW4hu3AVmJNU253MWmF eNY2Q5ZnP+a1vsziT4EkxSEneNjLQY+PXWmSid6/qWOOb2JoVz4jkOMoVsV5ZSErlUPfEwBGa gDEuIA89+/v0+oXxtrxj4nyTqp6caV/dw9A9Sz/u92mjaAYmju+mM50N1gyBpst/1wyzutSSd pX/qerdaQ3vPuyoTEG1F1n4SdxvOOdVcoJUg7YZP6DT8XASrooizQvdJkbJu/1bI+ApqX3dYX hnlTuFf98yZc8vUHnWd2utnWCgUBFg4Fk1Oe7VVvtolLIMknC4Qg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.22]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MHG8g-1qDyMW2F04-00DJAV; Sun, 09 Jul 2023 11:04:44 +0200 In-Reply-To: <87r0pimmap.fsf@catern.com> (sbaugh@catern.com's message of "Sat, 08 Jul 2023 11:54:06 -0400") X-Provags-ID: V03:K1:vI6y+44SIXXxXq21AKFiHWPdgsao1Z8k8NP8CufU75bW2MxvtZQ /Ux5I/WxowPjWPmmg9eZ6crCybIW+ANdvlzpZHo7+y1q7i2PLbu4M6Qy2Wd/9HKmFFQ4vFL QIaLn9phrtl/psiHb0DUh+IofBO5bJ288KkfTDx31kuuHfl9qIsL0Nxc2yKlTIJDNk9/pJ0 Zp/9kZGeAlNRP5GFBtvkA== UI-OutboundReport: notjunk:1;M01:P0:xMWiz2uPyU8=;wqeGXRH57FfuaJKd8vyupTL8rJO 0dTmG94GnqEcSGP3X4TLKmG6En1dQ4828m313qQdAjQXD1AurgWhFBPRc+X4Dnui0kKTfbwNp OX36tj3Xiq4OFR5sXpNR0CyR3TdezTuKNKT9jb7N9tHb7lbUN7WkY9U6hpfAsEA/fkbW6Qk6z Ns5CMdjp7SxiSgcP3P9FmRA9e7fjpNApq8vs7RKi4cPO231Dv4t1d1XnmVIakHz7g/nc77w4x r3Hd60wHPzxBx7qbSZ3ko6aFF/aCa5NmE1Vvak1fR59lRwiWVsQGJdUpl4ECvqzW765H3R8/7 eRxObLAXsnKhfGXGFqXsJAXYMEDSFWqILweZaO3ZAdfPPgJvoSPAdyfI8tqb3V07qeGgfAdVN RdjVmbFrLrk9jQp+J+ZXT/EQpDrFYepyFK6eWaCfTAl9BJsg753XJ3pvA98m0tDOfFEvqPh1W +ZBqmA8H6NG0gMmy3CKB/gxyUM5f0g7gwJ+ReFPq1ve58CVhH7ecerSwBE0n3MI60YOgpZ5DQ GQkkFGUoWtWiZEp8KtcBLGyQT6NnwnBqVSJo8xBq3WH5tJc6Vbt2qnFbtTHCFJOw8VoxJ364D WMrM/qjsjAQdGsRYQ5E8Kv9u6lwSvZhQ+I5ziReho5KDkiqSMvz5GlcbrT3AKhtd5cGvwQgv7 U0HN+sn+gXj8qOHgyv/usw5ZbPFGrYG8gVHNMjrXPaUGOCi0Zyaz4VFlN5SPKaJYJv/t6kUDO hZs43RunjvLJO1jMiXWr1gyeojwqz4QJzm+KpsfFzYerVmCK4n+qJKAXLeWOX9XDCrlAIxvd Received-SPF: pass client-ip=212.227.15.15; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307649 Archived-At: sbaugh@catern.com writes: Hi Spencer, > Here we are talking about switching project-find-regexp to internally > use start-file-process instead of process-file, since > project-find-regexp can take non-trivial amounts of time, but retain the > current synchronous UI. The benefit would be to not block other Lisp > from running while project-find-regexp runs, including in filters and > timers. But actually running the process underlying project-find-regexp > asynchronously (e.g., having process filters and sentinels on it) is not > necessary. That you can always do, both functions are available. My concern was rather to call start-file-process inside of process-file. However, I must claim that Tramp has always hard times when asnychronous calls, like timers, process sentinels, process filters and alike, invoke other basic file operations (like file-exists-p) on remote files. These asynchronous calls could interfer with Tramp's normal workflow on handling such basic operations, and they are good for the famous =E2=80=98R= emote file error: Forbidden reentrant call of Tramp=E2=80=99 error. So I'm always nervous if such usage patterns apply. > However, switching from start-file-process to process-file loses support > for some TRAMP backends. The question: Is there a way to get the > benefit (not block other Lisp from running) without the cost (losing > support for some TRAMP backends)? Well, checking the different backends (all tramp-*-file-name-handler-alist constants), there is no Tramp backend which doesn't support process-file and start-file-process simultaneously. > Although maybe the answer is to just ensure that every TRAMP backend > supports start-file-process, since for example project-compile won't > work with out that also. That's impossible. Some backends, like tramp-gvfs or tramp-rclone, simply don't support remote processes. Best regards, Michael.