From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.devel Subject: Re: call-process should not block process filters from running Date: Sat, 08 Jul 2023 11:54:06 -0400 Message-ID: <87r0pimmap.fsf@catern.com> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28686"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Cancel-Lock: sha1:oVW7gJQB4cTo76qZga9/z8b+ils= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 08 18:16:08 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 1qIAbO-0007Gd-Nc for ged-emacs-devel@m.gmane-mx.org; Sat, 08 Jul 2023 18:16:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIAaT-0005nq-4j; Sat, 08 Jul 2023 12:15:09 -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 1qIAGE-0000jm-Hv for emacs-devel@gnu.org; Sat, 08 Jul 2023 11:54:14 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIAGD-0004Y0-38 for emacs-devel@gnu.org; Sat, 08 Jul 2023 11:54:14 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qIAGB-0001bF-2f for emacs-devel@gnu.org; Sat, 08 Jul 2023 17:54:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 08 Jul 2023 12:15:07 -0400 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:307622 Archived-At: Michael Albinus writes: > sbaugh@catern.com writes: > > Hi Spencer, > >>> 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. >> >> There are a number of possible alternative approaches. One is to change >> project-find-regexp to use start-file-process instead of process-file. >> This would make project-find-regexp only work with TRAMP backends that >> support start-file-process, which is a loss, but there aren't actually >> many such backends AFAIK. >> >> It would be nice if Michael would respond to the actual question I >> posed, which is "how to avoid this loss". > > I must have missed this in the thread, sorry. Could you pls repeat the > question? > > Best regards, Michael. 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. 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)? 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.