unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to disable ido and icomplete in some path/directory?
@ 2017-12-18  8:44 Shuguang Sun
  2017-12-18 21:59 ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Shuguang Sun @ 2017-12-18  8:44 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I have ido-everywhere, icomplete-mode, and ido-mode in my init. I want to
disable ido and icomplete in some path or directory, for example, i:/work/,
when I find file, copy file (dired-do-copy), or rename file
(dired-do-rename).

Any suggestion will be appreciated.

Best Regards,
Shuguang


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

* Re: How to disable ido and icomplete in some path/directory?
  2017-12-18  8:44 Shuguang Sun
@ 2017-12-18 21:59 ` Stefan Monnier
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2017-12-18 21:59 UTC (permalink / raw)
  To: help-gnu-emacs

> I have ido-everywhere, icomplete-mode, and ido-mode in my init. I want to
> disable ido and icomplete in some path or directory, for example, i:/work/,
> when I find file, copy file (dired-do-copy), or rename file
> (dired-do-rename).

Could you give us some hint about why you want to disable icomplete and
ido there (I wonder how they work together, by the way)?


        Stefan




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

* Re: How to disable ido and icomplete in some path/directory?
@ 2017-12-19  2:09 Shuguang Sun
  2017-12-19  3:09 ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Shuguang Sun @ 2017-12-19  2:09 UTC (permalink / raw)
  To: monnier; +Cc: help-gnu-emacs

Hi Stefen,

I works on Windonw 7 and has a network driver i: (that is, I mapped a net
work location [server \\host\path\] to local). The network is very slow.
When I want to dired-do-find/copy, it takes a long time for ido/icomplete
to read the list of filenames from the server. Thereby, I want to disable
ido and icomplete in such drivers/paths.
For dired-do-find-file, I can enter edit mode by C-e, however, it does't
solve all problems, and still has very slow response at the begining and
end.

In those local driver, it is fast for ido/icomplete to read the list of
finames for completion and it is helpful.

Best Regards,
Shuguang


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

* Re: How to disable ido and icomplete in some path/directory?
  2017-12-19  2:09 How to disable ido and icomplete in some path/directory? Shuguang Sun
@ 2017-12-19  3:09 ` Stefan Monnier
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2017-12-19  3:09 UTC (permalink / raw)
  To: help-gnu-emacs

> For dired-do-find-file, I can enter edit mode by C-e,

Seems like you're using IDO rather than icomplete there, then
(icomplete doesn't have an "edit mode").

> In those local driver, it is fast for ido/icomplete to read the list of
> finames for completion and it is helpful.

The way icomplete is implemented it should (in theory) not block you
from typing further while building the completion list.  AFAICT, this
also applies to IDO.  So have you tried to "keep typing" when Emacs
seems to be waiting for the network to reply?  If so, does Emacs keep
waiting, or does it "immediately" process your key (and starts trying
to build the next list of completions)?
If it keeps you waiting, then it's a bug which I suggest you report with
`M-x report-emacs-bug`.


        Stefan




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

* Re: How to disable ido and icomplete in some path/directory?
@ 2017-12-19  6:44 Shuguang Sun
  2017-12-19 13:32 ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Shuguang Sun @ 2017-12-19  6:44 UTC (permalink / raw)
  To: monnier; +Cc: help-gnu-emacs

Hi Stefen

It is not a bug. Emacs will "immediately" process my key, and start trying
to building the next list of completions.
However, the network is slow, thereby, the response of emacs is delayed. It
is why I want to disable IDO/icomplete in some directory.


You remind me. I try to enable ido and icomplet separately.
The icomplete-mode trigger my issue. It tries to buidling the list after
each key typing.
The ido-everywhere just takes some times for the first time under a
directory, and don't re-read the list after each typing.


Best Regards,
Shuguang


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

* Re: How to disable ido and icomplete in some path/directory?
  2017-12-19  6:44 Shuguang Sun
@ 2017-12-19 13:32 ` Stefan Monnier
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2017-12-19 13:32 UTC (permalink / raw)
  To: help-gnu-emacs

> It is not a bug. Emacs will "immediately" process my key, and start trying
> to building the next list of completions.
> However, the network is slow, thereby, the response of emacs is delayed.

Could you clarify here which response is delayed (since you said above
that Emacs "immediately" processes the key).

Normally, what should happen (barring bugs) is:

- let's say you're in a prompt like "Find file: /foo/bar/"
  where /foo/bar is a "slow" directory.
- Emacs is busy trying to get the list of completions.
- you hit "t"
- Emacs promptly stops trying to get the list of completions, and
  updates the minibuffer to: "Find file: /foo/bar/t"
- it then (re)tries to get the list of completions.

So if the list of completions takes too much time, it should behave
pretty much identically to what happens with icomplete disabled (I'm
talking abut icomplete here, not sure what ido would do).


        Stefan




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

* Re: How to disable ido and icomplete in some path/directory?
@ 2017-12-19 14:57 Shuguang Sun
  2017-12-19 15:11 ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Shuguang Sun @ 2017-12-19 14:57 UTC (permalink / raw)
  To: monnier; +Cc: help-gnu-emacs

It is not a bug. It behave as

- let's say you're in a prompt like "Find file: /foo/bar/"
  where /foo/bar is a "slow" directory.
- Emacs is busy trying to get the list of completions.
- you hit "t"
- Emacs promptly stops trying to get the list of completions, and
  updates the minibuffer to: "Find file: /foo/bar/t"
- it then (re)tries to get the list of completions.

it is due to the slow net rate. So disable icomplete will solve the problem.

My question is how to diable ido and icomplete in some path/directory.


(Sorry it does not work to call gmail repsoning the help maillist in firefox).

Best Regards,

Shuguang


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

* Re: How to disable ido and icomplete in some path/directory?
  2017-12-19 14:57 Shuguang Sun
@ 2017-12-19 15:11 ` Stefan Monnier
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2017-12-19 15:11 UTC (permalink / raw)
  To: Shuguang Sun; +Cc: help-gnu-emacs

> It is not a bug. It behave as
> - let's say you're in a prompt like "Find file: /foo/bar/"
>   where /foo/bar is a "slow" directory.
> - Emacs is busy trying to get the list of completions.
> - you hit "t"
> - Emacs promptly stops trying to get the list of completions, and
>   updates the minibuffer to: "Find file: /foo/bar/t"
> - it then (re)tries to get the list of completions.

> it is due to the slow net rate.

What is "it".

> So disable icomplete will solve the problem.

Which part of the behavior described above is the problem you want to solve?


        Stefan



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

* Re: How to disable ido and icomplete in some path/directory?
@ 2017-12-20  1:06 Shuguang Sun
  2017-12-20  2:01 ` Óscar Fuentes
  0 siblings, 1 reply; 12+ messages in thread
From: Shuguang Sun @ 2017-12-20  1:06 UTC (permalink / raw)
  To: help-gnu-emacs

Someone uses the help maillist to train robot?


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

* Re: How to disable ido and icomplete in some path/directory?
  2017-12-20  1:06 Shuguang Sun
@ 2017-12-20  2:01 ` Óscar Fuentes
  0 siblings, 0 replies; 12+ messages in thread
From: Óscar Fuentes @ 2017-12-20  2:01 UTC (permalink / raw)
  To: help-gnu-emacs

Shuguang Sun <shuguang@gmail.com> writes:

> Someone uses the help maillist to train robot?

:-)

IIUC Stefan is saying that the slow responsiveness of the remote network
should not matter because Emacs builds the completion list
asynchronously (at least when icomplete is used, AFAIK ido needs to
build the list before interacting with the user). If, when using
icomplete, you are forced to wait, it is a bug in Emacs. Stefan is
trying to know the exact problem you experience (with icomplete).

For ido, which builds its list of candidates synchronously, you can
advice the function `ido-is-slow-ftp-host'. This function takes a
parameter which corresponds to a directory (if this parameter is nil
then the current directory is assumed). When this function returns
non-nil, ido is disabled.




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

* Re: How to disable ido and icomplete in some path/directory?
@ 2017-12-20  5:24 Shuguang Sun
  2017-12-20 16:11 ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Shuguang Sun @ 2017-12-20  5:24 UTC (permalink / raw)
  To: ofv; +Cc: help-gnu-emacs

I apolygize for my attitude. I'm in the busy timeline work now and can't
help too much on the "bug" thing.

My need is to disable ido and icomplete in some path/directory as the
title. Automatically, not manually each time.
It will be fine for me.

Something may help for bug idendification:
When I press a key in dired-do-find-file/copy/rename, then emacs hangs for
while (may be re-reading the file name list from remote and building
completion list.) Then the key shows in the minibuffer with the completion
list.
If I type two keys continously, emacs hangs for while, and then the two
keys show in the minibuffer with the completion list.


Another thing not relevant:
In the slow rate net work (net driver mapping in windows, not tramp),
fontifyiing a big buffer associated with remote file will take longer time
than local file.

Best Regards,
Shuguang


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

* Re: How to disable ido and icomplete in some path/directory?
  2017-12-20  5:24 Shuguang Sun
@ 2017-12-20 16:11 ` Stefan Monnier
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2017-12-20 16:11 UTC (permalink / raw)
  To: help-gnu-emacs

> Something may help for bug idendification:
> When I press a key in dired-do-find-file/copy/rename, then emacs hangs for
> while (may be re-reading the file name list from remote and building
> completion list.) Then the key shows in the minibuffer with the completion
> list.
> If I type two keys continously, emacs hangs for while, and then the two
> keys show in the minibuffer with the completion list.

Ah, thanks, I see.  So that's indeed a bug.  I'll try and take a look
at it.  The key you pressed should appear *before* the completion list.


        Stefan




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

end of thread, other threads:[~2017-12-20 16:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-19  2:09 How to disable ido and icomplete in some path/directory? Shuguang Sun
2017-12-19  3:09 ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2017-12-20  5:24 Shuguang Sun
2017-12-20 16:11 ` Stefan Monnier
2017-12-20  1:06 Shuguang Sun
2017-12-20  2:01 ` Óscar Fuentes
2017-12-19 14:57 Shuguang Sun
2017-12-19 15:11 ` Stefan Monnier
2017-12-19  6:44 Shuguang Sun
2017-12-19 13:32 ` Stefan Monnier
2017-12-18  8:44 Shuguang Sun
2017-12-18 21:59 ` Stefan Monnier

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