all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Avoid efficiency issues with user/host name completion in Tramp
@ 2002-09-13 22:04 Kai Großjohann
  2002-09-15  1:50 ` Richard Stallman
  2002-09-15 12:50 ` Michael Albinus
  0 siblings, 2 replies; 3+ messages in thread
From: Kai Großjohann @ 2002-09-13 22:04 UTC (permalink / raw)
  Cc: Michael.Albinus, Tramp Developers

Michael is working on user/host name completion in Tramp.  As you
might recall, Tramp allows filenames of the form

    /method:user@host:file

If you type that in and hit TAB during entering the host name, then
it's clear what Tramp has to do: complete a host name.

But you might also want to type filenames without the method, and
possibly also without the user name.  So the filenames look like this:

    /host:file

At this spot, typing TAB during entering the host name suffers from a
problem.  Suppose the user types /fo and then TAB:

(1) Getting completions for host names might take long, and
(2) the user might have intended a local file like /foo/bar.

Why might it take long to get completions for host names?  Because
Tramp will read files with host names in them (like /etc/hosts and
/etc/ssh/known_hosts), and some sites have really long such files.
(Michael's site is one of them.)

There are a number of possible approaches, but I don't know what is
the right one?

(a) Live with TAB taking a long time in such cases.  (And Tramp caches
    the list of host names in memory, so it's only slow once.)

(b) The list of files to read host names from is configurable.  Users
    are responsible for deleteting from the list the files that are
    too long.

    Maybe the default list of files could consist of short files only.

(c) Don't allow host name completion for these kinds of filenames,
    require the users to type in the method name if they want host
    name completion, so that "/ssh:ho" is completed to "/ssh:host:".
    (Or maybe the user name, so that "/user@ho" is completed to
    "/user@host:".)

(d) Change the filename syntax so that it's possible to recognize even
    Tramp files where only part of the host name is given.  This, of
    course, breaks the Ange-FTP/Tramp unified filename syntax.  (Or at
    least it breaks backward compatiblity with Ange-FTP in this
    regard.)

(e) Require the user to type ":" at the end of the filename before
    invoking completion.  So the user types "/ho:" and then hits TAB
    and the system completes to "/host:".  This is a funny kind of
    completion and different from the rest of Emacs.  But with
    partial-completion-mode it could make some kind of sense.

Opinions?

kai
-- 
~/.signature is: umop 3p!sdn    (Frank Nobis)

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

end of thread, other threads:[~2002-09-15 12:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-13 22:04 Avoid efficiency issues with user/host name completion in Tramp Kai Großjohann
2002-09-15  1:50 ` Richard Stallman
2002-09-15 12:50 ` Michael Albinus

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.