unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 70959@debbugs.gnu.org
Subject: bug#70959: Tramp connection property can interact weirdly with cache
Date: Sat, 25 May 2024 17:36:23 +0300	[thread overview]
Message-ID: <2af3f2df-bc33-4b32-8c0f-d156e4c349bf@gutov.dev> (raw)
In-Reply-To: <87ikzbvu3x.fsf@gmx.de>

Hi Michael,

On 18/05/2024 21:43, Michael Albinus wrote:
> Try the following patch and the config as shown above.
> 
> 
> diff --git a/lisp/tramp.el b/lisp/tramp.el
> index f024ebec..814d33e6 100644
> --- 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)

Do you think we could also make it so

  (setq tramp-direct-async-process t)

in the user config also works? Affecting all connections, naturally.

Not sure if we'll want to advertise it as a proper way to apply this 
config, but I'd probably use this shortcut myself, and especially during 
testing.

E.g. the change below (or equivalent):

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 18116229337..1864ef6541d 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4878,9 +4878,7 @@ tramp-direct-async-process-p
           (tramp-get-method-parameter v 'tramp-direct-async)
  	 ;; It has been indicated.  We don't use the global value of
  	 ;; `tramp-direct-async-process'.
-	 (or (and (tramp-compat-connection-local-p tramp-direct-async-process)
-		  (tramp-compat-connection-local-value
-		   tramp-direct-async-process))
+	 (or (with-connection-local-variables tramp-direct-async-process)
  	     ;; Deprecated setting.
               (tramp-get-connection-property v "direct-async-process"))
  	 ;; There's no multi-hop.






  parent reply	other threads:[~2024-05-25 14:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-15 14:51 bug#70959: Tramp connection property can interact weirdly with cache Dmitry Gutov
2024-05-16 15:45 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-16 17:14   ` Dmitry Gutov
2024-05-16 18:39     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-16 19:15       ` Dmitry Gutov
2024-05-17 14:40         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-18  1:38           ` Dmitry Gutov
2024-05-18 10:57             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-18 13:15               ` Dmitry Gutov
2024-05-18 18:43                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-19  0:27                   ` Dmitry Gutov
2024-05-19 12:18                     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-19 12:41                       ` Dmitry Gutov
2024-05-25 14:36                   ` Dmitry Gutov [this message]
2024-05-25 14:58                     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-25 14:59                       ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2af3f2df-bc33-4b32-8c0f-d156e4c349bf@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=70959@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).