Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell

From: Protesilaos Stavrou <[email-masked]>
Date: Fri, 04 Aug 2023 17:13:36 +0300

> From: Visuwesh <[email-masked]>
> Date: Fri,  4 Aug 2023 18:31:16 +0530
>
> [வெள்ளி ஆகஸ்ட் 04, 2023] Protesilaos Stavrou wrote:
>
>> The code is adapted from Eshell, which has the capability you describe.
>> I do not have the means to test an SSH connection.  Though I tried the
>> 'sudo' TRAMP method and the bookmarking correctly logs me in as root
>> when I do 'bookmark-jump'.  This works even if I kill the shell buffer
>> and all TRAMP buffers.
>
> I see that `shell' sets the value of `explicit-shell-file-name' to the
> filename of the remote shell chosen but unfortunately this gets set to
> nil once `make-comint-in-buffer' function is called since `comint-mode'
> kills all local variables.  :-(
>
> I don't know how reliable of a solution
>
>     (executable-find shell--start-prog)
>
> is to get the absolute filename of the shell being used.

Thank you!  This seems reasonable.  Have you checked the variable
'shell-file-name'?

> If that is an acceptable solution, then the following diff works fine
> for both remote and local shells.

> [... 47 lines elided]

As noted before, I cannot test your suggested changes as I have no SSH
connection available.  Hopefully, someone can help try this.

-- 
Protesilaos Stavrou
https://protesilaos.com