From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70959: Tramp connection property can interact weirdly with cache Date: Sat, 18 May 2024 20:43:30 +0200 Message-ID: <87ikzbvu3x.fsf@gmx.de> References: <3cbaaa39-c07b-4fde-bc94-0f3c6744e59a@gutov.dev> <87h6exdal2.fsf@gmx.de> <87a5kpd2iw.fsf@gmx.de> <87wmnstsb3.fsf@gmx.de> <87pltjxu8p.fsf@gmx.de> Reply-To: Michael Albinus Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2350"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 70959@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 18 20:44:15 2024 Return-path: Envelope-to: geb-bug-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 1s8P2V-0000LP-Mm for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 May 2024 20:44:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8P2N-0000fI-BJ; Sat, 18 May 2024 14:44:07 -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 1s8P2E-0000et-CR for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 14:43:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s8P2E-0007Lz-4k for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 14:43:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8P2H-0000zd-La for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 14:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 May 2024 18:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70959 X-GNU-PR-Package: emacs Original-Received: via spool by 70959-submit@debbugs.gnu.org id=B70959.17160578263804 (code B ref 70959); Sat, 18 May 2024 18:44:01 +0000 Original-Received: (at 70959) by debbugs.gnu.org; 18 May 2024 18:43:46 +0000 Original-Received: from localhost ([127.0.0.1]:35013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8P21-0000zI-IO for submit@debbugs.gnu.org; Sat, 18 May 2024 14:43:45 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:37105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8P1z-0000zA-SE for 70959@debbugs.gnu.org; Sat, 18 May 2024 14:43:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1716057811; x=1716662611; i=michael.albinus@gmx.de; bh=Y0VWCUoug22zuye+tgBxzunlbl8QqLj8YB//dJxdgaI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=fKfhp2e3RccAnPHbit4oJSwvtC01nU97TqWGEuIAdgOw2jFwGudgs+mQhP2chfTi L/yfoXh9iP7r0uK/sVDvKClsSUec7rouX2r4eQNeZ4CfDG029RPhvEJZUJ0dCSNIr H11WDtyF6GwnpOkTQcYXW7qCSIwUK9Q+L29/bVJefFrtvHsXiBk9Zdb/r43ezTzS6 A4x37UiLaaTnHkkTj0pv65I4lZ/dKSF/d54COtELg4ExZV0qYAqcnQB3vCe3yIm5n IIQEpxkOkoJKq7QUfSxy9eXUGoQVVwwRTvr6kp70LiyyszDKwjtQoXvZDGFHWznWl 5R42af+LGyiKIpu9WQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.38.151]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N7iCW-1sdURN0pH8-014nT1; Sat, 18 May 2024 20:43:31 +0200 In-Reply-To: (Dmitry Gutov's message of "Sat, 18 May 2024 16:15:47 +0300") X-Provags-ID: V03:K1:wS5qkrES6iTmNIMIUQTlFBQZyKs/ze3SQCLpYbo9s7NScWizm7I jvdLIgQRm2jCngmrzijuMRR4hVLCuLfb6DSRJynMGwvtJbCNmwPTIPChz/qlBaN2xWsCaw3 wHgxcdfO32TDpu/fHQZZdHPtqvGBKL1rtaxvpEkQsKxOpXCa2vV2JJmDR2fMWULIumUMC/K mo0axRoCIkXwIqTO4o2DQ== UI-OutboundReport: notjunk:1;M01:P0:+5n33TEY1FM=;EWYQBVmX1j3fvRxj/+An+fSTmxz 6bNO6FbEFf9KX4EC2RFcTNMgrQl5JdStS3VdwXUR/zS5cctkG2QnhG6EMqS+MJXBPLHWW83rQ JFIr5q3/JMW6kR/qtvey0lmRudaNs5J0Fuv6rXutJ6xWzveTjV9xAAS5dC1NRd9Rs48PfGyAY M/JhKBRds1+fyaqGuVUR1J6xUt2VT+GXVV3gE8lh9YIOL9OjArK2nU7OIQdUq0ci+lBkcspjO eSzmCZ93+YC7kv3cnSL8SUCm4d7fM3yIUDoYSiTVCigbcwCnqyeavPheFCa0U8eCZINpVy80i EyNyCSxr1LdR+loo/SmBg44Y8JDILrJZuw4ekviyHZXi1WX4ME2RuvLVDKFocIeFW8ZtIcnhh 7n+UyhDjBgPi3UsV175rEzxDR72VAEsPtn4Ih5rOTCinmgzLY/M8wEdSTULaR3NjRedMzF9ta 5i61onM6On+ghRpvXlOZU0EXPJRlY59ufRS0RPeAlNmbl9s8SuI2D7Li/gkStU8Emx4PsgFp5 LJgq5llMj8TK0uWTmLOlHfts3rqsUrTKa0xTpPe7R824ZPGzE1H9FLU3kZWyA0QmR47OBVJAm N3+M0SxkXCII8a6BtbTjBTxPEjcta/zJgc3F68wG5PCVZdcKbA9xauiN7MSwVNuSN3bMupwMk kBoy1AYoC2kBPt2LYMmef/tKGzQ2V9HsWOtuayjWUXXJWEZoW9QSedvF69K559hzae41+60JQ pVQqS+lXCRjTcaOqq58WLfSLLj8CoT9R5bVcSA9WgvqIZy2e+d95tWfKpSYwQbMzocSuIRMs X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285366 Archived-At: --=-=-= Content-Type: text/plain Dmitry Gutov writes: > Hi Michael, Hi Dmitry, >> You would do something like >> --8<---------------cut here---------------start------------->8--- >> (connection-local-set-profile-variables 'remote-direct-async >> '((tramp-direct-async-process . t))) >> (connection-local-set-profiles >> '(:application tramp :machine "randomhost") 'remote-direct-async) >> --8<---------------cut here---------------end--------------->8--- >> `remote-direct-async' is a profile name you could choose >> yourself. `tramp-direct-async-process' would be the respective Tramp >> variable. > > That looks very reasonable. One bonus is that the machine is specified > by the hostname only. > > Which would avoid the difficulty of tweaking the regexp (e.g. I had a > problem - on a different machine - that my url included a port, and > that needed to be reflected in the regexp as well). Try the following patch and the config as shown above. --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/lisp/tramp.el b/lisp/tramp.el index f024ebec..814d33e6 100644 =2D-- a/lisp/tramp.el +++ b/lisp/tramp.el @@ -4847,6 +4847,8 @@ a connection-local variable." (when (process-command proc) (tramp-message vec 6 "%s" (string-join (process-command proc) " ")))) +(defvar tramp-direct-async-process nil) + (defun tramp-direct-async-process-p (&rest args) "Whether direct async `make-process' can be called." (let ((v (tramp-dissect-file-name default-directory)) @@ -4855,7 +4857,7 @@ a connection-local variable." (and ;; The method supports it. (tramp-get-method-parameter v 'tramp-direct-async) ;; It has been indicated. - (tramp-get-connection-property v "direct-async-process") + (connection-local-value tramp-direct-async-process) ;; There's no multi-hop. (or (not (tramp-multi-hop-p v)) (null (cdr (tramp-compute-multi-hops v)))) --=-=-= Content-Type: text/plain Best regards, Michael. --=-=-=--