unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38079: On Windows tramp hangs after server-start is called
@ 2019-11-06  0:52 Wanrong Lin
  2019-11-06 16:06 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Wanrong Lin @ 2019-11-06  0:52 UTC (permalink / raw)
  To: 38079

On Windows, after M-x server-start, tramp no longer works. When I tried 
to connect to a "pscp" remote Linux host, it just hangs at the message 
"Remote prompt found" (something like that).

Today I finally figured out what the problem is, and put in a work 
around as following:

;; On Windows, after "server-start" is called, somehow (system-name) 
will return lower case host name. If the original
;; (system-name) returns upper case host name now 
tramp-restricted-shell-hosts-alist will be out-of-date and cause
;; tramp not to function properly.
(defadvice server-start (after update-restricted-host-list last activate)
   (setf tramp-restricted-shell-hosts-alist
         (when (memq system-type '(windows-nt))
           (list (concat "\\`" (regexp-quote (system-name)) "\\'")))))

But the proper fix should be to make sure (system-name) always returns 
the same string consistently. I found it is this sexp in "server-start" 
function that changes the return value of (system-name):

       (setq server-process
         (apply #'make-network-process ....))

This bug has bothered me for a long time. Even Emacs 26.3 still has it 
(although I am still using 26.2 for daily work). I hope this can lead to 
a fix that saves some frustration for other fellow Emacs users.

Here is my set up:

In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
  of 2019-04-13 built on CIRROCUMULUS
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749

Warren






^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-11-08 13:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-06  0:52 bug#38079: On Windows tramp hangs after server-start is called Wanrong Lin
2019-11-06 16:06 ` Eli Zaretskii
2019-11-06 16:14   ` martin rudalics
2019-11-06 17:37     ` Michael Albinus
2019-11-06 16:50   ` Wanrong Lin
2019-11-06 18:11     ` Eli Zaretskii
2019-11-08  7:51       ` Michael Albinus
2019-11-08 10:34         ` Eli Zaretskii
2019-11-08 10:50           ` Michael Albinus
2019-11-08 13:35             ` Eli Zaretskii
2019-11-07 15:23     ` Michael Albinus
2019-11-07 16:18       ` Wanrong Lin
2019-11-07 17:45         ` Michael Albinus
2019-11-07 16:18       ` Wanrong Lin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).