Subject: bug#77425: 31.0.50; Switching to remote project -> no applicable method

From: Visuwesh <[email-masked]>
Date: Thu, 03 Apr 2025 18:47:54 +0530

[வியாழன் ஏப்ரல் 03, 2025] Dmitry Gutov wrote:

> Hi!
>
> On 03/04/2025 13:34, Visuwesh wrote:
>> -  (project-remember-project (project-current nil dir))
>> +  (project-remember-project (project-current t dir))
>
> That looks good.

Thanks, proper patch attached.

>From 6e90a12120a09769454e6a59da8f3fd160285a16 Mon Sep 17 00:00:00 2001
From: Visuwesh <[email-masked]>
Date: Thu, 3 Apr 2025 18:47:36 +0530
Subject: [PATCH] Fix C-x p p for remote directories with no Tramp connection

* lisp/progmodes/project.el (project-switch-project): Allow
Tramp to establish a new connection for remote directories.
(Bug#77425)
---
 lisp/progmodes/project.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 606a25a84c7..caafefef23e 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -2319,7 +2319,7 @@ project-switch-project
 When called in a program, it will use the project corresponding
 to directory DIR."
   (interactive (list (funcall project-prompter)))
-  (project-remember-project (project-current nil dir))
+  (project-remember-project (project-current t dir))
   (let ((command (if (symbolp project-switch-commands)
                      project-switch-commands
                    (project--switch-project-command dir)))
-- 
2.47.2