all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Cc: Michael.Albinus@alcatel.de,
	Tramp Developers <tramp-devel@mail.freesoftware.fsf.org>
Subject: Avoid efficiency issues with user/host name completion in Tramp
Date: Sat, 14 Sep 2002 00:04:18 +0200	[thread overview]
Message-ID: <vafwupppmvx.fsf@lucy.cs.uni-dortmund.de> (raw)

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)

             reply	other threads:[~2002-09-13 22:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-13 22:04 Kai Großjohann [this message]
2002-09-15  1:50 ` Avoid efficiency issues with user/host name completion in Tramp Richard Stallman
2002-09-15 12:50 ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vafwupppmvx.fsf@lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    --cc=Michael.Albinus@alcatel.de \
    --cc=tramp-devel@mail.freesoftware.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.