Bug#306550: tramp: auto save errors
Michael Albinus [EMAIL PROTECTED] writes: Ferenc Wagner [EMAIL PROTECTED] writes: And really, (file-modes diag.txt) = nil (file-modes /tmp/#diag.txt#) = 436 That's what I suspected. The fix would be simple (call `set-file-modes´ only when `file-modes´ returns non-nil). Nevertheless, I'm curious to know why (file-modes diag.txt) returned nil. Could you, please, give me the full Tramp file name of diag.txt? Mainly, I'm interested in the access method. Sure: /ssh:csoki:/home/wferi/anulus_reports/diag.txt The remote machine is FreeBSD 5.3-STABLE, btw. Still strange. `file-modes' should always return a valid value in the ssh case. I don't quite get it. `file-modes' is a primitive, is Tramp invasive enough to deceive it? Eh, nevermind. But so what, I've fixed your initial problem in Tramp CVS. If you want to test it yourself you might apply the appended patch to tramp.el (note that there are other fixes since Tramp 2.0.48, too). The fix will be included in Tramp 2.0.49. Thanks a lot, I applied the patch, which seems to work wonderfully. -- Feri.
Bug#306550: tramp: auto save errors
[EMAIL PROTECTED] (Kai Großjohann) writes: Ferenc Wagner [EMAIL PROTECTED] writes: I don't quite get it. `file-modes' is a primitive, is Tramp invasive enough to deceive it? Eh, nevermind. There is no deception. file-modes looks to see if there is a handler for the given file. If so, the handler is called. Otherwise, the built-in C code is used. Interesting. Thanks for the explanation! -- Feri.
Bug#306550: tramp: auto save errors
Ferenc Wagner [EMAIL PROTECTED] writes: And really, (file-modes diag.txt) = nil (file-modes /tmp/#diag.txt#) = 436 That's what I suspected. The fix would be simple (call `set-file-modes´ only when `file-modes´ returns non-nil). Nevertheless, I'm curious to know why (file-modes diag.txt) returned nil. Could you, please, give me the full Tramp file name of diag.txt? Mainly, I'm interested in the access method. Sure: /ssh:csoki:/home/wferi/anulus_reports/diag.txt The remote machine is FreeBSD 5.3-STABLE, btw. Still strange. `file-modes' should always return a valid value in the ssh case. But so what, I've fixed your initial problem in Tramp CVS. If you want to test it yourself you might apply the appended patch to tramp.el (note that there are other fixes since Tramp 2.0.48, too). The fix will be included in Tramp 2.0.49. Thanx for your report and support, and best regards, Michael. Index: tramp.el === RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v retrieving revision 2.359.2.31 retrieving revision 2.359.2.36 diff -u -r2.359.2.31 -r2.359.2.36 --- tramp.el 27 Feb 2005 14:28:50 - 2.359.2.31 +++ tramp.el 29 Apr 2005 20:43:06 - 2.359.2.36 @@ -1352,7 +1352,9 @@ ;; Chunked sending kluge. We set this to 500 for black-listed constellations ;; known to have a bug in `process-send-string'; some ssh connections appear -;; to drop bytes when data is sent too quickly. +;; to drop bytes when data is sent too quickly. There is also a connection +;; buffer local variable, which is computed depending on remote host properties +;; when `tramp-chunksize' is zero or nil. (defcustom tramp-chunksize (when (and (not (featurep 'xemacs)) (memq system-type '(hpux))) @@ -3561,7 +3563,13 @@ (unless asynchronous (tramp-wait-for-output))) (unless asynchronous - (insert-buffer (tramp-get-buffer multi-method method user host))) + ;; We cannot use `insert-buffer' because the tramp buffer + ;; changes its contents before insertion due to calling + ;; `expand-file' and alike. + (insert + (with-current-buffer + (tramp-get-buffer multi-method method user host) + (buffer-string (when error-buffer (save-excursion (unless (bufferp error-buffer) @@ -3571,7 +3579,11 @@ cat /tmp/tramp.$$.err) (tramp-wait-for-output) (set-buffer error-buffer) - (insert-buffer (tramp-get-buffer multi-method method user host)) + ;; Same comment as above + (insert + (with-current-buffer + (tramp-get-buffer multi-method method user host) + (buffer-string))) (tramp-send-command-and-check multi-method method user host rm -f /tmp/tramp.$$.err))) (save-excursion @@ -4834,6 +4846,9 @@ (defun tramp-set-auto-save () (when (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name)) + ;; ange-ftp has its own auto-save mechanism + (eq (tramp-find-foreign-file-name-handler (buffer-file-name)) + 'tramp-sh-file-name-handler) auto-save-default) (auto-save-mode 1))) (add-hook 'find-file-hooks 'tramp-set-auto-save t) @@ -5417,7 +5432,7 @@ method)) (when multi-method (error Cannot multi-connect using telnet connection method)) -(tramp-pre-connection multi-method method user host) +(tramp-pre-connection multi-method method user host tramp-chunksize) (tramp-message 7 Opening connection for [EMAIL PROTECTED] using %s... (or user (user-login-name)) host method) (let ((process-environment (copy-sequence process-environment))) @@ -5475,7 +5490,7 @@ (save-match-data (when multi-method (error Cannot multi-connect using rsh connection method)) -(tramp-pre-connection multi-method method user host) +(tramp-pre-connection multi-method method user host tramp-chunksize) (if (and user (not (string= user ))) (tramp-message 7 Opening connection for [EMAIL PROTECTED] using %s... user host method) @@ -5544,7 +5559,7 @@ (error Cannot connect to different host `%s' with `su' connection method host)) -(tramp-pre-connection multi-method method user host) +(tramp-pre-connection multi-method method user host tramp-chunksize) (tramp-message 7 Opening connection for `%s' using `%s'... (or user root) method) (let ((process-environment (copy-sequence process-environment))) @@ -5609,7 +5624,7 @@ (unless (and (= (length method) (length user)) (= (length method) (length host))) (error Arrays METHOD, USER, HOST must have equal length)) -(tramp-pre-connection multi-method method user host) +(tramp-pre-connection multi-method method user host tramp-chunksize) (tramp-message 7 Opening `%s' connection... multi-method) (let ((process-environment (copy-sequence process-environment))) (setenv TERM tramp-terminal-type) @@ -5810,7
Bug#306550: tramp: auto save errors
Michael Albinus [EMAIL PROTECTED] writes: Ferenc Wagner [EMAIL PROTECTED] writes: if I leave my editor idle for a while, I start getting a beep every 30 seconds accompanied with the message tramp-set-auto-save-file-modes: Wrong type argument: integerp, nil in my *Messages* buffer. Could you, please, evaluate (setq debug-on-error t) Then run the same test, and provide me with the backtrace. Debugger entered--Lisp error: (wrong-type-argument integerp nil) set-file-modes(/tmp/#diag.txt# nil) tramp-set-auto-save-file-modes() run-hooks(auto-save-hook) And really, set-file-modes is a built-in function. (set-file-modes FILENAME MODE) Set mode bits of file named FILENAME to MODE (an integer). Only the 12 low bits of MODE are used. Another useful test would be (file-modes name.of.the.tramp.file) (file-modes diag.txt) = nil (file-modes /tmp/#diag.txt#) = 436 -rw-rw-r-- 1 wferi wferi 0 2005-04-28 15:03 /tmp/#diag.txt# I'm glad to supply more information if needed. -- Feri. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#306550: tramp: auto save errors
Michael Albinus [EMAIL PROTECTED] writes: Ferenc Wagner [EMAIL PROTECTED] writes: Debugger entered--Lisp error: (wrong-type-argument integerp nil) set-file-modes(/tmp/#diag.txt# nil) tramp-set-auto-save-file-modes() run-hooks(auto-save-hook) And really, (file-modes diag.txt) = nil (file-modes /tmp/#diag.txt#) = 436 That's what I suspected. The fix would be simple (call `set-file-modes´ only when `file-modes´ returns non-nil). Nevertheless, I'm curious to know why (file-modes diag.txt) returned nil. Could you, please, give me the full Tramp file name of diag.txt? Mainly, I'm interested in the access method. Sure: /ssh:csoki:/home/wferi/anulus_reports/diag.txt The remote machine is FreeBSD 5.3-STABLE, btw. -- Feri.
Bug#306550: tramp: auto save errors
Package: tramp Version: 1:2.0.48-1 Severity: minor Hi, if I leave my editor idle for a while, I start getting a beep every 30 seconds accompanied with the message tramp-set-auto-save-file-modes: Wrong type argument: integerp, nil in my *Messages* buffer. Feri. -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing'), (50, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.10-1-k7 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages tramp depends on: ii emacs21 [emacsen] 21.4a-1The GNU Emacs editor -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#306550: tramp: auto save errors
Ferenc Wagner [EMAIL PROTECTED] writes: Hi, Hi, if I leave my editor idle for a while, I start getting a beep every 30 seconds accompanied with the message tramp-set-auto-save-file-modes: Wrong type argument: integerp, nil in my *Messages* buffer. Could you, please, evaluate (setq debug-on-error t) Then run the same test, and provide me with the backtrace. Another useful test would be (file-modes name.of.the.tramp.file) Feri. Thanks, and best regards, Michael. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]