GNU bug report logs - #65039
30.0.50; [PATCH] Add bookmark handler for M-x shell

Previous Next

Package: emacs;

Reported by: Protesilaos Stavrou <info <at> protesilaos.com>

Date: Thu, 3 Aug 2023 14:42:01 UTC

Severity: wishlist

Tags: patch

Found in version 30.0.50

Fixed in version 31.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 65039 <at> debbugs.gnu.org (full text, mbox):

From: Visuwesh <visuweshm <at> gmail.com>
To: Protesilaos Stavrou <info <at> protesilaos.com>
Cc: 65039 <at> debbugs.gnu.org
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
Date: Fri, 04 Aug 2023 20:05:03 +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'?

Unfortunately, it is not always reliable.  I use mksh as my (local)
shell but I use bash in the remote system.  In these remote shells, I
don't see the correct value being set:

    (list major-mode (file-remote-p default-directory) shell-file-name shell--start-prog)
        ⇒ (shell-mode "/ssh:REDACTED <at> REDACTED:" "/bin/mksh" "bash")

`shell' also has this comment before the prompt for remote shell
filename:

    ;; On remote hosts, the local `shell-file-name' might be useless.

HTH.




This bug report was last modified 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.