unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Stefan Kangas <stefan@marxist.se>
Cc: Oleksandr Manzyuk <manzyuk@gmail.com>, 10911@debbugs.gnu.org
Subject: bug#10911: 24.0.94; `ido-read-directory-name' should offer known hosts for completion
Date: Wed, 27 Oct 2021 17:27:34 +0200	[thread overview]
Message-ID: <871r46o5cp.fsf@gmx.de> (raw)
In-Reply-To: <CADwFkm=qM1TKAdrmvrxj_d1-EOrceweQakz1vmtoj9RvGCY-iQ@mail.gmail.com> (Stefan Kangas's message of "Fri, 22 Oct 2021 20:03:04 -0700")

Stefan Kangas <stefan@marxist.se> writes:

> Hi Michael,

Hi,

> Could you perhaps take a look at the below bug?  It seems to relate to
> completions when using Tramp.

Somehow, I did miss the bug. I don't read all bug reports, and likely
the subject line was too long in order to get my attention with the
words "known hosts". So be it just now.

> Oleksandr Manzyuk <manzyuk@gmail.com> writes:
>
>> This is a feature request rather than a bug.  `ido-read-directory-name'
>> doesn't offer known hosts for completion, unlike `ido-read-file-name'.
>> Here is what I mean by that.  I'm assuming that `ido-mode' is on.
>> Please forgive me if I belabor the point.
>>
>> When I type C-x C-f // and hit TAB, I obtain an *Ido Completions* buffer
>> containing not only local directory names (bin/, boot/, dev/ etc.), but
>> also known hosts, which is very convenient in conjunction with TRAMP.  I
>> can type C-x C-f // g o RET, which expands into /golconda.cs.nuim.ie:,
>> and if I already have a remote shell running on that host, I can see a
>> list of files and directories there.  If there is no remote shell yet, I
>> can simply hit RET, and it will be opened using TRAMP.  Of course, I can
>> open a dired buffer visiting a remote directory this way, but it should
>> also be equally convenient to do that with `ido-dired'.  While it is
>> possible, it is also less convenient: I have to type C-x d //, type the
>> host name followed by colon *in full and without completion*.
>>
>> Summarizing, there is a discrepancy in how `ido-read-directory-name' and
>> `ido-read-file-name' generate completions, and I don't see why this
>> should be the case.

Well, time has passed, and Tramp has changed. Meanwhile, a method name
is mandatory.

I've tried with recent master (Emacs 29.0.50). If I call

emacs -Q -L ~/src/tramp/lisp/ -l tramp -f ido-mode

I can type "C-x d /ss TAB", and the method "ssh" is not offered. So I
continue with "h: TAB", and again, the host name is not offered.

If I read a file name, via "C-x C-f /ss TAB", it completes to "/ssh:"
(and the similar methods). Typing ": TAB" gives me host name
completion. So the situation is similar to what the OP has reported.

However, I don't know ido.el pretty good, so some body else, who knows
this beast, might continue with analysis. If there are questions from
Tramp, don't hesitate to ask.

Best regards, Michael.





      reply	other threads:[~2021-10-27 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29 12:52 bug#10911: 24.0.94; `ido-read-directory-name' should offer known hosts for completion Oleksandr Manzyuk
2021-10-23  3:03 ` Stefan Kangas
2021-10-27 15:27   ` Michael Albinus [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=871r46o5cp.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=10911@debbugs.gnu.org \
    --cc=manzyuk@gmail.com \
    --cc=stefan@marxist.se \
    /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 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).