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

Previous Next

Package: emacs;

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

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

Severity: wishlist

Tags: patch

Found in version 30.0.50

Fixed in version 31.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 65039 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, prot <at> protesilaos.com, Visuwesh <visuweshm <at> gmail.com>
Subject: bug#65039: [PATCH] Add bookmark handler for shell-mode
Date: Sat, 15 Feb 2025 18:15:52 +0100
Ship Mints <shipmints <at> gmail.com> writes:

> Latest patch attached.

And still nitpicks :-)

> +Note: Before creating ad-hoc multi-hop remote connections, customize
> +either or both:
> +@code{tramp-save-ad-hoc-proxies} to non-nil to persist proxy routes.
> +@code{tramp-show-ad-hoc-proxies} to non-nil to ensure connections are
> +fully qualified.  This is helpful if you use the same persisted
> +bookmarks file on multiple hosts.

non-@code{nil}

> +@xref{Top, The Tramp Manual,, tramp, The Tramp Manual}. Also see the
> +more detailed documentation available here
> +@url{https://www.gnu.org/software/tramp/}.

??? Both the info manual and the HTML page are the same text.

> +  (let ((bookmark-shell-file-name
> +         (cond
> +          ((file-remote-p default-directory)
> +           (with-connection-local-variables
> +            (cdr (assoc 'shell-file-name (buffer-local-value
> +                                          'connection-local-variables-alist
> +                                          (current-buffer))))))
> +          (shell-file-name shell-file-name)
> +          (t sh-shell-file))))

My previous comment still stands: Use `connection-local-value'. Did you check?

> +(defun shell-bookmark-jump (bookmark)
> +  "Default BOOKMARK handler for shell buffers.
> +Create a shell buffer with its `default-directory', shell process, and
> +buffer name from the bookmark.  If there is an existing shell buffer of
> +the same name, default shell-mode behavior is to reuse that buffer.

`shell-mode'

> +For a remote shell `default-directory' will be the remote file name.
> +Remote shell buffers reuse existing connections that match the remote
> +file name, or may prompt you to create a new connection.  Bind
> +`tramp-show-ad-hoc-proxies' to non-nil to ensure multi-hop remote
> +connections are fully qualified.

non-@code{nil}

Best regards, Michael.




This bug report was last modified 64 days ago.

Previous Next


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