tramp-compat-with-mutex}
@value{tramp} comes with compatibility code for different Emacs
-versions. When you see this warning, you don't use the Emacs built-in
-version of @value{tramp}. In case you have installed @value{tramp}
-from GNU ELPA, see the package README file for instructions how to
-recompile it.
+versions. When you see such a message (the text might differ), you
+don't use the Emacs built-in version of @value{tramp}. In case you
+have installed @value{tramp} from GNU ELPA, see the package README
+file for instructions how to recompile it.
@ifset installchapter
-In case you have installed it from its Git repository, @ref{Recompilation}.
+@xref{Recompilation}.
@end ifset
(remote-prefix
(with-current-buffer (process-buffer proc)
(file-remote-p default-directory)))
- (rest-string (process-get proc 'rest-string)))
+ (rest-string (process-get proc 'rest-string))
+ pos)
(when rest-string
(tramp-message proc 10 "Previous string:\n%s" rest-string))
(tramp-message proc 6 "%S\n%s" proc string)
;; some assumptions.
((string-match
"Can't find module 'help' specified in GIO_USE_FILE_MONITOR" string)
+ (setq pos (match-end 0))
(cond
((getenv "EMACS_EMBA_CI") 'GInotifyFileMonitor)
((eq system-type 'cygwin) 'GPollFileMonitor)
- (t tramp-cache-undefined)))
+ (t nil)))
;; TODO: What happens, if several monitor names are reported?
((string-match "\
Supported arguments for GIO_USE_FILE_MONITOR environment variable:
\\s-*\\([[:alpha:]]+\\) - 20" string)
+ (setq pos (match-end 0))
(intern
(format "G%sFileMonitor" (capitalize (match-string 1 string)))))
- (t (throw 'doesnt-work nil))))
- (setq string (substring string (match-end 0))))
+ (t (setq pos (length string)) nil)))
+ (setq string (substring string pos)))
;; Delete empty lines.
- (setq string (tramp-compat-string-replace "\n\n" "\n" string)
- string (replace-regexp-in-string "^\n" "" string))
+ (setq string (tramp-compat-string-replace "\n\n" "\n" string))
(while (string-match
(eval-when-compile
`(file-notify ,object file-notify-callback))))))
;; Save rest of the string.
+ (while (string-match "^\n" string)
+ (setq string (replace-match "" nil nil string)))
(when (zerop (length string)) (setq string nil))
(when string (tramp-message proc 10 "Rest string:\n%s" string))
(process-put proc 'rest-string string)))