bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30324: 26.0.91; cd-absolute to tramp directory fails


From: Michael Albinus
Subject: bug#30324: 26.0.91; cd-absolute to tramp directory fails
Date: Fri, 02 Feb 2018 23:24:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Rajeev Narang <address@hidden> writes:

Hi Rajeev,

> When rlogin-directory-tracking-mode is set to t, rlogin directory tracking 
> fails.
>
> This is because (cd-absolute "/address@hidden:") fails in emacs-26.  The same 
> call succeeds in emacs-25.

rlogin.el still speaks about FTP access. This has worked until Emacs 25,
because ange-ftp.el and tramp.el have used the same file name
syntax. While ange.ftp.el uses ftp to access, Tramp has a variety of
connection methods. In case of absence, the default connection method is
used, often "ssh".

With Emacs 26, Tramp's file name syntax has changed. A method name is
mandatory now, at least "-" as indicator for the default method. The
obvious simple fix is

diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el
index 646adef2f0..3bfc4d7f35 100644
--- a/lisp/net/rlogin.el
+++ b/lisp/net/rlogin.el
@@ -219,7 +219,7 @@ rlogin
                ;; function, to avoid a gratuitous resync check; the default
                ;; should be the user's home directory, be it local or remote.
                (setq comint-file-name-prefix
-                     (concat "/" rlogin-remote-user "@" rlogin-host ":"))
+                     (concat "/-:" rlogin-remote-user "@" rlogin-host ":"))
                (cd-absolute comint-file-name-prefix))
               ((null rlogin-directory-tracking-mode))
               (t
@@ -253,7 +253,7 @@ rlogin-directory-tracking-mode
     (setq rlogin-directory-tracking-mode t)
     (setq shell-dirtrackp t)
     (setq comint-file-name-prefix
-          (concat "/" rlogin-remote-user "@" rlogin-host ":")))
+          (concat "/-:" rlogin-remote-user "@" rlogin-host ":")))
    ((< prefix 0)
     (setq rlogin-directory-tracking-mode nil)
     (setq shell-dirtrackp nil))
Could you pls test it? If it works, I propose to push it to the emacs-26
branch, because the patch is very simple (we know what we're doing,
don't we?), and it cures a regression from Emacs 25.

Eli?

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]