From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#10911: 24.0.94; `ido-read-directory-name' should offer known hosts for completion Date: Fri, 22 Oct 2021 20:03:04 -0700 Message-ID: References: <87sjhtzts0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34780"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Michael Albinus , 10911@debbugs.gnu.org To: Oleksandr Manzyuk Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 23 05:04:19 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1me7KU-0008pH-Hr for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 05:04:18 +0200 Original-Received: from localhost ([::1]:52390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1me7KS-0004Bt-SA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Oct 2021 23:04:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1me7KE-0004BT-NU for bug-gnu-emacs@gnu.org; Fri, 22 Oct 2021 23:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50778) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1me7KE-0006Q3-EW for bug-gnu-emacs@gnu.org; Fri, 22 Oct 2021 23:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1me7KE-0001f8-Ad for bug-gnu-emacs@gnu.org; Fri, 22 Oct 2021 23:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Oct 2021 03:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10911 X-GNU-PR-Package: emacs Original-Received: via spool by 10911-submit@debbugs.gnu.org id=B10911.16349581946123 (code B ref 10911); Sat, 23 Oct 2021 03:04:02 +0000 Original-Received: (at 10911) by debbugs.gnu.org; 23 Oct 2021 03:03:14 +0000 Original-Received: from localhost ([127.0.0.1]:34091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1me7JR-0001aQ-DW for submit@debbugs.gnu.org; Fri, 22 Oct 2021 23:03:13 -0400 Original-Received: from mail-pg1-f179.google.com ([209.85.215.179]:38817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1me7JP-0001Wb-0G for 10911@debbugs.gnu.org; Fri, 22 Oct 2021 23:03:12 -0400 Original-Received: by mail-pg1-f179.google.com with SMTP id e65so5003535pgc.5 for <10911@debbugs.gnu.org>; Fri, 22 Oct 2021 20:03:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=shDJUVIUKVBWmEztkVYWrfsaiV9tyDL8rUyht1z/a2o=; b=GgolgwlDgvoTKUXplyAOG6+VOBNzLL/+PuZifBPq0GjAFfq3GdrbfvxCNnc7g3ksgo 2wLLBjHwR/7tKAc4vi3QbqONvWq6qpLNVQYVjoio6AKsDlP4iGo3JiYHn7KTdcf2uXkl sUW4YyFRWVPmxTkL6l9oGjoFkpgFzMkfRB1O/0rwPkaybTHpDQKyZdkk39bS8lHjWxok nfsscF0xHHKusoaGyfhV4aUOZJHh3yvzCNj+jM5eiWAjSTCEiGQ+xVaKrnFDoXRPhZgY pl3CB/24CirLVLfvaKCK4bZDreSiz4bDKT7ghheQpQ48At2xFuwOQsCt3H2a0Q47ks+l m1wA== X-Gm-Message-State: AOAM5313Bjr0xDe6bawdvzAQapr78oxanVo8Fy9NHgTcRR8EjTpNmhRj v1Zm3YeQKwIrvtSp2qReY/9rQoOzaffDKq+T4TA= X-Google-Smtp-Source: ABdhPJwlcivZahdAas14WhS89hSl/9hc4coViaAjuEJ4MB6sBwbphejlVfflk2Bu82v869Yj5EQOQ2Dn2qMhJ8tp/NQ= X-Received: by 2002:a05:6a00:1950:b0:44d:9402:3396 with SMTP id s16-20020a056a00195000b0044d94023396mr3903140pfk.70.1634958185259; Fri, 22 Oct 2021 20:03:05 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 22 Oct 2021 20:03:04 -0700 In-Reply-To: <87sjhtzts0.fsf@gmail.com> (Oleksandr Manzyuk's message of "Wed, 29 Feb 2012 12:52:15 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217935 Archived-At: Hi Michael, Could you perhaps take a look at the below bug? It seems to relate to completions when using Tramp. Oleksandr Manzyuk 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. > > While I'm happy with C-x C-f for opening dired buffers, also on remote > hosts, having `ido-read-directory-name' complete known hosts would make > this function more useful for other purposes. For example, I have the > following function: > > (defun named-shell (name directory) > "Open a named shell. NAME is the base name of the shell buffer, > and DIRECTORY is the directory to open the shell in." > (interactive "MName: \nDDirectory: ") > (switch-to-buffer (concat "*" name "*")) > (cd directory) > (shell (current-buffer))) > > I introduced it primarily to be able to quickly open inferior remote > shells. However, when I'm queried for the directory to open the shell > in, I still have to type in the host name in full. > > > In GNU Emacs 24.0.94.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) > of 2012-02-28 on pandora > Windowing system distributor `The X.Org Foundation', version 11.0.10707000