GNU bug report logs - #11808
IDO fails with tramp /ftp:

Previous Next

Package: emacs;

Reported by: Vitalie Spinu <spinuvit <at> gmail.com>

Date: Thu, 28 Jun 2012 13:45:01 UTC

Severity: normal

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11808 in the body.
You can then email your comments to 11808 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11808; Package emacs. (Thu, 28 Jun 2012 13:45:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vitalie Spinu <spinuvit <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 28 Jun 2012 13:45:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vitalie Spinu <spinuvit <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: IDO fails with tramp /ftp:
Date: Thu, 28 Jun 2012 15:39:28 +0200
Hi, 

When I try to access ftp through ido I am getting on 24.1.50.1 

Debugger entered--Lisp error: (file-error "Opening directory" "no such file or directory" "/ftp:anonymous <at> cran.r-project.org:./")
  signal(file-error ("Opening directory" "no such file or directory" "/ftp:anonymous <at> cran.r-project.org:./"))
  byte-code("\301@A\"\207" [err signal] 3)
  ange-ftp-hook-function(file-name-all-completions "" "/ftp:anonymous <at> cran.r-project.org:./")
  apply(ange-ftp-hook-function file-name-all-completions ("" "/ftp:anonymous <at> cran.r-project.org:./"))
  tramp-ftp-file-name-handler(file-name-all-completions "" "/ftp:anonymous <at> cran.r-project.org:./")
  apply(tramp-ftp-file-name-handler file-name-all-completions ("" "/ftp:anonymous <at> cran.r-project.org:./"))
  byte-code("\300\301\215\207" [suppress (apply foreign operation args)] 2)
  #[nil "K\306\211<\203\240\n@\307=\203\240\306\310\311!\203\"\312\311\313N@!\202\221\314\315!\2039\316\315!\2044\317\315!\205\221\315 \202\221\320\321!\211\205D\322\f!)\203P\323\320\321!!\202\221\320\324!\211\205[\322\f!)\203g\323\320\324!!\202\221\320\325!\211\205r\322\f!)\203~\323\320\325!!\202\221\326\327!\203\212\323\327!\202\221\330\331!\210\323\332!)\333\n\211*A@)\334\335#\210)\336\337\215\211\336=\203\315+\340\341\342,C-\"C-./0\306\343\344\217,\210\345,-\"\202	\346=\203\377\3061+\347\350\342,C-\"C-./0\306\343\344\217,\210\351+!\210\345,-\")\202	*\207" [foreign result sf file-name-handler-alist d default-directory nil autoload boundp temporary-file-directory eval standard-value fboundp temp-directory subrp functionp getenv "TEMP" file-directory-p file-name-as-directory "TMP" "TMPDIR" file-exists-p "c:/temp" message "Neither `temporary-file-directory' nor `temp-directory' is defined -- using /tmp." "/tmp" load noerror nomessage non-essential (byte-code "\300\301\215\207" [suppress (apply foreign operation args)] 2) 5 "Non-essential received in operation %s" append (byte-code "	X\205}\306 \307\216\203;\310X\203;\311\312\313U\203!\314\2026\315U\203+\314\2026\316U\2035\317\2026\320\fP#\210	\321Y\205|\203d\322!\203d\323\324!!\203dr\324!q\210\325!)\205|\326!\205|\311\327\330\331\"\fP$*\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string args match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp buffer-name process-buffer tramp-dissect-file-name vectorp tramp-debug-message format "(%d) # " vec-or-proc default-directory] 6) ((error)) tramp-run-real-handler suppress 1 "Suppress received in operation %s" tramp-cleanup x v operation args fmt-string level vec-or-proc tramp-message-show-message] 7]()
  tramp-file-name-handler(file-name-all-completions "" "/ftp:anonymous <at> cran.r-project.org:./")
  file-name-all-completions("" "/ftp:anonymous <at> cran.r-project.org:./")
  ido-file-name-all-completions-1("/ftp:anonymous <at> cran.r-project.org:")
  ido-file-name-all-completions("/ftp:anonymous <at> cran.r-project.org:")
  ido-make-file-list-1("/ftp:anonymous <at> cran.r-project.org:")
  ido-make-file-list("incoming/")
  ido-read-internal(file "Find file: " ido-file-history nil confirm-after-completion nil)
  ido-file-internal(raise-frame)
  ido-find-file()
  call-interactively(ido-find-file nil nil)


How to reproduce:

M-x ido-mode

C-x f /ftp:anonymous <at> cran.r-project.org:

This doesn't happen with emacs 23. It also works fine without IDO on
emacs 24.

Any ideas?


Vitalie.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11808; Package emacs. (Thu, 28 Jun 2012 14:52:01 GMT) Full text and rfc822 format available.

Message #8 received at 11808 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Vitalie Spinu <spinuvit <at> gmail.com>
Cc: 11808 <at> debbugs.gnu.org
Subject: Re: bug#11808: IDO fails with tramp /ftp:
Date: Thu, 28 Jun 2012 16:46:51 +0200
Vitalie Spinu <spinuvit <at> gmail.com> writes:

> Hi, 

Hi,

> How to reproduce:
>
> M-x ido-mode
>
> C-x f /ftp:anonymous <at> cran.r-project.org:
>
> This doesn't happen with emacs 23. It also works fine without IDO on
> emacs 24.
>
> Any ideas?

Does the following patch helps?

--8<---------------cut here---------------start------------->8---
*** /usr/local/src/emacs/lisp/net/ange-ftp.el.~108784~   2012-06-28 16:41:24.871729482 +0200
--- /usr/local/src/emacs/lisp/net/ange-ftp.el          2012-06-28 16:40:38.101623909 +0200
***************
*** 3969,3978 ****
       (string-match "\\`[a-zA-Z]:[/\\]\\'" dir))
        (string-equal "/" dir)))
  
  (defun ange-ftp-file-name-all-completions (file dir)
    (let ((ange-ftp-this-dir (expand-file-name dir)))
      (if (ange-ftp-ftp-name ange-ftp-this-dir)
!     (progn
        (ange-ftp-barf-if-not-directory ange-ftp-this-dir)
          (setq ange-ftp-this-dir
                (ange-ftp-real-file-name-as-directory ange-ftp-this-dir))
--- 3969,3983 ----
       (string-match "\\`[a-zA-Z]:[/\\]\\'" dir))
        (string-equal "/" dir)))
  
+ (defmacro ange-ftp-ignore-errors-if-non-essential (&rest body)
+   `(if non-essential
+        (ignore-errors ,@body)
+      (progn ,@body)))
+ 
  (defun ange-ftp-file-name-all-completions (file dir)
    (let ((ange-ftp-this-dir (expand-file-name dir)))
      (if (ange-ftp-ftp-name ange-ftp-this-dir)
!     (ange-ftp-ignore-errors-if-non-essential
        (ange-ftp-barf-if-not-directory ange-ftp-this-dir)
          (setq ange-ftp-this-dir
                (ange-ftp-real-file-name-as-directory ange-ftp-this-dir))
--8<---------------cut here---------------end--------------->8---

> Vitalie.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11808; Package emacs. (Thu, 28 Jun 2012 16:06:02 GMT) Full text and rfc822 format available.

Message #11 received at 11808 <at> debbugs.gnu.org (full text, mbox):

From: Vitalie Spinu <spinuvit <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 11808 <at> debbugs.gnu.org
Subject: Re: bug#11808: IDO fails with tramp /ftp:
Date: Thu, 28 Jun 2012 18:01:32 +0200
I cannot apply to my local emacs git repo 

   $ patch --verbose -p5 < patch
   Hmm...  Looks like a new-style context diff to me...
   The text leading up to this was:
   --------------------------
   |*** /usr/local/src/emacs/lisp/net/ange-ftp.el.~108784~   2012-06-28 16:41:24.871729482 +0200
   |--- /usr/local/src/emacs/lisp/net/ange-ftp.el          2012-06-28 16:40:38.101623909 +0200
   --------------------------
   Patching file lisp/net/ange-ftp.el using Plan A...
   Hunk #1 FAILED at 3969.
   1 out of 1 hunk FAILED -- saving rejects to file lisp/net/ange-ftp.el.rej
   done

??

Vitalie.
 
  >> Michael Albinus <michael.albinus <at> gmx.de>
  >> on Thu, 28 Jun 2012 16:46:51 +0200 wrote:

  > Vitalie Spinu <spinuvit <at> gmail.com> writes:

  >> Hi, 

  > Hi,

  >> How to reproduce:
  >> 
  >> M-x ido-mode
  >> 
  >> C-x f /ftp:anonymous <at> cran.r-project.org:
  >> 
  >> This doesn't happen with emacs 23. It also works fine without IDO on
  >> emacs 24.
  >> 
  >> Any ideas?

  > Does the following patch helps?


  > *** /usr/local/src/emacs/lisp/net/ange-ftp.el.~108784~   2012-06-28 16:41:24.871729482 +0200
  > --- /usr/local/src/emacs/lisp/net/ange-ftp.el          2012-06-28 16:40:38.101623909 +0200
  > ***************
  > *** 3969,3978 ****
  >        (string-match "\\`[a-zA-Z]:[/\\]\\'" dir))
  >         (string-equal "/" dir)))

  >   (defun ange-ftp-file-name-all-completions (file dir)
  >     (let ((ange-ftp-this-dir (expand-file-name dir)))
  >       (if (ange-ftp-ftp-name ange-ftp-this-dir)
  > !     (progn
  >         (ange-ftp-barf-if-not-directory ange-ftp-this-dir)
  >           (setq ange-ftp-this-dir
  >                 (ange-ftp-real-file-name-as-directory ange-ftp-this-dir))
  > --- 3969,3983 ----
  >        (string-match "\\`[a-zA-Z]:[/\\]\\'" dir))
  >         (string-equal "/" dir)))

  > + (defmacro ange-ftp-ignore-errors-if-non-essential (&rest body)
  > +   `(if non-essential
  > +        (ignore-errors ,@body)
  > +      (progn ,@body)))
  > + 
  >   (defun ange-ftp-file-name-all-completions (file dir)
  >     (let ((ange-ftp-this-dir (expand-file-name dir)))
  >       (if (ange-ftp-ftp-name ange-ftp-this-dir)
  > !     (ange-ftp-ignore-errors-if-non-essential
  >         (ange-ftp-barf-if-not-directory ange-ftp-this-dir)
  >           (setq ange-ftp-this-dir
  >                 (ange-ftp-real-file-name-as-directory ange-ftp-this-dir))


  >> Vitalie.

  > Best regards, Michael.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11808; Package emacs. (Thu, 28 Jun 2012 16:14:01 GMT) Full text and rfc822 format available.

Message #14 received at 11808 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus  <michael.albinus <at> gmx.de>
To: Vitalie Spinu <spinuvit <at> gmail.com>
Cc: 11808 <at> debbugs.gnu.org
Subject: Re: bug#11808: IDO fails with tramp /ftp:
Date: Thu, 28 Jun 2012 18:09:10 +0200
The patch is produced with plain ediff. Can you apply it manually? I can't produce another one, I'm on the road just now.

Best regards, Michael. 

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11808; Package emacs. (Thu, 28 Jun 2012 16:35:01 GMT) Full text and rfc822 format available.

Message #17 received at 11808 <at> debbugs.gnu.org (full text, mbox):

From: Vitalie Spinu <spinuvit <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 11808 <at> debbugs.gnu.org
Subject: Re: bug#11808: IDO fails with tramp /ftp:
Date: Thu, 28 Jun 2012 18:30:28 +0200
  >> Michael Albinus  <michael.albinus <at> gmx.de>
  >> on Thu, 28 Jun 2012 18:09:10 +0200 wrote:

  > The patch is produced with plain ediff. Can you apply it manually? I can't produce another one, I'm on the road just now.
  > Best regards, Michael. 

Nope doesn't work with eddif-patch-file either. I guess diff got
corrupted. I don't understand the output. What does ! at bol mean?






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11808; Package emacs. (Thu, 28 Jun 2012 17:55:02 GMT) Full text and rfc822 format available.

Message #20 received at 11808 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Vitalie Spinu <spinuvit <at> gmail.com>
Cc: 11808 <at> debbugs.gnu.org
Subject: Re: bug#11808: IDO fails with tramp /ftp:
Date: Thu, 28 Jun 2012 19:49:38 +0200
Vitalie Spinu <spinuvit <at> gmail.com> writes:

> Nope doesn't work with eddif-patch-file either. I guess diff got
> corrupted. I don't understand the output. What does ! at bol mean?

"Line changed".

Don't worry, I'll produce a new patch tomorrow (or I'll send you the
whole ange-ftp.el).

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11808; Package emacs. (Thu, 28 Jun 2012 18:22:02 GMT) Full text and rfc822 format available.

Message #23 received at 11808 <at> debbugs.gnu.org (full text, mbox):

From: Vitalie Spinu <spinuvit <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 11808 <at> debbugs.gnu.org
Subject: Re: bug#11808: IDO fails with tramp /ftp:
Date: Thu, 28 Jun 2012 20:16:47 +0200
  >> Michael Albinus <michael.albinus <at> gmx.de>
  >> on Thu, 28 Jun 2012 19:49:38 +0200 wrote:

  > Vitalie Spinu <spinuvit <at> gmail.com> writes:
  >> Nope doesn't work with eddif-patch-file either. I guess diff got
  >> corrupted. I don't understand the output. What does ! at bol mean?

  > "Line changed".

Ok. I got it. So I inserted the changes manually and it indeed doesn't
through an error anymore. But the behavior of ftp completions is
changed.

The first time I invoke /ftp:user <at> host: it says [No Match] (previously
it would request completions of /ftp:user <at> host: directories and show
them all). But, on the second invocation the list of directories is
displayed properly. May be something should be tweaked on IDO side?


  > Don't worry, I'll produce a new patch tomorrow (or I'll send you the
  > whole ange-ftp.el).

Sorry, I will be on leave for 10 days, from tomorrow, without access to
my computers.

Thanks, 
Vitalie.




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Fri, 29 Jun 2012 07:24:01 GMT) Full text and rfc822 format available.

Notification sent to Vitalie Spinu <spinuvit <at> gmail.com>:
bug acknowledged by developer. (Fri, 29 Jun 2012 07:24:02 GMT) Full text and rfc822 format available.

Message #28 received at 11808-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Vitalie Spinu <spinuvit <at> gmail.com>
Cc: 11808-done <at> debbugs.gnu.org
Subject: Re: bug#11808: IDO fails with tramp /ftp:
Date: Fri, 29 Jun 2012 09:18:55 +0200
Vitalie Spinu <spinuvit <at> gmail.com> writes:

> The first time I invoke /ftp:user <at> host: it says [No Match] (previously
> it would request completions of /ftp:user <at> host: directories and show
> them all). But, on the second invocation the list of directories is
> displayed properly. May be something should be tweaked on IDO side?

There was a subtle change in completion of remote files. As long as you
type the remote host identification, it doesn't complete for that host
if there isn't an established connection yet. The reason is, that people
felt disturbed by error messages or password requests, even when they
have mistyped something and didn't want to connect yet.

When you start to type a local file name of that remote host (start with
"/"), completion shall work as expected in ido.

> Sorry, I will be on leave for 10 days, from tomorrow, without access to
> my computers.

I believe the behaviour is correct now, after that change. I'm closing
the bug. Feel free to to continue discussion, if you believe it doesn't
work correctly.

> Thanks,
> Vitalie.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11808; Package emacs. (Fri, 29 Jun 2012 07:48:01 GMT) Full text and rfc822 format available.

Message #31 received at 11808 <at> debbugs.gnu.org (full text, mbox):

From: John Wiegley <johnw <at> newartisans.com>
To: 11808 <at> debbugs.gnu.org
Cc: michael.albinus <at> gmx.de
Subject: Re: bug#11808: IDO fails with tramp /ftp:
Date: Fri, 29 Jun 2012 02:42:46 -0500
>>>>> Michael Albinus <michael.albinus <at> gmx.de> writes:

> There was a subtle change in completion of remote files. As long as you type
> the remote host identification, it doesn't complete for that host if there
> isn't an established connection yet. The reason is, that people felt
> disturbed by error messages or password requests, even when they have
> mistyped something and didn't want to connect yet.

And I must say, I strongly prefer the new behavior, thanks Michael.

John




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 27 Jul 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 23 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.