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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Protesilaos Stavrou <info@HIDDEN>; Keywords: patch; dated Thu, 3 Aug 2023 14:42:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 3 Sep 2023 11:16:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 03 07:16:20 2023
Received: from localhost ([127.0.0.1]:39806 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qcl5X-00019r-Tq
	for submit <at> debbugs.gnu.org; Sun, 03 Sep 2023 07:16:20 -0400
Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:49369)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1qcl5S-00019F-ON
 for 65039 <at> debbugs.gnu.org; Sun, 03 Sep 2023 07:16:18 -0400
Received: by mail-lf1-x12d.google.com with SMTP id
 2adb3069b0e04-500b6456c7eso1014979e87.2
 for <65039 <at> debbugs.gnu.org>; Sun, 03 Sep 2023 04:16:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1693739758; x=1694344558; darn=debbugs.gnu.org;
 h=content-transfer-encoding:cc:to:subject:message-id:date
 :mime-version:references:in-reply-to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=1+TDyWq6kgWxWtKoDSWSqhFh/KFkREDHZVW+x8kI/GM=;
 b=PesRvyb5aU2TRaj8rxnYKTtll8h6PT3sLJQsDJpWDAcXUgY2ssLrDaUo7nhA6n3khj
 znoOtKJLWY34kUYjPol7kesogOaO94FFHev4/0nolSXva1ZMli3LsR1KmqNFBPbEyYIe
 iZS9bIfIhw1UZJTIBq6YWE7kwE7xvubEBHg24H+p9i+sbDhmhrTHWHxJji2nAmDFpLNP
 4zXHpLqr1wJsyJ6AQ65lj0Yrx3HB9LqcG169DNCwnOzj+AHGkS0OfbD7kVl3zQAh6Ja8
 JPtXKUWuQ2whwadzPGZ7w6D4jXlohJLJJUQ6XYPY5B3pO9zVKOs+uz/o1pyWEXebzAsD
 KDyA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1693739758; x=1694344558;
 h=content-transfer-encoding:cc:to:subject:message-id:date
 :mime-version:references:in-reply-to:from:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=1+TDyWq6kgWxWtKoDSWSqhFh/KFkREDHZVW+x8kI/GM=;
 b=QSM9KJ/xVrPUFCCOlk21U5nslh4igfgbn8InZPh0GNY3cEsNqIuu3e9yPve0KRbwNb
 vUllufGvaClAN1x0QUZFl26d8dLqWGZbBZ/3g9b0oi4t3Ck9fU4no0w36Y7QKoAjMSN5
 350ohQJ4EUhYdFyr6L8pJKrN+Dh6xbb1AiMdqJcsDNIvnm5W1zYCDA29OvNRVBxc5bdX
 U1Lzpy8pOWNwK4hftcLBN30C5/CUV43zNTMpr15yOEgE1Wnxr55UWBEM7o84XNevhZZd
 OHNUcLQlo2NSSJbScDCp4H91imy/2OaUF+NgfZQspfD4JQ1OYZWZnx9HWskrZ4pzCbDu
 8r1w==
X-Gm-Message-State: AOJu0YzBLQqWOGwFNA9kD2mXvCSdZ4t3q6/9nnTREGBk0q1wS7uWgkr8
 SguplUjzoDys4Lw3hTUSLSwP33DCtz6XGfPlj6cG6//eZp0=
X-Google-Smtp-Source: AGHT+IHSFhlA5DNrzkyBYzvMHDoPuhS1vP1SDNFcVlix46cqULQLVAQilDkcgFVCnizzww1em8dSQGH/hU/OZgOB4zw=
X-Received: by 2002:a05:6512:39d3:b0:4fb:893e:8ffc with SMTP id
 k19-20020a05651239d300b004fb893e8ffcmr5577385lfu.17.1693739758293; Sun, 03
 Sep 2023 04:15:58 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sun, 3 Sep 2023 04:15:57 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <83bkflu9ti.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 05 Aug
 2023 12:18:01 +0300")
References: <877cqcw5m0.fsf@HIDDEN> <83zg38w25c.fsf@HIDDEN>
 <87y1ir2mko.fsf@HIDDEN> <834jlfw116.fsf@HIDDEN>
 <871qgisxz0.fsf@HIDDEN> <83bkflu9ti.fsf@HIDDEN>
MIME-Version: 1.0
Date: Sun, 3 Sep 2023 04:15:57 -0700
Message-ID: <CADwFkmmnpedGpgkFY3XeDUkindUS9D9vBzTMaZYypyf6UCQ1hg@HIDDEN>
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65039
Cc: Protesilaos Stavrou <info@HIDDEN>, 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Protesilaos Stavrou <info@HIDDEN>
>> Cc: 65039 <at> debbugs.gnu.org
>> Date: Fri, 04 Aug 2023 17:06:59 +0300
>>
>> > From: Eli Zaretskii <eliz@HIDDEN>
>> > Date: Fri,  4 Aug 2023 13:32:37 +0300
>> >
>> >> From: Protesilaos Stavrou <info@HIDDEN>
>> >> Cc: 65039 <at> debbugs.gnu.org
>> >> Date: Fri, 04 Aug 2023 12:17:43 +0300
>> >>
>> >> > I'll let users of bookmarks comment, but in any case, please also
>> >> > check that the section "Bookmarks" in the Emacs user manual doesn't
>> >> > need some update due to this feature.  (You marked the NEWS entry w=
ith
>> >> > "---", which might mean you already checked that, but I'm not sure.=
)
>> >>
>> >> I thought a change was not necessary.  Though I am happy to do it, if
>> >> needed.
>> >
>> > It sounds like the notion of "jumping" to a bookmark has evolved, and
>> > nowadays jumping to a bookmark might do much more than just jump to a
>> > buffer position.  Perhaps that node in the manual should say something
>> > about that, and show a couple of examples?
>>
>> The revised patch includes a possible update to the manual.  Are those
>> examples sufficient?
>
> I guess so, thanks.

Just to let you know, I had an issue with applying the patch, and had to
manually edit it:

  1 git =E2=80=A6 am --3way -- ~/wip/emacs/0001-Add-bookmark-handler-for-M-=
x-shell.patch
Line longer than 78 characters in commit message
Commit aborted; please see the file CONTRIBUTE

Also, when the bug number is known, it is good if you can include it
somewhere in the commit message.

I was going to review and install this patch, but I noticed that there
was some further discussion in a subthread regarding some Tramp stuff?
Should that be resolved first, or is this ready as-is?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 11 Aug 2023 04:55:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 11 00:55:17 2023
Received: from localhost ([127.0.0.1]:44647 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qUKBB-0005Df-LL
	for submit <at> debbugs.gnu.org; Fri, 11 Aug 2023 00:55:17 -0400
Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]:49117)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <info@HIDDEN>) id 1qUKB9-0005DP-Dw
 for 65039 <at> debbugs.gnu.org; Fri, 11 Aug 2023 00:55:16 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id B777F60003;
 Fri, 11 Aug 2023 04:55:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com;
 s=gm1; t=1691729708;
 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=slDSOaY0+Dz3342nMiO7h1eyQXPuD76VXsz6o3U/FEE=;
 b=Uh2LS4TEtGuQE3I6g7tmEwMNGnAbKAa5kAgcrEXNxuyOAZ/ZyDzVEGWoUWw2rsaWRqHBGp
 g6SK6YVPhklG+810HVXrHT+FqNyTGv7ykN8ixp0u2hR72owDUzSaptBAWZcg1IaWG6RiWl
 /AUX7Cyl6hzYh4F4rWB9EFTMWCrD2TJqH1rOHF5SOf0m1h7tU81PAndh1Z2GZ7gdHqEsZ+
 AhpV+GH/LnFjNE3gdB5g/sj3cxVKsOYqEV2UtFv7BUx/eOIe3Q8vlSAlulAORmQTDImhtm
 Ap1CFtmgcUeW7CVSYFr+Mtr4DKrYhFPusUA88CyOGzlIpi1hd+vBwFS7GzzcWw==
From: Protesilaos Stavrou <info@HIDDEN>
To: Visuwesh <visuweshm@HIDDEN>
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
In-Reply-To: <877cqa98q0.fsf@HIDDEN>
References: <877cqcw5m0.fsf@HIDDEN> <87fs50835j.fsf@HIDDEN>
 <87v8dv2mfu.fsf@HIDDEN> <87bkfn7yhv.fsf@HIDDEN>
 <87wmyarj3j.fsf@HIDDEN> <877cqa98q0.fsf@HIDDEN>
Date: Fri, 11 Aug 2023 07:55:06 +0300
Message-ID: <87il9m2n6d.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-GND-Sasl: info@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Visuwesh <visuweshm@HIDDEN>
> Date: Fri,  4 Aug 2023 20:05:03 +0530

> [... 20 lines elided]

>> 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 sh=
ell--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.

I see.  Thanks for the explanation!  I shall revisit this patch as soon
as I have a way to test ssh myself.  Not sure when...

--=20
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 6 Aug 2023 04:43:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 06 00:43:34 2023
Received: from localhost ([127.0.0.1]:58487 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qSVc5-0001z3-VC
	for submit <at> debbugs.gnu.org; Sun, 06 Aug 2023 00:43:34 -0400
Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:38445)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <info@HIDDEN>) id 1qSVc2-0001ym-9d
 for 65039 <at> debbugs.gnu.org; Sun, 06 Aug 2023 00:43:32 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 836CC1BF204;
 Sun,  6 Aug 2023 04:43:21 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com;
 s=gm1; t=1691297002;
 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:
 in-reply-to:in-reply-to:references:references;
 bh=H9z42z/8bjq8rbDUZA9KLKOVzdYEfuTCCrLeGhjChH4=;
 b=TiGxXbR/8VfKW28t5nir9dRW589pmnEpKEGQfq2tkLeU4AGQPn3guuaiB2e4gqHFO745gq
 3kTsQh2GysQQtvbCiGinrSV+jfidLiCBB5uYvbc/rJDBJJxq38FmvtP63N4dvcoB3HrEnN
 X4/Aprfpofav5ElzL/gLJo4H91dg5t90nbFHX92TqT77WUi09qaxpQCS1JWzra4J+3gyE5
 XjX/xjJU+t9YBAG6YWnHaEpfB9g2Zj2BQUqd/ATtnurx7VBOIuoE/oIzeA/F33CrXbCbYe
 /Gg2v2cvxLYCzRnYXkhobempwnZa4luE5ZfPXLsD51kh0HddUZVtnRuI2UqABA==
From: Protesilaos Stavrou <info@HIDDEN>
To: Jim Porter <jporterbugs@HIDDEN>, Visuwesh <visuweshm@HIDDEN>
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
In-Reply-To: <5353458a-9694-9de2-ea45-81dbb76216f7@HIDDEN>
References: <877cqcw5m0.fsf@HIDDEN> <87fs50835j.fsf@HIDDEN>
 <87v8dv2mfu.fsf@HIDDEN>
 <5353458a-9694-9de2-ea45-81dbb76216f7@HIDDEN>
Date: Sun, 06 Aug 2023 07:43:20 +0300
Message-ID: <87a5v4g4rb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: public@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Jim Porter <jporterbugs@HIDDEN>
> Date: Fri,  4 Aug 2023 10:01:12 -0700
>
> On 8/4/2023 2:20 AM, 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.
>
> For what it's worth, when I want to test Tramp support (especially in 
> something like Eshell or Shell), I just connect to localhost via 
> "/ssh:localhost:~" or similar. So long as your system is running sshd, 
> that should work fine.

Thank you!  This looks promising.  I am trying to make it work, but it
denies the connection.  Maybe you can share with me off-list the
relevant sshd settings?  I tried to disable public key checking and
enable passwords.  To no avail.

-- 
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 5 Aug 2023 09:17:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 05 05:17:54 2023
Received: from localhost ([127.0.0.1]:55573 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qSDQ2-0008Bw-5u
	for submit <at> debbugs.gnu.org; Sat, 05 Aug 2023 05:17:54 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51944)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qSDQ0-0008Bi-6J
 for 65039 <at> debbugs.gnu.org; Sat, 05 Aug 2023 05:17:52 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qSDPu-0003al-Vx; Sat, 05 Aug 2023 05:17:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=s47C7+d/wISpzT8iT8MV69e6SIILm6zW1ReZx2Lq7ZM=; b=iCVmTC94oS3X
 qaXpf/rkrlourvjfBNCE5FnGzZOYJ4xC3P+c7iKsc5/RmMrDoHlEZJDmsucM9wydudDIgGeicWafH
 RNEIMmNuGtgEXAB6L67fLOk5MO213ZlAvNS9PL5dYx16ZMb6BLLD2Pzwz9CINa+23ULaelL30y7ud
 terqm0GLsS3t/BXm2kuZOqdFssopAW0loiRTmv59apx6U2gcvcLkKiAH5PydDgcoT6xDpQ2AFK/Kg
 MY9evPxz5FojwTDtu29oMCx8HhwXyW1FNt6R/BeSqkd+aMSaQmsz6OZABjr2SyDnPx7HHNRqXPBqR
 g09cEYL6dtIE3l9Axzw9RQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qSDPu-0006Jn-FY; Sat, 05 Aug 2023 05:17:46 -0400
Date: Sat, 05 Aug 2023 12:18:01 +0300
Message-Id: <83bkflu9ti.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>
In-Reply-To: <871qgisxz0.fsf@HIDDEN> (message from Protesilaos
 Stavrou on Fri, 04 Aug 2023 17:06:59 +0300)
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
References: <877cqcw5m0.fsf@HIDDEN> <83zg38w25c.fsf@HIDDEN>
 <87y1ir2mko.fsf@HIDDEN> <834jlfw116.fsf@HIDDEN>
 <871qgisxz0.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Protesilaos Stavrou <info@HIDDEN>
> Cc: 65039 <at> debbugs.gnu.org
> Date: Fri, 04 Aug 2023 17:06:59 +0300
> 
> > From: Eli Zaretskii <eliz@HIDDEN>
> > Date: Fri,  4 Aug 2023 13:32:37 +0300
> >
> >> From: Protesilaos Stavrou <info@HIDDEN>
> >> Cc: 65039 <at> debbugs.gnu.org
> >> Date: Fri, 04 Aug 2023 12:17:43 +0300
> >> 
> >> > I'll let users of bookmarks comment, but in any case, please also
> >> > check that the section "Bookmarks" in the Emacs user manual doesn't
> >> > need some update due to this feature.  (You marked the NEWS entry with
> >> > "---", which might mean you already checked that, but I'm not sure.)
> >> 
> >> I thought a change was not necessary.  Though I am happy to do it, if
> >> needed.
> >
> > It sounds like the notion of "jumping" to a bookmark has evolved, and
> > nowadays jumping to a bookmark might do much more than just jump to a
> > buffer position.  Perhaps that node in the manual should say something
> > about that, and show a couple of examples?
> 
> The revised patch includes a possible update to the manual.  Are those
> examples sufficient?

I guess so, thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 4 Aug 2023 17:01:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 04 13:01:19 2023
Received: from localhost ([127.0.0.1]:54667 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRyAx-00088A-GE
	for submit <at> debbugs.gnu.org; Fri, 04 Aug 2023 13:01:19 -0400
Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:51353)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jporterbugs@HIDDEN>) id 1qRyAv-00087v-Ge
 for 65039 <at> debbugs.gnu.org; Fri, 04 Aug 2023 13:01:17 -0400
Received: by mail-pf1-x433.google.com with SMTP id
 d2e1a72fcca58-686c06b806cso1700219b3a.2
 for <65039 <at> debbugs.gnu.org>; Fri, 04 Aug 2023 10:01:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1691168471; x=1691773271;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:mime-version:date:message-id:from:to:cc
 :subject:date:message-id:reply-to;
 bh=bQXgFoL+kmDigZCmC9GQVv9HUhmKTnaoNcohBpVvG8g=;
 b=Rafa8iUF5an1qtZHCW/JmBURjJQJYeglcgJzrL+9UJGkDyqTcdiSJzgkSH5GQcd3Sq
 Z/gGNLXpzi9UDWg5yBQAoeNSYg70ZdqvZu+vmtwsY+9Oue550Ots6aN3URY1DHecTF2H
 K5tG0hvMPnp8v01sKR9BCNhTSNa6CYiA/gWp0UGXFLoKtx7kKCyMRUThrjdHFc1vXnbx
 2+DHikkgykwztMn+UkdK73GqaCrgPGi8rsQDPriyYGyciBI6QxHCw1HSfaKoWX+ozcCS
 863aVZfSTk2sAYs7HUi+zeHgsLFXIGrOv0ezJOIiBC1yKtXWHou6niWx8qhQ84L/L14q
 NhQg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1691168471; x=1691773271;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:mime-version:date:message-id
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=bQXgFoL+kmDigZCmC9GQVv9HUhmKTnaoNcohBpVvG8g=;
 b=hrO2cKGH847XjsIR+YJt/enoopB68zx+C82irYi7WszLTqNM5B2uR22xm70BsWVc+o
 P3OBCPIgOJJUDlZtQpk7OqSfahDy0yquCVAzi5weRis87fO7thdLGSOtwrUuHcqEE2c1
 9a1JIXG8a6KogEDjmjkwMzCQgSzDJJQi2Yauv0Xc31ipz3W2gkjFAwpSDCACkWrH2pWo
 7ji9ce7xa6LAVFG8RlfbMnRvpFS0DqYMSfJjvJEtmOgky44RSxQ6kXYi5l2KILy5EGmc
 PgMmt0sflQovW/YzQlkrsbj7SXvnGMAthCIyfFXUc6GyFNuR9fuZMEa2abxnSs2oievQ
 Qeww==
X-Gm-Message-State: AOJu0YxXKvB9rgyqNeXdM2nGg+r21GTYwkp6POhsWBWgQ3O4QGvprPjM
 Agrg18rHhSz8MAlU50VBB0U=
X-Google-Smtp-Source: AGHT+IHOHCk9WgoO/6u3tg3c+Mct9c4pgbySV4zWk801uAqXqJ/1XIA5bZywZAnpIS3ZJS/2KSyYHw==
X-Received: by 2002:a05:6a00:114d:b0:687:472f:514a with SMTP id
 b13-20020a056a00114d00b00687472f514amr2424977pfm.2.1691168471296; 
 Fri, 04 Aug 2023 10:01:11 -0700 (PDT)
Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com.
 [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id
 e22-20020a63db16000000b005642a68a508sm1369519pgg.35.2023.08.04.10.01.10
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 04 Aug 2023 10:01:10 -0700 (PDT)
Message-ID: <5353458a-9694-9de2-ea45-81dbb76216f7@HIDDEN>
Date: Fri, 4 Aug 2023 10:01:12 -0700
MIME-Version: 1.0
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
Content-Language: en-US
To: Protesilaos Stavrou <info@HIDDEN>, Visuwesh <visuweshm@HIDDEN>
References: <877cqcw5m0.fsf@HIDDEN> <87fs50835j.fsf@HIDDEN>
 <87v8dv2mfu.fsf@HIDDEN>
From: Jim Porter <jporterbugs@HIDDEN>
In-Reply-To: <87v8dv2mfu.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 8/4/2023 2:20 AM, 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.

For what it's worth, when I want to test Tramp support (especially in 
something like Eshell or Shell), I just connect to localhost via 
"/ssh:localhost:~" or similar. So long as your system is running sshd, 
that should work fine.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 4 Aug 2023 14:35:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 04 10:35:48 2023
Received: from localhost ([127.0.0.1]:54497 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRvu8-000147-5F
	for submit <at> debbugs.gnu.org; Fri, 04 Aug 2023 10:35:48 -0400
Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:39234)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1qRvu5-00013z-Lm
 for 65039 <at> debbugs.gnu.org; Fri, 04 Aug 2023 10:35:46 -0400
Received: from pps.filterd (m0246631.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id
 374CM1gY022717; Fri, 4 Aug 2023 14:35:45 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2023-03-30;
 bh=BqPlNbQsFat+aNpV8gRx1UXWcCuF+S8ftOdJy7e9Af8=;
 b=zv+n8HK37sZzPc6R/hO46nf1St8N7IOA29Mgou+mTFc8dBCkJ51vjnXk26ObjUoScN0n
 3V+JDbCYCWWRaTfo5IPF2gvxpoCYF7ZwrJf1MAsNFIPPtOJ9U/N8/wlP9a7XiVNKt/EL
 RUTnvBv4zid2exkYlW9Xm0R3r6XU3xz4Oj4C4NeciN/a23wPotqEwIC/85VTEmUvr6il
 dr/84qDcBwEJoVwkrWD2NEFJi2U4uFdCfPT6VPtHpH55TuYSOk1uGt9YuXiO02Aob0Ya
 wFX1fUx9gImZe7FX3LgI3J5MRnEcbqaSLvSPuQuGTtBUodiKz0rtopM7C1kxdXwL8ikT kA== 
Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com
 (phxpaimrmta02.appoci.oracle.com [147.154.114.232])
 by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3s79vbwyn9-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 04 Aug 2023 14:35:44 +0000
Received: from pps.filterd
 (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1])
 by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19)
 with ESMTP id 374CkA7U006774; Fri, 4 Aug 2023 14:35:43 GMT
Received: from nam10-dm6-obe.outbound.protection.outlook.com
 (mail-dm6nam10lp2102.outbound.protection.outlook.com [104.47.58.102])
 by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id
 3s8kfhecgu-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 04 Aug 2023 14:35:43 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=Ct08rE2KS0wblMvLvXfixWCuMM+iPEdlZ294s+repUYwaD74G7SiPhiavivUy+Vr3zcoHrGew+ai4oa0mFzxOI+QlXtlNuYyP8AhxR1STO3kjqtMEvcmxQJFDiI9c+SXmAsYfedFTqom6PyNb6kWrjdhqfBhqcUw8ROqZLgIk3UtSvnciF4AMFUlxLYFiCW8LU/J8g+BtbIscgN1WmdBijIcD6eB+bNWmI5FeSTo1Ga6/n6M3tfwyXvrRQ6G6NcjpdWZOutQZ41DgjubOTv2IHNb16avFbWZ72rAlUk2VQ5FNW2JNy+HaXJYVlD9q99edzyryaewK0GDLabXvGMsPQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=BqPlNbQsFat+aNpV8gRx1UXWcCuF+S8ftOdJy7e9Af8=;
 b=KnkXQP4EcaLeLo16LnudtNLAX57/QeaKN2c1Dsp7TBmsayzNVGACV7/Rh6F9sJu9EtdtoVg/A6MlT4N1RXI8oXHF+5oe+WisGh3LHOGqilnNHgCYc8z5HvoGQbhTjUngzOpNTssXLYmZdWk76pKx8d09Ib2linffV2jDrYxbFBdJ6tErEyK1YbYy+nOWbyoIuJFmjDaL1lf0vs5ks9EPlkHhlsgKeGyzag8X3KpdQk1Q9pXmKdCKzxnnhKk/r3rzFUBjSyPHw/ifIHJGmXYXLU8LHFpforwTGvDtSJL6pqrRHL2UDYnhGZFDGj5qf28qZBxYOEo+BmCwAPzaaJyOAg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=BqPlNbQsFat+aNpV8gRx1UXWcCuF+S8ftOdJy7e9Af8=;
 b=naGtxxaYnthTiwi0NBPuv5g6zkILrKIX4ztH3U/WDDjlwWHZu+GakgBZm2l4X51aOKWhEcJcAav2cbLP0ZmBiVG9GW6slG2Y/RuosPJaHWKycg0xVr24tPsCyRFKjlLygV6fGkJzdB2nXGHovl81by9689DhO5KhL4rsZ4molmE=
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19)
 by SA1PR10MB6518.namprd10.prod.outlook.com (2603:10b6:806:2b4::14)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.47; Fri, 4 Aug
 2023 14:35:41 +0000
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::a0a9:4cbe:dd80:de41]) by SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::a0a9:4cbe:dd80:de41%3]) with mapi id 15.20.6652.020; Fri, 4 Aug 2023
 14:35:41 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Protesilaos Stavrou <info@HIDDEN>
Subject: RE: [External] : bug#65039: 30.0.50; [PATCH] Add bookmark handler for
 M-x shell
Thread-Topic: [External] : bug#65039: 30.0.50; [PATCH] Add bookmark handler
 for M-x shell
Thread-Index: AQHZxr8imPeuZeFxrEav4WYL9I5RO6/aMkYg
Date: Fri, 4 Aug 2023 14:35:41 +0000
Message-ID: <SJ0PR10MB548801D4322841C86FF97B57F309A@HIDDEN>
References: <877cqcw5m0.fsf@HIDDEN> <83zg38w25c.fsf@HIDDEN>
 <87y1ir2mko.fsf@HIDDEN> <834jlfw116.fsf@HIDDEN>
In-Reply-To: <834jlfw116.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|SA1PR10MB6518:EE_
x-ms-office365-filtering-correlation-id: 4d274164-de3a-4b00-e2c6-08db94f81408
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 4Axum8B5fWPROTeARTZLsPTcXe8n7S5cECNIiOXPSKzd13oUCp6rAOOlJVckghUC7a0pAdGZ7M7GIn49gK8zH96bbR5C1Us/ie205iyA63tVAzmYgSTT1bL0HOMLZJv/Uu6oFNsAEAmdZmMAMFTj4Tci1tP0R01OdTSG2Mg7FGITscCpoNY4V5r9PuPKA8t1re5sVsKDjqfonOn5c76oKPBapl9Hb1AUZkqrK1vYijP9Tdb/KSNIV3nxxehy+2F2eh6oKRdCE23B+jGYoGtY2YpWUvb7VvGy/l55RlOlZZMmJDxj9iH4c+dljg9I5udcQ3Oo4eYUYsvjDrQWi21700HUfHvvmO6atZXU9FsKrqutIy5qEfwpU2DdM3mSEz+KTqvPY7o+QP5ffRumGuGq2WZ/pmEreTdTEGDgw54iI04KYBmy+L4hVHf4pDoopOzdDhFeMz9LsIUtNj6b2EkoNfU7uhW3T2S4bRBUaWBNnHqStlsD5fzS/wrkm3p4dsiw16qZi+zviu8O0LcRhDsqCOsGUv3L82NUp8s6g3QTwi0SQV1lwIXNSafeZYVqZM0QsVeV08n3kNsrRXGxa2DzqzIwxU1wyQ9grQ87kV8gwEs4SZGLQ6+v034jy28XQvnX
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(13230028)(39860400002)(346002)(366004)(396003)(136003)(376002)(451199021)(1800799003)(186006)(41300700001)(8936002)(8676002)(83380400001)(6506007)(86362001)(26005)(38100700002)(122000001)(38070700005)(316002)(110136005)(478600001)(66446008)(7696005)(9686003)(71200400001)(33656002)(4326008)(64756008)(55016003)(76116006)(4744005)(2906002)(66476007)(5660300002)(66946007)(66556008)(44832011)(52536014);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ySkUM7VVIHu67nvAoauv7hDe3asXzWMjsYH2E0SpQ8pH+cKulGi4u5AmTTOM?=
 =?us-ascii?Q?Yyw993ynY2BYC9MqSWoTXMSbmrQ1NjQOHDmS6Eo8T2GW5eNGaF5Az23qO9db?=
 =?us-ascii?Q?Ok4PaPwdLieUdvp+loMscVA9wk6ZSK3aDe3rfjRytngIFMn+UdzBBLIbBkDX?=
 =?us-ascii?Q?GtpFrej+IBocjl9lD4lzXaDCOnsXwFxJr76gAfgfQj525UKfafRhD6wg+khL?=
 =?us-ascii?Q?hCWhZaAkRdzAkr8DdhgfTFgmcI/Ylu8eF5vMRNpm11vZesuhLOPHyYAIcXui?=
 =?us-ascii?Q?EXxDqjV13LsEKHhvjKlSgMHmsaDLHskLHSDmRnW6d03xxEuB5Cpn3TkG73IZ?=
 =?us-ascii?Q?3sDRIZmC9AlOjjEfEnfzZtoDeDfFwsL88OC16XUFYk0SQ50CzE0KRlwILlTK?=
 =?us-ascii?Q?uDMV5Oo//UvbwbLFkS+IUptK65at2peU0QxKNuKMsBYs/WtJXkA/jVvrLYKW?=
 =?us-ascii?Q?iBMKgjGpm/n1XfQVkyouSZzkS3okeVWMl6zRIn62uMT/Yftmnd5CcEnIJfzh?=
 =?us-ascii?Q?VoEcbxGDohKGVFkmsAIOcfDUVHBmENJEC9U86YCfnZaZvVu/cqyrC5R4m92v?=
 =?us-ascii?Q?JgLg/ZSJiEYhZLktZISTV3smjS9H40A+vg+08kRZwpLCiQODX0Zvx/og3qzk?=
 =?us-ascii?Q?3RQGmeeaPrM3rlfVQowVHnIPslUEWRLIrO/K9Jjf63eOpfSB05vQD8U9ziCW?=
 =?us-ascii?Q?IowjXGzGUZtQETzsCXwN/ZHkhAXo08FECg0ZRdeOOoNIovGYkqKjN7rH1owI?=
 =?us-ascii?Q?qXRqjMbkNS66p0S476ZqyLSLjD0jZvvVgvJRlexRIZVo4EW8NrENZWnzc7sQ?=
 =?us-ascii?Q?VytXlyzjo3aMx4VsLCNipi8wYKfrtAv+onHaxRKGvjdH4R/GZ2ql6qkUT5l0?=
 =?us-ascii?Q?93pnt65kUT9vGTQYeL3IZuK11IfgAZdC+I2Cxm3pfl7siv4siX50gci81r+z?=
 =?us-ascii?Q?VF2TA8XV7Ssd7n7OL+i8OMwowUc5zLYx77cBMnOBUUkoNACgz/U6zYJnX2LO?=
 =?us-ascii?Q?xDQelXVXs5PhONWohsQSHKzxnqm/m4AJUDLltMBV78I/uL6PxMGwLSnoiU86?=
 =?us-ascii?Q?sd54llqEon4o8bHdm64P4wz4xt2nKMxX0Xr7ClJ4b2LUteQ95NpWWBI3ZsTX?=
 =?us-ascii?Q?YmIml9pHljzY1JmGVy/8s5U3BvAYmPVC+pyFO7vnQtA/IeRpC/vrbdH0gL/f?=
 =?us-ascii?Q?C8L4b7hLydCOJeJxmO0vj0RKbE5ewOApW00+O5TN/u1vU7xa2vX9Xk7g+aj8?=
 =?us-ascii?Q?WsIoJCnF8au0mLpRUotB7d//x8Dvbn/YtcKQ0qUOE234T0GgJkSfW8ds5BBL?=
 =?us-ascii?Q?3hdfcAkqBGui5LzjWkM1j82oCNZg9lPg9wAkHGsG2hmT6e3XVKuRCsrlR/pZ?=
 =?us-ascii?Q?CGvya9LJumlAuGeSsqIVJwk8ya8CkGG+hLFDi6O/M97uY44bmgrCdAN83H9d?=
 =?us-ascii?Q?o4kkP2nRCwSNdVOhh9P7wxgdOimxh4Cmacqnx0iLhcgnTaSUn9ydAsW0lLtG?=
 =?us-ascii?Q?JyOiCSDlu7lIPCdpFj/FTVNSpxfF5QefzgFtT/IwitoNXXPhPDkKCEooMhDT?=
 =?us-ascii?Q?G4F9oHrYH5zxpaj+svIrt6XKE7mcT9bS6dn+qZzn?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: fhItwzSUITPWNdkur33K2pGHcCAGxup+cqdPojU7sI8nGaTqG8jNsFrtmsZUv4JflDpEeL1st8yBxVvgQ0nilIUWcjl8IM5m+a8ww0a2EFH66cmi1O9Y8xpXeM5QC5bzXf9luSEeabGZ+ESmoWjZ8HIZpYOTUKfcJzDGLAlV27dtTea5K5Gtb2xhYj9bvpgBal/2MlfMHulXpY+HC1/Sv7/ksQBCGaau/yf39cvgQtk9hqxVGhi6/hHv9dP2s5G5Z6r6BhjqS5vQgI7b07/PU/vK3FNAWCZLuQ1ZO5lpwpmQgQNXSqduK5BagfJveOeqPX1skuow2Xy9+idnMj9WKd4GRpKo32CDGrqe41mMcjYVHKYQ+QV8gg8Hchs5egp+13xYesF56vmj1adsQV62y3dtWqLQZLqlMA0zzSuGxd627lfWbzacSDH5tJ2WWa4OLuDAUCjTPfLxIEFt2mPzpBCYQBtjIliYGvX8jin9UyqtoYXTcg8VUkvAJNY3XL820Ur9zpuglV4d5+GADfLmbMcEH5FqvQEcxZdENn7x0q79U0omj/SY5oyOVTni1xMP3SuevI3CNVUeErhJJaEmkg0//6Hfcjkd8p05e8Mc1nkDwGF1j3ZAJt+0Ya0H8aj3436DzFjiO6kCqdBcw22QpcAMP6o+uM/BkhY/nUZBeJMh3oMCELz/78tbG6qselxsFbOpOgbw3OQ/oZzmlesjLameVsbSmFux/jg2Qq19HKJQc9lhuKufPuy0ZTWmgMtOvyDrp4uw9vz9IHML+18XRC3R4+tpfwGfcgEhvLIPPXiKquK8tO451eU9aJ6jtMjy
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 4d274164-de3a-4b00-e2c6-08db94f81408
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2023 14:35:41.1470 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: PEEKnBXXnRY9kY+JlbIuurntASDd1rGsm2ZJqsc6BLbc8oaHD9khjSk/Z/BI4Lc5BcOuxhJ3zULFdLHZdR/RSw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB6518
X-Proofpoint-Virus-Version: vendor=baseguard
 engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26
 definitions=2023-08-04_14,2023-08-03_01,2023-05-22_02
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 mlxlogscore=653
 phishscore=0 mlxscore=0 malwarescore=0 spamscore=0 adultscore=0
 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2306200000 definitions=main-2308040130
X-Proofpoint-GUID: UrU1R-GwjDYMSsBJBdx3BX421aG2foYi
X-Proofpoint-ORIG-GUID: UrU1R-GwjDYMSsBJBdx3BX421aG2foYi
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: 65039
Cc: "65039 <at> debbugs.gnu.org" <65039 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.7 (--)

> It sounds like the notion of "jumping" to a bookmark has evolved, and
> nowadays jumping to a bookmark might do much more than just jump to a
> buffer position.  Perhaps that node in the manual should say something
> about that, and show a couple of examples?

Not weighing in on whether the manual
should be changed.  Just thought I'd
mention that the notion of "jumping"
to a bookmark has always included the
possibility of doing "much more" - as
well as much _less_.

It's _always_ been the case that
"jumping" to a bookmark can do anything
at all.  A bookmark can record nearly
any data, and a bookmark handler is
just a function - it can do anything
a function can do.

(But yes, it might help for the manual
to say this explicitly.  "Jumping" to
a bookmark is both evocative, for many
or most bookmarks, and misleading, for
some bookmarks.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 4 Aug 2023 14:35:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 04 10:35:32 2023
Received: from localhost ([127.0.0.1]:54494 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRvtn-00013S-N1
	for submit <at> debbugs.gnu.org; Fri, 04 Aug 2023 10:35:32 -0400
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 <visuweshm@HIDDEN>) id 1qRvtl-000136-6f
 for 65039 <at> debbugs.gnu.org; Fri, 04 Aug 2023 10:35:26 -0400
Received: by mail-pl1-x641.google.com with SMTP id
 d9443c01a7336-1bb119be881so18754135ad.3
 for <65039 <at> 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)
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)
From: Visuwesh <visuweshm@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
In-Reply-To: <87wmyarj3j.fsf@HIDDEN> (Protesilaos Stavrou's message
 of "Fri, 04 Aug 2023 17:13:36 +0300")
References: <877cqcw5m0.fsf@HIDDEN> <87fs50835j.fsf@HIDDEN>
 <87v8dv2mfu.fsf@HIDDEN> <87bkfn7yhv.fsf@HIDDEN>
 <87wmyarj3j.fsf@HIDDEN>
Date: Fri, 04 Aug 2023 20:05:03 +0530
Message-ID: <877cqa98q0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

[=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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 4 Aug 2023 14:13:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 04 10:13:47 2023
Received: from localhost ([127.0.0.1]:54480 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRvYo-0000NV-Qu
	for submit <at> debbugs.gnu.org; Fri, 04 Aug 2023 10:13:47 -0400
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 <info@HIDDEN>) id 1qRvYm-0000NE-Mh
 for 65039 <at> debbugs.gnu.org; Fri, 04 Aug 2023 10:13:45 -0400
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==
From: Protesilaos Stavrou <info@HIDDEN>
To: Visuwesh <visuweshm@HIDDEN>
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
In-Reply-To: <87bkfn7yhv.fsf@HIDDEN>
References: <877cqcw5m0.fsf@HIDDEN> <87fs50835j.fsf@HIDDEN>
 <87v8dv2mfu.fsf@HIDDEN> <87bkfn7yhv.fsf@HIDDEN>
Date: Fri, 04 Aug 2023 17:13:36 +0300
Message-ID: <87wmyarj3j.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-GND-Sasl: public@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Visuwesh <visuweshm@HIDDEN>
> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 4 Aug 2023 14:07:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 04 10:07:08 2023
Received: from localhost ([127.0.0.1]:54475 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRvSN-0000Cj-Q8
	for submit <at> debbugs.gnu.org; Fri, 04 Aug 2023 10:07:08 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:33329)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <info@HIDDEN>) id 1qRvSM-0000C5-EW
 for 65039 <at> debbugs.gnu.org; Fri, 04 Aug 2023 10:07:07 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 59DDC60003;
 Fri,  4 Aug 2023 14:07:00 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com;
 s=gm1; t=1691158020;
 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:
 in-reply-to:in-reply-to:references:references;
 bh=3R9JLKJrv6dJ8dbzCM3dbvDMXD/6mpiFodQm8xcVdec=;
 b=eo8ApEmJKLs7vZsP5P2+Jn9nWlF7h75u4E8AiwB7s6HIQ0Ecstl/CQKYr1IcPNNb0TMEqW
 EQ95KsC7viQA7q1O6Iyzsvt0qrsBU8ZB0Yfw/tCcL9vEzDGEudBSFTYTOEevpxJD1Njs45
 J1Vn9TBxFr3TvggI3sMJ0flEvto+hwfUzQRmrcPfTLwEdsI7yKdRoyoqQpAjnHp9WEVHHR
 YJRFhHQTxFw8V2xOnyMIKUQ4gYjIUnfTablZcJ5y/x9k2DXRZ7B4XsjcF1FNDYgfsWzew9
 qj2jQSdP9NunFHhSPKw9m2rPMxnclzleZWKsBKO6OkWbYz/1G6Dh2Ke2IOM+jg==
From: Protesilaos Stavrou <info@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
In-Reply-To: <834jlfw116.fsf@HIDDEN>
References: <877cqcw5m0.fsf@HIDDEN> <83zg38w25c.fsf@HIDDEN>
 <87y1ir2mko.fsf@HIDDEN> <834jlfw116.fsf@HIDDEN>
Date: Fri, 04 Aug 2023 17:06:59 +0300
Message-ID: <871qgisxz0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-GND-Sasl: public@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

> From: Eli Zaretskii <eliz@HIDDEN>
> Date: Fri,  4 Aug 2023 13:32:37 +0300
>
>> From: Protesilaos Stavrou <info@HIDDEN>
>> Cc: 65039 <at> debbugs.gnu.org
>> Date: Fri, 04 Aug 2023 12:17:43 +0300
>> 
>> > I'll let users of bookmarks comment, but in any case, please also
>> > check that the section "Bookmarks" in the Emacs user manual doesn't
>> > need some update due to this feature.  (You marked the NEWS entry with
>> > "---", which might mean you already checked that, but I'm not sure.)
>> 
>> I thought a change was not necessary.  Though I am happy to do it, if
>> needed.
>
> It sounds like the notion of "jumping" to a bookmark has evolved, and
> nowadays jumping to a bookmark might do much more than just jump to a
> buffer position.  Perhaps that node in the manual should say something
> about that, and show a couple of examples?

The revised patch includes a possible update to the manual.  Are those
examples sufficient?

-- 
Protesilaos Stavrou
https://protesilaos.com

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Add-bookmark-handler-for-M-x-shell.patch

From 4c903061803f7e41cc4f87f80b1b089c2174cc21 Mon Sep 17 00:00:00 2001
Message-ID: <4c903061803f7e41cc4f87f80b1b089c2174cc21.1691157813.git.info@HIDDEN>
From: Protesilaos Stavrou <info@HIDDEN>
Date: Fri, 4 Aug 2023 17:03:08 +0300
Subject: [PATCH] Add bookmark handler for M-x shell

* doc/emacs/regs.texi (Bookmarks): Explain that 'bookmark-jump'
establishes a remote connection.
* etc/NEWS: Announce the new feature.
* lisp/shell.el (shell-mode): Add buffer-local value for 'bookmark-make-record-function'.
(bookmark-prop-get, shell-bookmark-name, shell-bookmark-make-record)
(shell-bookmark-jump): Add section about the bookmark handler.
---
 doc/emacs/regs.texi |  6 ++++++
 etc/NEWS            |  6 ++++++
 lisp/shell.el       | 26 ++++++++++++++++++++++++++
 3 files changed, 38 insertions(+)

diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi
index e52f68dd18e..2debf9988c2 100644
--- a/doc/emacs/regs.texi
+++ b/doc/emacs/regs.texi
@@ -391,6 +391,12 @@ many characters of context to record on each side of the bookmark's
 position.  (In buffers that are visiting encrypted files, no context
 is saved in the bookmarks file no matter the value of this variable.)
 
+  If the bookmark is stored in a remote location, @code{bookmark-jump}
+will establish the connection and then create the buffer.  This works
+with regular files, as well as the buffers of @kbd{M-x dired} and
+@kbd{M-x shell}.  @xref{Top, The Tramp Manual,, tramp, The Tramp
+Manual}.
+
   Here are some additional commands for working with bookmarks:
 
 @table @kbd
diff --git a/etc/NEWS b/etc/NEWS
index 7b521f3e6fe..6329165cda2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -286,6 +286,12 @@ When this user option is non-nil, 'shell-get-old-input' ('C-RET')
 includes multiple shell "\" continuation lines from command output.
 Default is nil.
 
++++
+*** Bookmark handler for 'shell' buffers
+Now the 'bookmark-set' command will record 'shell' buffers.  This
+means that 'bookmark-jump' will create the 'shell' buffer in the
+directory it was in.
+
 ** Prog Mode
 
 +++
diff --git a/lisp/shell.el b/lisp/shell.el
index 0a24b4ea4c2..bdf8eb17fbd 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -676,6 +676,7 @@ (define-derived-mode shell-mode comint-mode "Shell"
 
   (setq comint-prompt-regexp shell-prompt-pattern)
   (shell-completion-vars)
+  (setq-local bookmark-make-record-function #'shell-bookmark-make-record)
   (setq-local paragraph-separate "\\'")
   (setq-local paragraph-start comint-prompt-regexp)
   (setq-local font-lock-defaults '(shell-font-lock-keywords t))
@@ -1812,6 +1813,31 @@ (defun shell-highlight-undef-mode-restart ()
   (when shell-highlight-undef-mode
     (shell-highlight-undef-mode 1)))
 
+;;; Bookmark support
+
+;; Adapted from esh-mode.el
+(declare-function bookmark-prop-get "bookmark" (bookmark prop))
+
+(defun shell-bookmark-name ()
+  (format "shell-%s"
+          (file-name-nondirectory
+           (directory-file-name
+            (file-name-directory default-directory)))))
+
+(defun shell-bookmark-make-record ()
+  "Create a bookmark for the current Shell buffer."
+  `(,(shell-bookmark-name)
+    (location . ,default-directory)
+    (handler . shell-bookmark-jump)))
+
+;;;###autoload
+(defun shell-bookmark-jump (bookmark)
+  "Default bookmark handler for Shell buffers."
+  (let ((default-directory (bookmark-prop-get bookmark 'location)))
+    (shell)))
+
+(put 'shell-bookmark-jump 'bookmark-handler-type "Shell")
+
 (provide 'shell)
 
 ;;; shell.el ends here
-- 
2.41.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 4 Aug 2023 13:01:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 04 09:01:40 2023
Received: from localhost ([127.0.0.1]:53572 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRuR1-0006SS-N3
	for submit <at> debbugs.gnu.org; Fri, 04 Aug 2023 09:01:40 -0400
Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:53293)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <visuweshm@HIDDEN>) id 1qRuQz-0006SB-0Z
 for 65039 <at> debbugs.gnu.org; Fri, 04 Aug 2023 09:01:38 -0400
Received: by mail-pf1-x443.google.com with SMTP id
 d2e1a72fcca58-68706d67ed9so1548752b3a.2
 for <65039 <at> debbugs.gnu.org>; Fri, 04 Aug 2023 06:01:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1691154091; x=1691758891;
 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=huMCosxfNdMT3qfHM868TMYFSoOLD7cGhyz9Sz2SiDA=;
 b=lZuDSKd50mZkYaAiORZU0txuRIiO6JWtudzofB+ck2+5kYUvQB1SWQdVPZOjtyykTc
 Bi7qdyRFsW7+Z6+WfTd4DlrrwIgr7+JXoPkW03bfG1xqyo/bVv7mNwf1fJvz1yeo+thK
 IYSXgtq+5PO2Zz9GlTGj0cYiggey4XDnvkjuzk/6mQkiEy9rfo5hjJvIN57DgJDkgZrm
 sTMEu/68Q62NPEglu46HwWznxcJl3jmND+v/iAwR1k5+mVboPtwb3lPJfjBzvgToDj8q
 65cHqUcDsHaMQbsqHJNuhYJoU5rm8v2w8n+xTjnAiCvKTnQEI+jR+5jDvwqQJolfVH3t
 mIcQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1691154091; x=1691758891;
 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=huMCosxfNdMT3qfHM868TMYFSoOLD7cGhyz9Sz2SiDA=;
 b=DRTlhhdxEo7rA52PnFBEATRUWjkdv02uprLl5kXp+pUM9OjRBEOjRbtufQH6Vw93Sm
 OXDoOzFIsB9AXRPcS9WDqK0EuYgDWUiqFpdclPPObL+u7Fg8pBfZ/h3j4xthQsSEk1Ck
 no6WzHwC1vmmKI1nGIOqud9m4h3kru1Xlz2XIzfV6TXaZQqpFGiAL5ptEl9+UvdPGvII
 YHFk6QBFqI6pAnDE3SGBStk3jysPXJ3wZ0DtvCrIX4wE5SdBLM2BLZHbtWE94Zc0dzzX
 kKfiBWZo75+Zp2aLVVSuYUpj4P1Tf3t74tx3WMHm/ZHS4+wmiS+aX7Ei7i+mPOXvtkSl
 P63g==
X-Gm-Message-State: AOJu0Ywm4OjUNv6XYWxctRdB3gi+MiCJ46hxjQ8DD+U6lorgvN+vqYoX
 h6FptD6hTgQtXvtHxVaFyO8=
X-Google-Smtp-Source: AGHT+IE/xJwcfbpPefhTBJ0C17pHYDc4W5dhOqSFHLg1/Q2dDuVgDCyTxmHgCPDrGxmXdfDpWoiXNg==
X-Received: by 2002:a05:6a20:3259:b0:13d:ee19:7723 with SMTP id
 hm25-20020a056a20325900b0013dee197723mr1427996pzc.35.1691154090905; 
 Fri, 04 Aug 2023 06:01:30 -0700 (PDT)
Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id
 g17-20020aa78191000000b0064f76992905sm1552045pfi.202.2023.08.04.06.01.29
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 04 Aug 2023 06:01:30 -0700 (PDT)
From: Visuwesh <visuweshm@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
In-Reply-To: <87v8dv2mfu.fsf@HIDDEN> (Protesilaos Stavrou's message
 of "Fri, 04 Aug 2023 12:20:37 +0300")
References: <877cqcw5m0.fsf@HIDDEN> <87fs50835j.fsf@HIDDEN>
 <87v8dv2mfu.fsf@HIDDEN>
Date: Fri, 04 Aug 2023 18:31:16 +0530
Message-ID: <87bkfn7yhv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

[=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.

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

diff --git a/lisp/shell.el b/lisp/shell.el
index 5cf108bfa3..8396870a67 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -637,6 +637,7 @@ shell-mode
=20
   (setq comint-prompt-regexp shell-prompt-pattern)
   (shell-completion-vars)
+  (setq-local bookmark-make-record-function #'shell-bookmark-make-record)
   (setq-local paragraph-separate "\\'")
   (setq-local paragraph-start comint-prompt-regexp)
   (setq-local font-lock-defaults '(shell-font-lock-keywords t))
@@ -1770,6 +1771,32 @@ shell-highlight-undef-mode-restart
   (when shell-highlight-undef-mode
     (shell-highlight-undef-mode 1)))
=20
+;;; Bookmark support
+
+;; Adapted from esh-mode.el
+(declare-function bookmark-prop-get "bookmark" (bookmark prop))
+
+(defun shell-bookmark-name ()
+  (format "shell-%s"
+          (file-name-nondirectory
+           (directory-file-name
+            (file-name-directory default-directory)))))
+
+(defun shell-bookmark-make-record ()
+  "Create a bookmark for the current Shell buffer."
+  `(,(shell-bookmark-name)
+    (location . ,default-directory)
+    (shell-filename . ,(executable-find shell--start-prog))
+    (handler . shell-bookmark-jump)))
+
+;;;###autoload
+(defun shell-bookmark-jump (bookmark)
+  "Default bookmark handler for Shell buffers."
+  (let ((default-directory (bookmark-prop-get bookmark 'location)))
+    (shell nil (bookmark-prop-get bookmark 'shell-filename))))
+
+(put 'shell-bookmark-jump 'bookmark-handler-type "Shell")
+
 (provide 'shell)
=20
 ;;; shell.el ends here




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 4 Aug 2023 10:32:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 04 06:32:34 2023
Received: from localhost ([127.0.0.1]:53469 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRs6k-0005Zx-2P
	for submit <at> debbugs.gnu.org; Fri, 04 Aug 2023 06:32:34 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48476)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qRs6h-0005Zj-KM
 for 65039 <at> debbugs.gnu.org; Fri, 04 Aug 2023 06:32:32 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qRs6b-0002iu-RP; Fri, 04 Aug 2023 06:32:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=IthPNanmE0brr8qf+qOWlmH+K8yjaR7Ma61xruVi7qE=; b=ZOSwxSGC6jyg
 MIAQz//MoVvhltum8I8ZUMHTSRyC+1cyF3DhQHRvrDKpWpsBNatn2J6M8w+9flUM8fc1WvYVjFUgQ
 3Wtz6UlfuV4ZVYMsXfuo3rpyHG9yEu4sOTSmG6r00koAaD73W8YhB6pto5wZvoyyMLvWv6IJdHXir
 5aH5ozABoR1DbYNYF9wQp56/K7MmEEX+q8ct9pMcxdiCvnv6HSNp+zxRIEUtStd5Dqv58+qSjWjSU
 fYhHJd4dz/CASIUU4Bf0uDJMV598OvUaLL2wkpMUDrfAddPcCqG6NO5xWrqFxKNRO7WCm2Bh//tE7
 xJupb2780xHSFvYnBIDDzw==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qRs6b-0002cR-B8; Fri, 04 Aug 2023 06:32:25 -0400
Date: Fri, 04 Aug 2023 13:32:37 +0300
Message-Id: <834jlfw116.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>
In-Reply-To: <87y1ir2mko.fsf@HIDDEN> (message from Protesilaos
 Stavrou on Fri, 04 Aug 2023 12:17:43 +0300)
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
References: <877cqcw5m0.fsf@HIDDEN> <83zg38w25c.fsf@HIDDEN>
 <87y1ir2mko.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Protesilaos Stavrou <info@HIDDEN>
> Cc: 65039 <at> debbugs.gnu.org
> Date: Fri, 04 Aug 2023 12:17:43 +0300
> 
> > I'll let users of bookmarks comment, but in any case, please also
> > check that the section "Bookmarks" in the Emacs user manual doesn't
> > need some update due to this feature.  (You marked the NEWS entry with
> > "---", which might mean you already checked that, but I'm not sure.)
> 
> I thought a change was not necessary.  Though I am happy to do it, if
> needed.

It sounds like the notion of "jumping" to a bookmark has evolved, and
nowadays jumping to a bookmark might do much more than just jump to a
buffer position.  Perhaps that node in the manual should say something
about that, and show a couple of examples?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 4 Aug 2023 09:20:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 04 05:20:47 2023
Received: from localhost ([127.0.0.1]:53421 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRqzG-0003bs-S2
	for submit <at> debbugs.gnu.org; Fri, 04 Aug 2023 05:20:47 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:38535)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <info@HIDDEN>) id 1qRqzF-0003bf-Ar
 for 65039 <at> debbugs.gnu.org; Fri, 04 Aug 2023 05:20:45 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 8C4F040009;
 Fri,  4 Aug 2023 09:20:38 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com;
 s=gm1; t=1691140839;
 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=BCzXAJO72yWc+JjytvC2xbk9BlajYk11kcKMmuLmvA8=;
 b=Af7o42hl56ualSgDJoR/qMk3wLStBtiAQv2BB0NjJOmjyXV0iL+EGf12KG0A0GpwYuv+PZ
 k5f1gGwTCKqwE3ImGhRWhMPYMtqL5da6X8L23xaFyZEKRCp59H8UihPfWWGBK5FwKsRjso
 b2/IqeKalq15hTrX9G6fWjQKtsY74Sdx39ZXDStGM44XEW9tS/bmnWSbF0tuYxwdbOdiDM
 GQWGT/lJEfol+Kd8xuOVvX1Hl7ekAEm1rJMlyJ8TcDs2Ko2NBZwUuWCev2KeyFlf/0fk4d
 3rImMMJBmLaZnvMis3uQP9rqHcQz/lS1dG/FuDYLq3AnO0XDKXAS+/ihUJFtHA==
From: Protesilaos Stavrou <info@HIDDEN>
To: Visuwesh <visuweshm@HIDDEN>
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
In-Reply-To: <87fs50835j.fsf@HIDDEN>
References: <877cqcw5m0.fsf@HIDDEN> <87fs50835j.fsf@HIDDEN>
Date: Fri, 04 Aug 2023 12:20:37 +0300
Message-ID: <87v8dv2mfu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-GND-Sasl: public@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Visuwesh <visuweshm@HIDDEN>
> Date: Thu,  3 Aug 2023 22:38:24 +0530
>
> [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=
=86=E0=AE=95=E0=AE=B8=E0=AF=8D=E0=AE=9F=E0=AF=8D 03, 2023] Protesilaos Stav=
rou wrote:
>
>> Dear maintainers,
>>
>> I noticed that M-x shell does not have a bookmark handler like M-x
>> eshell does.  What do you think about the attached patch?
>
> I think it would be nice to also store the "Remote shell path" for
> remote TRAMP buffers.  I have no idea how to retrieve this value,
> however.
> [ When I visit a TRAMP ssh buffer and say M-x shell, it asks for the
>   remote shell path.  ]

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.

--=20
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 4 Aug 2023 09:17:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 04 05:17:54 2023
Received: from localhost ([127.0.0.1]:53416 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRqwU-0003Xb-8h
	for submit <at> debbugs.gnu.org; Fri, 04 Aug 2023 05:17:54 -0400
Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:57505)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <info@HIDDEN>) id 1qRqwR-0003XH-QJ
 for 65039 <at> debbugs.gnu.org; Fri, 04 Aug 2023 05:17:52 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 91A2F24000B;
 Fri,  4 Aug 2023 09:17:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com;
 s=gm1; t=1691140666;
 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:
 in-reply-to:in-reply-to:references:references;
 bh=2Hu+ZF3f9wXbfRfFaM31BhdnDZYFmQJ8SNFJhaHgwvs=;
 b=aBWs+nOdpRhc0HgUPOVi3dFLCY2DnSZIDXgeFhdZAR20p+FAO3aPFAWnQMMraF1Oc/l4Nx
 GY5qHuDg5Uc2yD2OwP5n+lq8nid9aiPxJJor1eXrCukB1Dwi5Bc4LEBNlvKXnQjxBYFoe8
 XHG1DYUp2op5tptqvdS7lsTLiqSLbsESedirTYftXUUpLj6va15xowRvSf/bM2o9lNrfCF
 Ey8P4JdKxi7ddBOVAp4hdlAEG3O9RbF6koC+8HBIgNY36DXg8uSVtQG8zSC9EDTmFBWhVm
 q4zcgQoL6dcsIadER7nTsuJg95nr92XyDcUck/UIq+QN/3OCMV+JpPyN7Lvw5Q==
From: Protesilaos Stavrou <info@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
In-Reply-To: <83zg38w25c.fsf@HIDDEN>
References: <877cqcw5m0.fsf@HIDDEN> <83zg38w25c.fsf@HIDDEN>
Date: Fri, 04 Aug 2023 12:17:43 +0300
Message-ID: <87y1ir2mko.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: public@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Eli Zaretskii <eliz@HIDDEN>
> Date: Thu,  3 Aug 2023 18:56:15 +0300
>
>> From: Protesilaos Stavrou <info@HIDDEN>
>> Date: Thu, 03 Aug 2023 17:41:27 +0300
>> 
>> I noticed that M-x shell does not have a bookmark handler like M-x
>> eshell does.  What do you think about the attached patch?
>
> I'll let users of bookmarks comment, but in any case, please also
> check that the section "Bookmarks" in the Emacs user manual doesn't
> need some update due to this feature.  (You marked the NEWS entry with
> "---", which might mean you already checked that, but I'm not sure.)

I thought a change was not necessary.  Though I am happy to do it, if
needed.

-- 
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 3 Aug 2023 17:08:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 03 13:08:49 2023
Received: from localhost ([127.0.0.1]:52833 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRboe-0003Lm-Vr
	for submit <at> debbugs.gnu.org; Thu, 03 Aug 2023 13:08:49 -0400
Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:48356)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <visuweshm@HIDDEN>) id 1qRboc-0003LX-1N
 for 65039 <at> debbugs.gnu.org; Thu, 03 Aug 2023 13:08:47 -0400
Received: by mail-pf1-x443.google.com with SMTP id
 d2e1a72fcca58-686f1240a22so1058107b3a.0
 for <65039 <at> debbugs.gnu.org>; Thu, 03 Aug 2023 10:08:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1691082520; x=1691687320;
 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=OdIyFvPqCZEFMjIjKS81NiUfEbanz3ZLa/9LZ9YRbcg=;
 b=rkhGVWTtZvWOpcGRrUo4dQtfNk/oGJ6jMPwZZ2KsPY9koaEXPbyD9td4Xwen6Fs6K2
 BgaZEpeY7H5r0ps7nXpA5lpzexzCnBtW2ohN3Vap/e0Uj34fG5ZVgQhHNv++IBe51KfU
 n7uo/zsU6/cgnfsh2NVAfaQeiF8HqY1/ebeE/K75kqnu9GLSRRNIfjWa3n2vpiiaKhME
 aLEQaSXvTpioHu6A4/ptu8msbB7d8uxswT/PxBJvDIgDv578FI4KOFaZt8lTtJKq/1jk
 TvjR3AkADvWrtbzMQaZUKNGpWL/kiktSW9tHfxTO9D7HqRnbMk0JIqxV7+3tf2+mtVd2
 bunw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1691082520; x=1691687320;
 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=OdIyFvPqCZEFMjIjKS81NiUfEbanz3ZLa/9LZ9YRbcg=;
 b=UWh+WcZTPuJ0yCu5qcx7nEcsGJDI6cKsVLt8jX0M8YwV00Uus9cb2uhWopnpvO89Pm
 C+c85JmopkLN912pQB9JBHuWz8DmLUb2RCm2PtVZkledmN5IvPgt2lQHV6VhQ3MZdzjN
 LVvu70idwrevf54qvNCactC9M/K5IS/H+6bZakPCBnsnDUSo8uIrEokAR5BS0JlHkm8t
 lJ6T0J19SL/qep4ZJ9yA/C/mG17iTRY8GTjoaFo8KqggOiDjMs1YanBAMDe+e1Eufjqj
 XTKI6y7XApJ3FfrjvNtLtU+c05iUnpmJeYjVyo5fa/saT8LnUq2oe3FPdw6UzzGSA842
 jejg==
X-Gm-Message-State: ABy/qLYjbZHI1VPzvNmhdyuCIO6dCi0wiPeXkPkGDyWUb8JBcJVOnhH6
 Ty3dPxwEjqWZ7avN4qtyDzv9P6ukC2gq6Q==
X-Google-Smtp-Source: APBJJlEgtSpgj0YKGUrfhw2s8nhdm51X5lIDfoUxPeuFWWeZ2d9QkvHFaFp/OKWBoqIgou40n1NEQg==
X-Received: by 2002:a05:6a20:841a:b0:10f:be0:4dce with SMTP id
 c26-20020a056a20841a00b0010f0be04dcemr26010586pzd.8.1691082520143; 
 Thu, 03 Aug 2023 10:08:40 -0700 (PDT)
Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id
 h6-20020a170902704600b001b809082a69sm96795plt.235.2023.08.03.10.08.38
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 03 Aug 2023 10:08:39 -0700 (PDT)
From: Visuwesh <visuweshm@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
In-Reply-To: <877cqcw5m0.fsf@HIDDEN> (Protesilaos Stavrou's message
 of "Thu, 03 Aug 2023 17:41:27 +0300")
References: <877cqcw5m0.fsf@HIDDEN>
Date: Thu, 03 Aug 2023 22:38:24 +0530
Message-ID: <87fs50835j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

[=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=86=
=E0=AE=95=E0=AE=B8=E0=AF=8D=E0=AE=9F=E0=AF=8D 03, 2023] Protesilaos Stavrou=
 wrote:

> Dear maintainers,
>
> I noticed that M-x shell does not have a bookmark handler like M-x
> eshell does.  What do you think about the attached patch?

I think it would be nice to also store the "Remote shell path" for
remote TRAMP buffers.  I have no idea how to retrieve this value,
however.
[ When I visit a TRAMP ssh buffer and say M-x shell, it asks for the
  remote shell path.  ]




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at 65039 <at> debbugs.gnu.org:


Received: (at 65039) by debbugs.gnu.org; 3 Aug 2023 15:56:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 03 11:56:20 2023
Received: from localhost ([127.0.0.1]:52766 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRagW-0001N6-1J
	for submit <at> debbugs.gnu.org; Thu, 03 Aug 2023 11:56:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35094)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qRagS-0001Mt-Rz
 for 65039 <at> debbugs.gnu.org; Thu, 03 Aug 2023 11:56:19 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qRagN-0004rO-2M; Thu, 03 Aug 2023 11:56:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=WBJBxjoWhu1gDgKoSRQ5s3Bysk09ttI3w6UaqGVP5nY=; b=igr5NwEermnT
 xHrB6Nk8lfHLGlMjYpDxkDATa2LDBfRuHb3We4Gq6E41sPClnxqa6t3/ZTG0sot1jhVII9IpzSMyA
 zDPRtUN2cbVKj46mZA5SHWzsprgF2BkqtOVkxr/OHaZucmB+9OR2y6shMbH3DzZQrCrhmVOu4jYD2
 Ne0MHJCGK8LfqGYWvufG0YAbrpfuwj8LhMuhsH+wg+JONZk+c1LBsqFSMyUXKFgs5xJh/wy+ESoGE
 7VJ1lAOOflTOnFzzDK5fE7KFlmCyOCsJ6mrJTBlVRndz0pyLqNJP6kyYvFza0+lZhsMAjfOEsv/ZN
 s3RPgOrb2wQNVjtEHle8bw==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qRagI-0006Z5-JE; Thu, 03 Aug 2023 11:56:10 -0400
Date: Thu, 03 Aug 2023 18:56:15 +0300
Message-Id: <83zg38w25c.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>
In-Reply-To: <877cqcw5m0.fsf@HIDDEN> (message from Protesilaos
 Stavrou on Thu, 03 Aug 2023 17:41:27 +0300)
Subject: Re: bug#65039: 30.0.50; [PATCH] Add bookmark handler for M-x shell
References: <877cqcw5m0.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65039
Cc: 65039 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Protesilaos Stavrou <info@HIDDEN>
> Date: Thu, 03 Aug 2023 17:41:27 +0300
> 
> I noticed that M-x shell does not have a bookmark handler like M-x
> eshell does.  What do you think about the attached patch?

I'll let users of bookmarks comment, but in any case, please also
check that the section "Bookmarks" in the Emacs user manual doesn't
need some update due to this feature.  (You marked the NEWS entry with
"---", which might mean you already checked that, but I'm not sure.)

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Aug 2023 14:41:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 03 10:41:45 2023
Received: from localhost ([127.0.0.1]:52670 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qRZWK-0007fW-VI
	for submit <at> debbugs.gnu.org; Thu, 03 Aug 2023 10:41:45 -0400
Received: from lists.gnu.org ([2001:470:142::17]:36666)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <info@HIDDEN>) id 1qRZWI-0007fI-My
 for submit <at> debbugs.gnu.org; Thu, 03 Aug 2023 10:41:43 -0400
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 <info@HIDDEN>)
 id 1qRZWC-0008PP-Kc
 for bug-gnu-emacs@HIDDEN; Thu, 03 Aug 2023 10:41:36 -0400
Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <info@HIDDEN>)
 id 1qRZWA-0005og-Ba
 for bug-gnu-emacs@HIDDEN; Thu, 03 Aug 2023 10:41:36 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 0C1E71C000D
 for <bug-gnu-emacs@HIDDEN>; Thu,  3 Aug 2023 14:41:28 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com;
 s=gm1; t=1691073689;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=bzf3bYPTNtfWbdHXf+nlYHCNylY2kz5jLtU7DaGJy2Y=;
 b=UGui3mChfzmZ8t+mE1iiEwDnFVTtDr96jw3au3zf6NBy85YFNToS8QiHZ8zlQiSf+4R4e2
 Phc1+R8M9Dw0O4MEFJ5Se30PvW8cm1qklxuIoNGcppmgxOpIO79s5GKAv5upu0Wg/XcQYY
 KqcNiSTnZNW889HJB04TGI46X9MOB/MvBaRQHArpdgdiQBbClQWWX7HDn8MabqXl49QEJf
 I1h5J9CaxUxoToNyvsMVReLniesdNcx29tyfNdZ7BGbmNeuNNWcZGNRiYJsLJzGLaqXFJv
 Pa+EmgWGqErdJb3k4d+rWREeMTRcMMhfpESbwf93DGP0IvUuS4kU1ZY+y4tzzQ==
From: Protesilaos Stavrou <info@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; [PATCH] Add bookmark handler for M-x shell
Date: Thu, 03 Aug 2023 17:41:27 +0300
Message-ID: <877cqcw5m0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-GND-Sasl: public@HIDDEN
Received-SPF: none client-ip=2001:4b98:dc4:8::225;
 envelope-from=info@HIDDEN; helo=relay5-d.mail.gandi.net
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_NONE=0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

Dear maintainers,

I noticed that M-x shell does not have a bookmark handler like M-x
eshell does.  What do you think about the attached patch?

All the best,
Protesilaos (or simply "Prot")

-- 
Protesilaos Stavrou
https://protesilaos.com

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Add-bookmark-handler-for-M-x-shell.patch

From 69744f953b95dc2f3c9c3039324e121a6d664570 Mon Sep 17 00:00:00 2001
Message-ID: <69744f953b95dc2f3c9c3039324e121a6d664570.1691073443.git.info@HIDDEN>
From: Protesilaos Stavrou <info@HIDDEN>
Date: Thu, 3 Aug 2023 17:35:10 +0300
Subject: [PATCH] Add bookmark handler for M-x shell

* etc/NEWS: Anounce the new feature.
* lisp/shell.el (shell-mode): Add buffer-local 'bookmark-make-record-function'.
(bookmark-prop-get, shell-bookmark-name, shell-bookmark-make-record)
(shell-bookmark-jump): Add bookmark handler.
---
 etc/NEWS      |  6 ++++++
 lisp/shell.el | 26 ++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index 7b521f3e6fe..da5d9b96002 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -286,6 +286,12 @@ When this user option is non-nil, 'shell-get-old-input' ('C-RET')
 includes multiple shell "\" continuation lines from command output.
 Default is nil.
 
+---
+*** Bookmark handler for 'shell' buffers
+Now the 'bookmark-set' command will record 'shell' buffers.  This
+means that 'bookmark-jump' will create the 'shell' buffer in the
+directory it was in.
+
 ** Prog Mode
 
 +++
diff --git a/lisp/shell.el b/lisp/shell.el
index 0a24b4ea4c2..bdf8eb17fbd 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -676,6 +676,7 @@ (define-derived-mode shell-mode comint-mode "Shell"
 
   (setq comint-prompt-regexp shell-prompt-pattern)
   (shell-completion-vars)
+  (setq-local bookmark-make-record-function #'shell-bookmark-make-record)
   (setq-local paragraph-separate "\\'")
   (setq-local paragraph-start comint-prompt-regexp)
   (setq-local font-lock-defaults '(shell-font-lock-keywords t))
@@ -1812,6 +1813,31 @@ (defun shell-highlight-undef-mode-restart ()
   (when shell-highlight-undef-mode
     (shell-highlight-undef-mode 1)))
 
+;;; Bookmark support
+
+;; Adapted from esh-mode.el
+(declare-function bookmark-prop-get "bookmark" (bookmark prop))
+
+(defun shell-bookmark-name ()
+  (format "shell-%s"
+          (file-name-nondirectory
+           (directory-file-name
+            (file-name-directory default-directory)))))
+
+(defun shell-bookmark-make-record ()
+  "Create a bookmark for the current Shell buffer."
+  `(,(shell-bookmark-name)
+    (location . ,default-directory)
+    (handler . shell-bookmark-jump)))
+
+;;;###autoload
+(defun shell-bookmark-jump (bookmark)
+  "Default bookmark handler for Shell buffers."
+  (let ((default-directory (bookmark-prop-get bookmark 'location)))
+    (shell)))
+
+(put 'shell-bookmark-jump 'bookmark-handler-type "Shell")
+
 (provide 'shell)
 
 ;;; shell.el ends here
-- 
2.41.0


--=-=-=--




Acknowledgement sent to Protesilaos Stavrou <info@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#65039; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 3 Sep 2023 11:30:02 UTC

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