From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: call-process should not block process filters from running Date: Wed, 5 Jul 2023 21:53:21 +0300 Message-ID: <889b8238-be22-4cc0-5884-dcb055641be9@gutov.dev> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30374"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 To: sbaugh@catern.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 05 20:54:58 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 1qH7eS-0007fI-2q for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Jul 2023 20:54:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH7dY-0002kS-5L; Wed, 05 Jul 2023 14:54:04 -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 1qH7dH-0002ij-5N for emacs-devel@gnu.org; Wed, 05 Jul 2023 14:53:43 -0400 Original-Received: from new3-smtp.messagingengine.com ([66.111.4.229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH7dD-0002G2-Sv for emacs-devel@gnu.org; Wed, 05 Jul 2023 14:53:42 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id C8C3258032E; Wed, 5 Jul 2023 14:53:34 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 05 Jul 2023 14:53:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1688583214; x=1688590414; bh=4GasLVB4G1YsKdDUYIN3en0rsbSOeXO99T8 yHn74Rw8=; b=RLKFraVzgDkKPRB1zLFA4/GRD8T/ZuNK3iMmFY9XALRylW9SqK7 IHi1rKEADYiV+ZeNoVtbxho3LmtH7RckfDvgj6HNlSn0QQamo0aKOzOLG35kVbWy mj8FN71/otX0sq7V0KSoX9OWrBiHXqpZHZiMtQMy33FXCxzd00D1iA0tMsLaxuem aMc3G1n+7pytimBriMcI+F3C5OqGDUeh/irbO7Kbii1x2ISzoKbYdoIIUxVHLVy7 L+WiHK43m8liYczuM0EauR2a7g82KcsYS3puUFy7jlkTHlnmIh4HsvRelnd3828J 3cPcFWKySURPvTM2U2FHBP+5UJHXq+x0tjw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1688583214; x= 1688590414; bh=4GasLVB4G1YsKdDUYIN3en0rsbSOeXO99T8yHn74Rw8=; b=m 8rg3yhDDkCLl7Qoyz/S432hoSRwtE+9qSvtOm7UjHreiSSwhwF1dDJzwyDua+0je UqArotH91pgyvQ8vm34nFJf7n4TyL9KKYzyZO8IP6JXlWoveqxwZsknEHcJXWgLV VKpARs2CCZm7QQyHm8O65sbVvG/bqw7gDZkqfuRzKAZlB6IqTNh/YBthBAjlMikn SehpZ/TpBu6/MqaLL8eKZeoMfDzO3lDX1a6Fo5oRNIOydqMplwVy5tz3MImbX7ie 9wYAkzKumhWOwR20a6hzgByNX/v1kNKXBMP3OJFFIi+TLAA0QpIAvwhp/jXIctWc uL3LuklcBGil/qK40U2sQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudejgdekfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthejre dttdefjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhht ohhvrdguvghvqeenucggtffrrghtthgvrhhnpeeghedthedujeeiteeutddtjeekheejte eukeehffdutdejuedvfeevueevieduudenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Jul 2023 14:53:23 -0400 (EDT) Content-Language: en-US In-Reply-To: <875y6zo8b2.fsf@catern.com> Received-SPF: pass client-ip=66.111.4.229; envelope-from=dmitry@gutov.dev; helo=new3-smtp.messagingengine.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 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, NICE_REPLY_A=-0.089, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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:307477 Archived-At: On 04/07/2023 21:12, sbaugh@catern.com wrote: > Dmitry Gutov writes: >> On 03/07/2023 03:02, sbaugh@catern.com wrote: >>> Since project-find-regexp can >>> take many seconds on large repos, I think this is useful. >>> However, my other main test case/use case, being able to paste while >>> Emacs is in call-process, doesn't work with this change. Any idea on >>> how to make that work? >> >> Do you have some particular aim related to project-find-regexp? >> >> Having Emacs interactive and responsive while the search is ongoing >> would require a different direction in design. >> >> Is the goal simply to have other, unrelated code keep running? > > I merely use project-find-regexp as an example of an important function > that uses call-process. The goal is indeed simply to have other > unrelated code keep running. And to be able to paste in other X > clients. And be able to call project-find-regexp (and other > call-process using functions) from a Lisp thread. Cool. project-find-regexp also works over Tramp, though. Given Michael's objections in the other subthread, do you expect the proposed change might break that? If it simply keeps the current limitations (when invoked on a remote host), that's probably fine. > Changing project-find-regexp to use asynchronous processes would be > nice, but more work, requiring more design effort. Running processes > synchronously is fine, if it doesn't block unrelated code. Sure. And there's some expected additional process handling overhead after switching to asynchronous calling. Though it would be nice to do some experiments, to measure the potential slowdown.