GNU bug report logs - #76165
[PATCH] ansi-osc-directory-tracker respects Tramp remote files

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Sun, 9 Feb 2025 19:06:01 UTC

Severity: normal

Tags: patch

Fixed in version 31.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Visuwesh <visuweshm <at> gmail.com>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 76165 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#76165: [PATCH] ansi-osc-directory-tracker respects Tramp
 remote files
Date: Mon, 10 Feb 2025 16:51:45 +0530
[திங்கள் பிப்ரவரி 10, 2025] Ship Mints wrote:

> * lisp/ansi-osc.el (ansi-osc-directory-tracker):
> If 'default-directory' is a Tramp remote-file form, retain that form
> when 'default-directory' changes are detected.
> ---
>  etc/NEWS         | 6 ++++++
>  lisp/ansi-osc.el | 9 ++++++++-
>  2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/etc/NEWS b/etc/NEWS
> index acaa88d5574..052d4666b24 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -533,6 +533,12 @@ It removes all the buttons in the specified region.
>  'comint-complete-input-ring' ('C-x <up>') is like 'minibuffer-complete-history'
>  but completes on comint inputs.
>  
> +---
> +*** ansi-osc-directory-tracker now respects Tramp remote files.
> +Tramp remote forms are now retained when changes to 'default-directory'
> +are detected by this filter.  Previously, /ssh:hostname:/home/username
> +would be stripped to just /home/username.
> +
>  ** Eshell
>  
>  ---
> diff --git a/lisp/ansi-osc.el b/lisp/ansi-osc.el
> index bbd75033ba0..30b7d1ad738 100644
> --- a/lisp/ansi-osc.el
> +++ b/lisp/ansi-osc.el
> @@ -106,6 +106,9 @@ ansi-osc-window-title-handler
>  (declare-function url-host "url/url-parse.el")
>  (declare-function url-type "url/url-parse.el")
>  (declare-function url-filename "url/url-parse.el")
> +(declare-function tramp-tramp-file-p "tramp")
> +(declare-function tramp-make-tramp-file-name "tramp")
> +(declare-function tramp-dissect-file-name "tramp")
>  (defun ansi-osc-directory-tracker (_ text)
>    "Update `default-directory' from OSC 7 escape sequences.

This hunk can be removed now right?




This bug report was last modified 136 days ago.

Previous Next


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