Subject: Re: bug#13636: 24.3.50; tramp+ftp broken

From: Thierry Volpiatto <[email-masked]>
Date: Wed, 06 Feb 2013 16:58:01 +0100

Michael Albinus <[email-masked]> writes:

> Thierry Volpiatto <[email-masked]> writes:
>
>>> Hi Michael,
>
> Hi Thierry,
>
>> The strange thing is emacs say .netrc is modified and ask to save it
>> when quitting emacs but the file is not modified.
>> And anyway, why tramp/ange would want to modify this file ?
>
> Tramp does not touches .netrc. ange-ftp shouldn't either, and there
> haven't been recent changes I'm aware of.
>
> Hmm, unfortunately the most interesting part of the backtrace is byte
> code. Could you, please, remove all *.elc from the lisp/ directory (and
> subdirectories)? This might give us a better backtrace.
Still have some byte-code, but more informative though.

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  signal(wrong-type-argument (stringp nil))
  byte-code("\301@A\"\207" [err signal] 3)
  ange-ftp-hook-function(file-remote-p "/ftp:mafreebox.freebox.fr:" nil nil)
  apply(ange-ftp-hook-function file-remote-p ("/ftp:mafreebox.freebox.fr:" nil nil))
  (let* ((inhibit-file-name-handlers (list (quote tramp-file-name-handler) (quote tramp-completion-file-name-handler) (and (eq inhibit-file-name-operation operation) inhibit-file-name-handlers))) (inhibit-file-name-operation operation)) (apply (quote ange-ftp-hook-function) operation args))
  (cond ((memq operation (quote (file-directory-p file-exists-p))) (if (apply (quote ange-ftp-hook-function) operation args) (let ((v (tramp-dissect-file-name (car args) t))) (aset v 0 tramp-ftp-method) (tramp-set-connection-property v "started" t)) nil)) ((and (memq operation (quote (copy-file rename-file))) (file-remote-p (cadr args)) (not (tramp-ftp-file-name-p (cadr args)))) (let* ((filename (car args)) (newname (cadr args)) (tmpfile (tramp-compat-make-temp-file filename)) (args (cddr args))) (if (eq operation (quote copy-file)) (apply operation filename tmpfile t (cdr args)) (apply operation filename tmpfile t)) (unwind-protect (rename-file tmpfile newname (car args)) (condition-case nil (progn (delete-file tmpfile)) (error nil))))) (t (let* ((inhibit-file-name-handlers (list (quote tramp-file-name-handler) (quote tramp-completion-file-name-handler) (and (eq inhibit-file-name-operation operation) inhibit-file-name-handlers))) (inhibit-file-name-operation operation)) (apply (quote ange-ftp-hook-function) operation args))))
  (let ((ange-ftp-name-format (list (nth 0 tramp-file-name-structure) (nth 3 tramp-file-name-structure) (nth 2 tramp-file-name-structure) (nth 4 tramp-file-name-structure))) (ange-ftp-ftp-name-arg "") (ange-ftp-ftp-name-res nil)) (cond ((memq operation (quote (file-directory-p file-exists-p))) (if (apply (quote ange-ftp-hook-function) operation args) (let ((v (tramp-dissect-file-name ... t))) (aset v 0 tramp-ftp-method) (tramp-set-connection-property v "started" t)) nil)) ((and (memq operation (quote (copy-file rename-file))) (file-remote-p (cadr args)) (not (tramp-ftp-file-name-p (cadr args)))) (let* ((filename (car args)) (newname (cadr args)) (tmpfile (tramp-compat-make-temp-file filename)) (args (cddr args))) (if (eq operation (quote copy-file)) (apply operation filename tmpfile t (cdr args)) (apply operation filename tmpfile t)) (unwind-protect (rename-file tmpfile newname (car args)) (condition-case nil (progn (delete-file tmpfile)) (error nil))))) (t (let* ((inhibit-file-name-handlers (list (quote tramp-file-name-handler) (quote tramp-completion-file-name-handler) (and ... inhibit-file-name-handlers))) (inhibit-file-name-operation operation)) (apply (quote ange-ftp-hook-function) operation args)))))
  (progn (or (boundp (quote ange-ftp-name-format)) (let (file-name-handler-alist) (require (quote ange-ftp)))) (let ((ange-ftp-name-format (list (nth 0 tramp-file-name-structure) (nth 3 tramp-file-name-structure) (nth 2 tramp-file-name-structure) (nth 4 tramp-file-name-structure))) (ange-ftp-ftp-name-arg "") (ange-ftp-ftp-name-res nil)) (cond ((memq operation (quote (file-directory-p file-exists-p))) (if (apply (quote ange-ftp-hook-function) operation args) (let ((v ...)) (aset v 0 tramp-ftp-method) (tramp-set-connection-property v "started" t)) nil)) ((and (memq operation (quote (copy-file rename-file))) (file-remote-p (cadr args)) (not (tramp-ftp-file-name-p (cadr args)))) (let* ((filename (car args)) (newname (cadr args)) (tmpfile (tramp-compat-make-temp-file filename)) (args (cddr args))) (if (eq operation (quote copy-file)) (apply operation filename tmpfile t (cdr args)) (apply operation filename tmpfile t)) (unwind-protect (rename-file tmpfile newname (car args)) (condition-case nil (progn ...) (error nil))))) (t (let* ((inhibit-file-name-handlers (list ... ... ...)) (inhibit-file-name-operation operation)) (apply (quote ange-ftp-hook-function) operation args))))))
  (unwind-protect (progn (or (boundp (quote ange-ftp-name-format)) (let (file-name-handler-alist) (require (quote ange-ftp)))) (let ((ange-ftp-name-format (list (nth 0 tramp-file-name-structure) (nth 3 tramp-file-name-structure) (nth 2 tramp-file-name-structure) (nth 4 tramp-file-name-structure))) (ange-ftp-ftp-name-arg "") (ange-ftp-ftp-name-res nil)) (cond ((memq operation (quote (file-directory-p file-exists-p))) (if (apply (quote ange-ftp-hook-function) operation args) (let (...) (aset v 0 tramp-ftp-method) (tramp-set-connection-property v "started" t)) nil)) ((and (memq operation (quote ...)) (file-remote-p (cadr args)) (not (tramp-ftp-file-name-p ...))) (let* ((filename ...) (newname ...) (tmpfile ...) (args ...)) (if (eq operation ...) (apply operation filename tmpfile t ...) (apply operation filename tmpfile t)) (unwind-protect (rename-file tmpfile newname ...) (condition-case nil ... ...)))) (t (let* ((inhibit-file-name-handlers ...) (inhibit-file-name-operation operation)) (apply (quote ange-ftp-hook-function) operation args)))))) (set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn (or (boundp (quote ange-ftp-name-format)) (let (file-name-handler-alist) (require (quote ange-ftp)))) (let ((ange-ftp-name-format (list (nth 0 tramp-file-name-structure) (nth 3 tramp-file-name-structure) (nth 2 tramp-file-name-structure) (nth 4 tramp-file-name-structure))) (ange-ftp-ftp-name-arg "") (ange-ftp-ftp-name-res nil)) (cond ((memq operation (quote ...)) (if (apply ... operation args) (let ... ... ...) nil)) ((and (memq operation ...) (file-remote-p ...) (not ...)) (let* (... ... ... ...) (if ... ... ...) (unwind-protect ... ...))) (t (let* (... ...) (apply ... operation args)))))) (set-match-data save-match-data-internal (quote evaporate))))
  tramp-ftp-file-name-handler(file-remote-p "/ftp:mafreebox.freebox.fr:" nil nil)
  apply(tramp-ftp-file-name-handler file-remote-p ("/ftp:mafreebox.freebox.fr:" nil nil))
  (catch (quote suppress) (apply foreign operation args))
  (catch (quote non-essential) (catch (quote suppress) (apply foreign operation args)))
  (setq result (catch (quote non-essential) (catch (quote suppress) (apply foreign operation args))))
  (let ((sf (symbol-function foreign)) result) (if (and (listp sf) (eq (car sf) (quote autoload))) (progn (let ((default-directory (tramp-compat-temporary-file-directory))) (load (cadr sf) (quote noerror) (quote nomessage))))) (setq result (catch (quote non-essential) (catch (quote suppress) (apply foreign operation args)))) (cond ((eq result (quote non-essential)) (tramp-message v 5 "Non-essential received in operation %s" (append (list operation) args)) (tramp-run-real-handler operation args)) ((eq result (quote suppress)) (let (tramp-message-show-message) (tramp-message v 1 "Suppress received in operation %s" (append (list operation) args)) (tramp-cleanup v) (tramp-run-real-handler operation args))) (t result)))
  (condition-case err (let ((sf (symbol-function foreign)) result) (if (and (listp sf) (eq (car sf) (quote autoload))) (progn (let ((default-directory (tramp-compat-temporary-file-directory))) (load (cadr sf) (quote noerror) (quote nomessage))))) (setq result (catch (quote non-essential) (catch (quote suppress) (apply foreign operation args)))) (cond ((eq result (quote non-essential)) (tramp-message v 5 "Non-essential received in operation %s" (append (list operation) args)) (tramp-run-real-handler operation args)) ((eq result (quote suppress)) (let (tramp-message-show-message) (tramp-message v 1 "Suppress received in operation %s" (append (list operation) args)) (tramp-cleanup v) (tramp-run-real-handler operation args))) (t result))) ((debug debug quit) (let (tramp-message-show-message) (tramp-message v 1 "Interrupt received in operation %s" (append (list operation) args))) (signal (car err) (cdr err))) ((debug error) (cond ((and completion (zerop (length localname)) (memq operation (quote (file-exists-p file-directory-p)))) t) ((and completion (zerop (length localname)) (memq operation (quote (expand-file-name file-name-as-directory)))) filename) (t (signal (car err) (cdr err))))))
  (if foreign (condition-case err (let ((sf (symbol-function foreign)) result) (if (and (listp sf) (eq (car sf) (quote autoload))) (progn (let ((default-directory ...)) (load (cadr sf) (quote noerror) (quote nomessage))))) (setq result (catch (quote non-essential) (catch (quote suppress) (apply foreign operation args)))) (cond ((eq result (quote non-essential)) (tramp-message v 5 "Non-essential received in operation %s" (append (list operation) args)) (tramp-run-real-handler operation args)) ((eq result (quote suppress)) (let (tramp-message-show-message) (tramp-message v 1 "Suppress received in operation %s" (append ... args)) (tramp-cleanup v) (tramp-run-real-handler operation args))) (t result))) ((debug debug quit) (let (tramp-message-show-message) (tramp-message v 1 "Interrupt received in operation %s" (append (list operation) args))) (signal (car err) (cdr err))) ((debug error) (cond ((and completion (zerop (length localname)) (memq operation (quote ...))) t) ((and completion (zerop (length localname)) (memq operation (quote ...))) filename) (t (signal (car err) (cdr err)))))) (tramp-run-real-handler operation args))
  (let* ((v (tramp-dissect-file-name filename)) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if foreign (condition-case err (let ((sf (symbol-function foreign)) result) (if (and (listp sf) (eq (car sf) (quote autoload))) (progn (let (...) (load ... ... ...)))) (setq result (catch (quote non-essential) (catch (quote suppress) (apply foreign operation args)))) (cond ((eq result (quote non-essential)) (tramp-message v 5 "Non-essential received in operation %s" (append ... args)) (tramp-run-real-handler operation args)) ((eq result (quote suppress)) (let (tramp-message-show-message) (tramp-message v 1 "Suppress received in operation %s" ...) (tramp-cleanup v) (tramp-run-real-handler operation args))) (t result))) ((debug debug quit) (let (tramp-message-show-message) (tramp-message v 1 "Interrupt received in operation %s" (append (list operation) args))) (signal (car err) (cdr err))) ((debug error) (cond ((and completion (zerop ...) (memq operation ...)) t) ((and completion (zerop ...) (memq operation ...)) filename) (t (signal (car err) (cdr err)))))) (tramp-run-real-handler operation args)))
  (let* ((filename (tramp-replace-environment-variables (apply (quote tramp-file-name-for-operation) operation args))) (completion (tramp-completion-mode-p)) (foreign (tramp-find-foreign-file-name-handler filename))) (let* ((v (tramp-dissect-file-name filename)) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if foreign (condition-case err (let ((sf (symbol-function foreign)) result) (if (and (listp sf) (eq ... ...)) (progn (let ... ...))) (setq result (catch (quote non-essential) (catch ... ...))) (cond ((eq result ...) (tramp-message v 5 "Non-essential received in operation %s" ...) (tramp-run-real-handler operation args)) ((eq result ...) (let ... ... ... ...)) (t result))) ((debug debug quit) (let (tramp-message-show-message) (tramp-message v 1 "Interrupt received in operation %s" (append ... args))) (signal (car err) (cdr err))) ((debug error) (cond ((and completion ... ...) t) ((and completion ... ...) filename) (t (signal ... ...))))) (tramp-run-real-handler operation args))))
  (progn (let* ((filename (tramp-replace-environment-variables (apply (quote tramp-file-name-for-operation) operation args))) (completion (tramp-completion-mode-p)) (foreign (tramp-find-foreign-file-name-handler filename))) (let* ((v (tramp-dissect-file-name filename)) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if foreign (condition-case err (let ((sf ...) result) (if (and ... ...) (progn ...)) (setq result (catch ... ...)) (cond (... ... ...) (... ...) (t result))) ((debug debug quit) (let (tramp-message-show-message) (tramp-message v 1 "Interrupt received in operation %s" ...)) (signal (car err) (cdr err))) ((debug error) (cond (... t) (... filename) (t ...)))) (tramp-run-real-handler operation args)))))
  (unwind-protect (progn (let* ((filename (tramp-replace-environment-variables (apply (quote tramp-file-name-for-operation) operation args))) (completion (tramp-completion-mode-p)) (foreign (tramp-find-foreign-file-name-handler filename))) (let* ((v (tramp-dissect-file-name filename)) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if foreign (condition-case err (let (... result) (if ... ...) (setq result ...) (cond ... ... ...)) ((debug debug quit) (let ... ...) (signal ... ...)) ((debug error) (cond ... ... ...))) (tramp-run-real-handler operation args))))) (set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let* ((filename (tramp-replace-environment-variables (apply ... operation args))) (completion (tramp-completion-mode-p)) (foreign (tramp-find-foreign-file-name-handler filename))) (let* ((v (tramp-dissect-file-name filename)) (method (tramp-file-name-method v)) (user (tramp-file-name-user v)) (host (tramp-file-name-host v)) (localname (tramp-file-name-localname v)) (hop (tramp-file-name-hop v))) (if foreign (condition-case err (let ... ... ... ...) (... ... ...) (... ...)) (tramp-run-real-handler operation args))))) (set-match-data save-match-data-internal (quote evaporate))))
  (if tramp-mode (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let* ((filename (tramp-replace-environment-variables ...)) (completion (tramp-completion-mode-p)) (foreign (tramp-find-foreign-file-name-handler filename))) (let* ((v ...) (method ...) (user ...) (host ...) (localname ...) (hop ...)) (if foreign (condition-case err ... ... ...) (tramp-run-real-handler operation args))))) (set-match-data save-match-data-internal (quote evaporate)))) (tramp-run-real-handler operation args))
  tramp-file-name-handler(file-remote-p "/ftp:mafreebox.freebox.fr:" nil nil)
  file-remote-p("/ftp:mafreebox.freebox.fr:" nil nil)
  apply(file-remote-p ("/ftp:mafreebox.freebox.fr:" nil nil))
  (let* ((inhibit-file-name-handlers (cons (quote tramp-completion-file-name-handler) (cons (quote cygwin-mount-name-hook-function) (cons (quote cygwin-mount-map-drive-hook-function) (and (eq inhibit-file-name-operation operation) inhibit-file-name-handlers))))) (inhibit-file-name-operation operation)) (apply operation args))
  tramp-completion-run-real-handler(file-remote-p ("/ftp:mafreebox.freebox.fr:" nil nil))
  (if (and fn tramp-mode (or (eq tramp-syntax (quote sep)) (featurep (quote tramp)) (and (boundp (quote partial-completion-mode)) (symbol-value (quote partial-completion-mode))) (featurep (quote ido)) (featurep (quote icicles)))) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (apply (cdr fn) args)) (set-match-data save-match-data-internal (quote evaporate)))) (tramp-completion-run-real-handler operation args))
  (let ((directory-sep-char 47) (fn (assoc operation tramp-completion-file-name-handler-alist))) (if (and fn tramp-mode (or (eq tramp-syntax (quote sep)) (featurep (quote tramp)) (and (boundp (quote partial-completion-mode)) (symbol-value (quote partial-completion-mode))) (featurep (quote ido)) (featurep (quote icicles)))) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (apply (cdr fn) args)) (set-match-data save-match-data-internal (quote evaporate)))) (tramp-completion-run-real-handler operation args)))
  tramp-completion-file-name-handler(file-remote-p "/ftp:mafreebox.freebox.fr:" nil nil)
  file-remote-p("/ftp:mafreebox.freebox.fr:")
  (if (file-remote-p (if (or (subrp (quote buffer-substring-no-properties)) (functionp (quote buffer-substring-no-properties))) (progn (with-no-warnings (funcall (quote buffer-substring-no-properties) end (point-max)))))) (progn (save-excursion (save-restriction (narrow-to-region (1+ (or (string-match tramp-rfn-eshadow-update-overlay-regexp ... end) end)) (point-max)) (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay) (rfn-eshadow-update-overlay-hook nil) file-name-handler-alist) (if (or (subrp ...) (functionp ...)) (progn (with-no-warnings ...))) (if (or (subrp ...) (functionp ...)) (progn (with-no-warnings ...))))))))
  (let ((end (or (if (or (subrp (quote overlay-end)) (functionp (quote overlay-end))) (progn (with-no-warnings (funcall ... ...)))) (if (or (subrp (quote minibuffer-prompt-end)) (functionp (quote minibuffer-prompt-end))) (progn (with-no-warnings (funcall ...)))))) (non-essential t)) (if (file-remote-p (if (or (subrp (quote buffer-substring-no-properties)) (functionp (quote buffer-substring-no-properties))) (progn (with-no-warnings (funcall (quote buffer-substring-no-properties) end (point-max)))))) (progn (save-excursion (save-restriction (narrow-to-region (1+ (or ... end)) (point-max)) (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay) (rfn-eshadow-update-overlay-hook nil) file-name-handler-alist) (if (or ... ...) (progn ...)) (if (or ... ...) (progn ...))))))))
  (progn (let ((end (or (if (or (subrp ...) (functionp ...)) (progn (with-no-warnings ...))) (if (or (subrp ...) (functionp ...)) (progn (with-no-warnings ...))))) (non-essential t)) (if (file-remote-p (if (or (subrp (quote buffer-substring-no-properties)) (functionp (quote buffer-substring-no-properties))) (progn (with-no-warnings (funcall ... end ...))))) (progn (save-excursion (save-restriction (narrow-to-region (1+ ...) (point-max)) (let (... ... file-name-handler-alist) (if ... ...) (if ... ...))))))))
  (condition-case nil (progn (let ((end (or (if (or ... ...) (progn ...)) (if (or ... ...) (progn ...)))) (non-essential t)) (if (file-remote-p (if (or (subrp ...) (functionp ...)) (progn (with-no-warnings ...)))) (progn (save-excursion (save-restriction (narrow-to-region ... ...) (let ... ... ...))))))) (error nil))
  tramp-rfn-eshadow-update-overlay()
  run-hooks(rfn-eshadow-update-overlay-hook)
  byte-code("\306\307 !\310!\311 d\312\f\203?\f\n=\204*
\fT\211\313\314\315\217\232*\204?\f=\204\215
\f\211\313\314\315\217\232*\204\215T\nW\204f\nTdW\203\206
\nT\211\313\314\315\217\232*\203\206\nTd\211\203\206\n\\\316\245
\f\211\313\314\315\217\232*\203\201\f\211\202@\f\202?\317\311 #\210\320\321!-\207" [rfn-eshadow-overlay non-essential end start mid goal substitute-in-file-name minibuffer-contents overlay-end minibuffer-prompt-end t nil (byte-code "\301\302d\"!\207" [pos substitute-in-file-name buffer-substring-no-properties] 4) ((error)) 2 move-overlay run-hooks rfn-eshadow-update-overlay-hook pos] 6)
  rfn-eshadow-update-overlay()
  read-from-minibuffer("Find file: " "~/tmp/emacs-savanah-git/" (keymap (keymap (32)) keymap (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions") "Minibuf")) (27 keymap (118 . switch-to-completions)) (prior . switch-to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-complete-word) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the minibuffer") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuffer") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . abort-recursive-edit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-history-element) (next . next-history-element) (27 keymap (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil file-name-history "~/tmp/emacs-savanah-git/" nil)
  completing-read-default("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/emacs-savanah-git/" file-name-history "~/tmp/emacs-savanah-git/" nil)
  completing-read("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/emacs-savanah-git/" file-name-history "~/tmp/emacs-savanah-git/")
  read-file-name-default("Find file: " nil "~/tmp/emacs-savanah-git/" confirm-after-completion nil nil)
  read-file-name("Find file: " nil "~/tmp/emacs-savanah-git/" confirm-after-completion)
  find-file-read-args("Find file: " confirm-after-completion)
  byte-code("\300\301\302 \"\207" [find-file-read-args "Find file: " confirm-nonexistent-file-or-buffer] 3)
  call-interactively(find-file nil nil)
--8<---------------cut here---------------end--------------->8---

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997