From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell Date: Fri, 04 Aug 2023 20:05:03 +0530 Message-ID: <877cqa98q0.fsf@gmail.com> References: <877cqcw5m0.fsf@protesilaos.com> <87fs50835j.fsf@gmail.com> <87v8dv2mfu.fsf@protesilaos.com> <87bkfn7yhv.fsf@gmail.com> <87wmyarj3j.fsf@protesilaos.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36003"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65039@debbugs.gnu.org To: Protesilaos Stavrou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 04 16:36:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qRvud-0009B5-LN for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Aug 2023 16:36:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qRvuO-0000uP-Co; Fri, 04 Aug 2023 10:36:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRvuM-0000ty-FA for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 10:36:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qRvuM-0004b8-7I for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 10:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qRvuM-00014e-2z for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 10:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2023 14:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65039 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65039-submit@debbugs.gnu.org id=B65039.16911597324069 (code B ref 65039); Fri, 04 Aug 2023 14:36:02 +0000 Original-Received: (at 65039) by debbugs.gnu.org; 4 Aug 2023 14:35:32 +0000 Original-Received: from localhost ([127.0.0.1]:54494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRvtn-00013S-N1 for submit@debbugs.gnu.org; Fri, 04 Aug 2023 10:35:32 -0400 Original-Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:55723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRvtl-000136-6f for 65039@debbugs.gnu.org; Fri, 04 Aug 2023 10:35:26 -0400 Original-Received: by mail-pl1-x641.google.com with SMTP id d9443c01a7336-1bb119be881so18754135ad.3 for <65039@debbugs.gnu.org>; Fri, 04 Aug 2023 07:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691159719; x=1691764519; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Od6w/G/0Wi3iE2jGc0yn87Y4bdcUiis783WxOqjOB4I=; b=iBR+mYtTOpDL0fN/P24s5f7uxhzKxbgBYYIco0t1gVgkmhuukgjy5P721grjScLjGv 5J1Kmdi0ZmzxUHqIVxE4Fxgn3IPIAAxaoERbA5EOfp5rUBT1lWvtwPXid1QaG70cqgQ6 zteNRUTyiQZl+ZMJclhddi+yKZxI2WOOa+9GvKrU+Wk6a8tmle1Wnq9Px5YeM5XXjqMd 0OmEK1pDcIiUckohxNBRyhUIkdcNoQMkyMbFd7addnrrIKZBGBTMd58veC9GCQtRypVB klXu7t8DUrgEOCzAR3ep3PAgcHq/ug1LwafBliOsA+6y3tVg+QncZlhrF9OdoC4AY1pc 4Q1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691159719; x=1691764519; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Od6w/G/0Wi3iE2jGc0yn87Y4bdcUiis783WxOqjOB4I=; b=YcLqeVvu23As0kBDF8o1qots4aCLFVyK0dHEwOsdc0GGYfURY3IQr3azgjT34/GBqR E6Nouh0Si7Q17MLjfMJcquF5oH47j1YtgLANwJPXfoherMQNabORTuhXQaC5XF+ryHwT +coake2166nc0ZJvsDYIm18citvXv3lRWOfn0KVSwQy++8IuXmFrD9BX85OpStAR8aOg KihlkOd7SsfAjBzNk/u0iB/L5FcBLE8ZpmjMDdkmNT8ID+Nb1A75JDTxUD6OUOqD/S7+ Kn7DLWaOZJitIr76J0RXLwg0oMeCEcWSvGMpGJ+72h/tyA5Dmdq2TPhmulM6Ly7Jt3av vKQw== X-Gm-Message-State: AOJu0Yw5UNem1jSIXJKFILrw3B1DgUnnKyh+xhpYmaYg3G2FrINWKUpx dwIYCI9N4DYmSJgO7JEVENs= X-Google-Smtp-Source: AGHT+IGO5fryQWtcrTjX53RFeEn/D/i9h3pCz8vwWQ+6qduCD7LWbhyUxBlqC5PDic54BKnmQ+6UXQ== X-Received: by 2002:a17:903:2351:b0:1bb:c69b:6f6b with SMTP id c17-20020a170903235100b001bbc69b6f6bmr2589646plh.6.1691159719318; Fri, 04 Aug 2023 07:35:19 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id q9-20020a170902b10900b001bb7b0a0372sm1822708plr.290.2023.08.04.07.35.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 07:35:18 -0700 (PDT) In-Reply-To: <87wmyarj3j.fsf@protesilaos.com> (Protesilaos Stavrou's message of "Fri, 04 Aug 2023 17:13:36 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266681 Archived-At: [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=86=E0=AE=95= =E0=AE=B8=E0=AF=8D=E0=AE=9F=E0=AF=8D 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 shel= l--start-prog) =E2=87=92 (shell-mode "/ssh:REDACTED@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.