Subject: Re: ido-mode not compatible with url-handler-mode

From: [email-masked] (Kim F. Storm)
Date: Sun, 07 Sep 2008 21:28:03 +0200

Chong Yidong <[email-masked]> writes:

>> url-handler-mode is awesome!  ido-mode is too, but they are not
>> compatible with each other.
>>
>> With url-handler-mode and ido-mode enabled, try typing
>> http://www.google.com [in the C-x C-f prompt].  ido-mode will not let
>> you type in that url.  You need to use C-f to enter "normal" url
>> handler mode.
>
> Hi Kim,
>
> Here's a bug report about ido-mode.  Do you have time to take a look at
> it?  If not, suggestions about how to fix the problem would be welcome.

Hi Chong

Ido already has code to deal sensibly with tramp syntax.  It does this
by calling tramp to return completions for a given input matching a
tramp-like filename.

Maybe there is a similar way to do that for the url package, by
checking the input against url-handler-regexp, and calling the
url package's completion functions.

Unfortunately, those are unimplemented, so there really isn't much
ido can do to "improve" url-handler-mode:

(defun url-file-name-completion (url directory)
  (error "Unimplemented"))

(defun url-file-name-all-completions (file directory)
  (error "Unimplemented"))

This is a major reason why ido provides the C-f fallback to standard
"find-file"; then you can enter stuff which doesn't have a reasonable
ido semantics.

So really there is no bug here - it's one of the IMO very minor
problems of using ido.

-- 
Kim F. Storm <[email-masked]> http://www.cua.dk