tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp (2.4.1-pre); Cannot move cursor back to /method:host: part whe


From: Maarten Grachten
Subject: Re: tramp (2.4.1-pre); Cannot move cursor back to /method:host: part when finding remote file
Date: Mon, 1 Oct 2018 15:34:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi Michael,

That's great news, thanks a lot for your work!

Best regards,

Maarten

On 2018-10-01 14:52, Michael Albinus wrote:
Maarten Grachten <address@hidden> writes:

Hi Michael,

Hi Maarten,

I'm not sure this is a Tramp issue. I can reproduce the problem when I
start Emacs with my (rather extensive) configuration. It does not happen
when starting "emacs -Q". So I suspect a completion package is in the way.
Which one do you use?

You may be right that this may be an issue of the autocompletion.

I've digged further, and finally, it seems to be a Tramp problem
indeed. I've pushed the appended patch to the emacs-26 branch of the git
repository; shall be merged into the master branch within some days.

The patch shall apply also to the master branch; the differences are
just the line numbers.

Best regards, Michael.



diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 452e70ec35..98ec8415c7 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1941,21 +1941,20 @@ tramp-rfn-eshadow-update-overlay
                    (minibuffer-prompt-end)))
           ;; We do not want to send any remote command.
           (non-essential t))
-      (when
-         (tramp-tramp-file-p
-          (buffer-substring-no-properties end (point-max)))
-       (save-restriction
-         (narrow-to-region
-          (1+ (or (string-match
-                   (tramp-rfn-eshadow-update-overlay-regexp)
-                   (buffer-string) end)
-                  end))
-          (point-max))
-         (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay)
-               (rfn-eshadow-update-overlay-hook nil)
-               file-name-handler-alist)
-           (move-overlay rfn-eshadow-overlay (point-max) (point-max))
-           (rfn-eshadow-update-overlay)))))))
+      (when (tramp-tramp-file-p (buffer-substring end (point-max)))
+       (save-excursion
+         (save-restriction
+           (narrow-to-region
+            (1+ (or (string-match
+                     (tramp-rfn-eshadow-update-overlay-regexp)
+                     (buffer-string) end)
+                    end))
+            (point-max))
+           (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay)
+                 (rfn-eshadow-update-overlay-hook nil)
+                 file-name-handler-alist)
+             (move-overlay rfn-eshadow-overlay (point-max) (point-max))
+             (rfn-eshadow-update-overlay))))))))
(add-hook 'rfn-eshadow-update-overlay-hook
           'tramp-rfn-eshadow-update-overlay)




reply via email to

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