Vitalie Spinu | 28 Jun 2012 15:39
Picon
Gravatar

bug#11808: IDO fails with tramp /ftp:


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 <at> 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 <at> \307=\203\240\306\310\311!\203\"\312\311\313N <at> !\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 <at> )\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:./")
(Continue reading)

Michael Albinus | 28 Jun 2012 16:46
Picon
Picon
Gravatar

bug#11808: IDO fails with tramp /ftp:

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)
(Continue reading)

Vitalie Spinu | 28 Jun 2012 18:01
Picon
Gravatar

bug#11808: IDO fails with tramp /ftp:


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:
  >> 
(Continue reading)

Michael Albinus | 28 Jun 2012 18:09
Picon
Picon
Gravatar

bug#11808: IDO fails with tramp /ftp:

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. 
Vitalie Spinu | 28 Jun 2012 18:30
Picon
Gravatar

bug#11808: IDO fails with tramp /ftp:

  >> 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?

Michael Albinus | 28 Jun 2012 19:49
Picon
Picon
Gravatar

bug#11808: IDO fails with tramp /ftp:

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.

Vitalie Spinu | 28 Jun 2012 20:16
Picon
Gravatar

bug#11808: IDO fails with tramp /ftp:

  >> 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.

Michael Albinus | 29 Jun 2012 09:18
Picon
Picon
Gravatar

bug#11808: IDO fails with tramp /ftp:

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.

John Wiegley | 29 Jun 2012 09:42
Gravatar

bug#11808: IDO fails with tramp /ftp:

>>>>> 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


Gmane