unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11808: IDO fails with tramp /ftp:
@ 2012-06-28 13:39 Vitalie Spinu
  2012-06-28 14:46 ` Michael Albinus
  2012-06-28 16:09 ` Michael Albinus
  0 siblings, 2 replies; 9+ messages in thread
From: Vitalie Spinu @ 2012-06-28 13:39 UTC (permalink / raw)
  To: 11808


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@cran.r-project.org:./")
  signal(file-error ("Opening directory" "no such file or directory" "/ftp:anonymous@cran.r-project.org:./"))
  byte-code("\301\b@\bA\"\207" [err signal] 3)
  ange-ftp-hook-function(file-name-all-completions "" "/ftp:anonymous@cran.r-project.org:./")
  apply(ange-ftp-hook-function file-name-all-completions ("" "/ftp:anonymous@cran.r-project.org:./"))
  tramp-ftp-file-name-handler(file-name-all-completions "" "/ftp:anonymous@cran.r-project.org:./")
  apply(tramp-ftp-file-name-handler file-name-all-completions ("" "/ftp:anonymous@cran.r-project.org:./"))
  byte-code("\300\301\215\207" [suppress (apply foreign operation args)] 2)
  #[nil "\bK\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\x0e+\340\341\342,C-\"C-./0\306\343\344\217,\210\345,-\"\202\x01	\346=\203\377\3061+\347\350\342,C-\"C-./0\306\343\344\217,\210\351+!\210\345,-\")\202\x01	*\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 "\b	X\205}\306 \307\216\v\203;\b\310X\203;\311\312\b\313U\203!\314\2026\b\315U\203+\314\2026\b\316U\2035\317\2026\320\fP#\210	\321Y\205|\x0e\203d\322\x1a!\203d\323\324\x1a!!\203dr\324\x1a!q\210\325^[!\x1a)\x1a\205|\326\x1a!\205|\311\327\x1a\330\331\b\"\fP$*\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string args match-data ((byte-code "\301\b\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@cran.r-project.org:./")
  file-name-all-completions("" "/ftp:anonymous@cran.r-project.org:./")
  ido-file-name-all-completions-1("/ftp:anonymous@cran.r-project.org:")
  ido-file-name-all-completions("/ftp:anonymous@cran.r-project.org:")
  ido-make-file-list-1("/ftp:anonymous@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@cran.r-project.org:

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

Any ideas?


Vitalie.







^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11808: IDO fails with tramp /ftp:
  2012-06-28 13:39 bug#11808: IDO fails with tramp /ftp: Vitalie Spinu
@ 2012-06-28 14:46 ` Michael Albinus
  2012-06-28 16:01   ` Vitalie Spinu
  2012-06-28 16:09 ` Michael Albinus
  1 sibling, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2012-06-28 14:46 UTC (permalink / raw)
  To: Vitalie Spinu; +Cc: 11808

Vitalie Spinu <spinuvit@gmail.com> writes:

> Hi, 

Hi,

> How to reproduce:
>
> M-x ido-mode
>
> C-x f /ftp:anonymous@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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11808: IDO fails with tramp /ftp:
  2012-06-28 14:46 ` Michael Albinus
@ 2012-06-28 16:01   ` Vitalie Spinu
  0 siblings, 0 replies; 9+ messages in thread
From: Vitalie Spinu @ 2012-06-28 16:01 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 11808


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@gmx.de>
  >> on Thu, 28 Jun 2012 16:46:51 +0200 wrote:

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

  >> Hi, 

  > Hi,

  >> How to reproduce:
  >> 
  >> M-x ido-mode
  >> 
  >> C-x f /ftp:anonymous@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.






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11808: IDO fails with tramp /ftp:
  2012-06-28 13:39 bug#11808: IDO fails with tramp /ftp: Vitalie Spinu
  2012-06-28 14:46 ` Michael Albinus
@ 2012-06-28 16:09 ` Michael Albinus
  2012-06-28 16:30   ` Vitalie Spinu
  1 sibling, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2012-06-28 16:09 UTC (permalink / raw)
  To: Vitalie Spinu; +Cc: 11808

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. 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11808: IDO fails with tramp /ftp:
  2012-06-28 16:09 ` Michael Albinus
@ 2012-06-28 16:30   ` Vitalie Spinu
  2012-06-28 17:49     ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Vitalie Spinu @ 2012-06-28 16:30 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 11808

  >> Michael Albinus  <michael.albinus@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?







^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11808: IDO fails with tramp /ftp:
  2012-06-28 16:30   ` Vitalie Spinu
@ 2012-06-28 17:49     ` Michael Albinus
  2012-06-28 18:16       ` Vitalie Spinu
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2012-06-28 17:49 UTC (permalink / raw)
  To: Vitalie Spinu; +Cc: 11808

Vitalie Spinu <spinuvit@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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11808: IDO fails with tramp /ftp:
  2012-06-28 17:49     ` Michael Albinus
@ 2012-06-28 18:16       ` Vitalie Spinu
  2012-06-29  7:18         ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Vitalie Spinu @ 2012-06-28 18:16 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 11808

  >> Michael Albinus <michael.albinus@gmx.de>
  >> on Thu, 28 Jun 2012 19:49:38 +0200 wrote:

  > Vitalie Spinu <spinuvit@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@host: it says [No Match] (previously
it would request completions of /ftp:user@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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11808: IDO fails with tramp /ftp:
  2012-06-28 18:16       ` Vitalie Spinu
@ 2012-06-29  7:18         ` Michael Albinus
  2012-06-29  7:42           ` John Wiegley
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2012-06-29  7:18 UTC (permalink / raw)
  To: Vitalie Spinu; +Cc: 11808-done

Vitalie Spinu <spinuvit@gmail.com> writes:

> The first time I invoke /ftp:user@host: it says [No Match] (previously
> it would request completions of /ftp:user@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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11808: IDO fails with tramp /ftp:
  2012-06-29  7:18         ` Michael Albinus
@ 2012-06-29  7:42           ` John Wiegley
  0 siblings, 0 replies; 9+ messages in thread
From: John Wiegley @ 2012-06-29  7:42 UTC (permalink / raw)
  To: 11808; +Cc: michael.albinus

>>>>> Michael Albinus <michael.albinus@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-06-29  7:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-28 13:39 bug#11808: IDO fails with tramp /ftp: Vitalie Spinu
2012-06-28 14:46 ` Michael Albinus
2012-06-28 16:01   ` Vitalie Spinu
2012-06-28 16:09 ` Michael Albinus
2012-06-28 16:30   ` Vitalie Spinu
2012-06-28 17:49     ` Michael Albinus
2012-06-28 18:16       ` Vitalie Spinu
2012-06-29  7:18         ` Michael Albinus
2012-06-29  7:42           ` John Wiegley

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).