From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 70959@debbugs.gnu.org
Subject: bug#70959: Tramp connection property can interact weirdly with cache
Date: Sat, 18 May 2024 20:43:30 +0200 [thread overview]
Message-ID: <87ikzbvu3x.fsf@gmx.de> (raw)
In-Reply-To: <fc192db5-31dd-4d10-8107-99de5d5e6904@gutov.dev> (Dmitry Gutov's message of "Sat, 18 May 2024 16:15:47 +0300")
[-- Attachment #1: Type: text/plain, Size: 951 bytes --]
Dmitry Gutov <dmitry@gutov.dev> 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 917 bytes --]
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)
;; There's no multi-hop.
(or (not (tramp-multi-hop-p v))
(null (cdr (tramp-compute-multi-hops v))))
[-- Attachment #3: Type: text/plain, Size: 24 bytes --]
Best regards, Michael.
next prev parent reply other threads:[~2024-05-18 18:43 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 [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ikzbvu3x.fsf@gmx.de \
--to=bug-gnu-emacs@gnu.org \
--cc=70959@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.