From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.bugs Subject: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell Date: Fri, 04 Aug 2023 17:13:36 +0300 Message-ID: <87wmyarj3j.fsf@protesilaos.com> References: <877cqcw5m0.fsf@protesilaos.com> <87fs50835j.fsf@gmail.com> <87v8dv2mfu.fsf@protesilaos.com> <87bkfn7yhv.fsf@gmail.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="37380"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65039@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 04 16:14:23 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 1qRvZO-0009U6-D3 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Aug 2023 16:14:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qRvZ7-0001Dn-Fz; Fri, 04 Aug 2023 10:14:05 -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 1qRvZ4-0001DQ-Uv for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 10:14:03 -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 1qRvZ4-0005RY-Mx for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 10:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qRvZ4-0000OC-7t for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 10:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2023 14:14: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.16911584271461 (code B ref 65039); Fri, 04 Aug 2023 14:14:02 +0000 Original-Received: (at 65039) by debbugs.gnu.org; 4 Aug 2023 14:13:47 +0000 Original-Received: from localhost ([127.0.0.1]:54480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRvYo-0000NV-Qu for submit@debbugs.gnu.org; Fri, 04 Aug 2023 10:13:47 -0400 Original-Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:59433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRvYm-0000NE-Mh for 65039@debbugs.gnu.org; Fri, 04 Aug 2023 10:13:45 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 7015F240010; Fri, 4 Aug 2023 14:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1691158417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MPWVOYGc0qJRFIMQgW6jlKYoxM/PLIYIA/qEW5qE2dE=; b=j2af6nxoN9pSK+M/PaITFHaq4HSBTiHd0oE0JEs7nWma7wdPKJeT/SJF5/xvPaHi1lv/1o a6+xpm+ry6lckoVPVGsMVbtzViAwXJPZzSN+K35o2JHYI+8qywLkaVdxwqF+4QMVz04jaJ kYz3T8loyvcRzUF/1k84uexRrGi0dFGZzA+cIGgXaWAbL87ROXKPxCczWJJBBsRgymIQbO ISjPOqSpXFDyiR2f5SXo12SZlSyR5K6Wetfa3E+H+uD5YQJYKEM/aJig9amIDkE93uxso4 V5FGf3mdHuEgZ5MwV1itr0yFsqpVadHoYPuhkpfx8AfBJnILW7LKqloMwjfGvg== In-Reply-To: <87bkfn7yhv.fsf@gmail.com> X-GND-Sasl: public@protesilaos.com 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:266678 Archived-At: > From: Visuwesh > Date: Fri, 4 Aug 2023 18:31:16 +0530 > > [=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'? > 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. --=20 Protesilaos Stavrou https://protesilaos.com