unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: "Bartosz Kaczyński" <bkaczynski@posteo.net>
Cc: 63359@debbugs.gnu.org
Subject: bug#63359: Fwd: bug#63359: 30.0.50; Lack of ssh hosts completion in Tramp using Fido mode
Date: Tue, 09 May 2023 16:32:51 +0200	[thread overview]
Message-ID: <87mt2d1soc.fsf@gmx.de> (raw)
In-Reply-To: <87zg6g2hed.fsf@posteo.net>

[-- Attachment #1: Type: text/plain, Size: 29 bytes --]

Forwarding for the archives


[-- Attachment #2: Type: message/rfc822, Size: 2972 bytes --]

From: Michael Albinus <michael.albinus@gmx.de>
Subject: Re: bug#63359: 30.0.50; Lack of ssh hosts completion in Tramp using Fido mode
Date: Tue, 09 May 2023 13:43:29 +0200

Bartosz Kaczyński <bkaczynski@posteo.net> writes:

> Hi Michael,

Hi Bartosz,

>> Have you tried this recipe?
>
> Yes, I have. Here is my TRAMP configuration:
>
> (use-package tramp
>   :config
>     ---snip---
>   (with-eval-after-load 'tramp
>     (tramp-set-completion-function
>      "ssh" (append (tramp-get-completion-function "ssh")
>                    (mapcar (lambda (file) `(tramp-parse-sconfig ,file))
>                            (directory-files
>                             "~/.ssh/conf.d/"
>                             'full directory-files-no-dot-files-regexp))))
>     (tramp-set-completion-function
>      "scp" (append (tramp-get-completion-function "scp")
>                    (mapcar (lambda (file) `(tramp-parse-sconfig ,file))
>                            (directory-files
>                             "~/.ssh/conf.d/"
>                             'full directory-files-no-dot-files-regexp)))))
>     ---snip---
> )
>
> And I confirm this solution works for Icomplete but for some reasons it
> doesn't work for Fido.

I cannot reproduce it. Here's my test setup:

I have created a new directory /tmp/tmp with the following files:

--8<---------------cut here---------------start------------->8---
# ll /tmp/tmp
total 8
-rw-r--r--. 1 albinus albinus 47 May  9 13:27 xxx
-rw-r--r--. 1 albinus albinus 47 May  9 13:27 yyy
# cat /tmp/tmp/*
Host xxx-63359
     Hostname xxx-63359.invalid
Host yyy-63359
     Hostname yyy-63359.invalid
--8<---------------cut here---------------end--------------->8---

I have created a file /tmp/tmp.el with the following contents:

--8<---------------cut here---------------start------------->8---
# cat /tmp/tmp.el
(use-package tramp
  :config
  (with-eval-after-load 'tramp
    (tramp-set-completion-function
     "ssh" (append (tramp-get-completion-function "ssh")
                   (mapcar (lambda (file) `(tramp-parse-sconfig ,file))
                           (directory-files
                            "/tmp/tmp/"
                            'full directory-files-no-dot-files-regexp))))))
--8<---------------cut here---------------end--------------->8---

Then I have tested

--8<---------------cut here---------------start------------->8---
# emacs -Q -l /tmp/tmp.el -f icomplete-mode
# emacs -Q -l /tmp/tmp.el -f fido-mode
--8<---------------cut here---------------end--------------->8---

After typing 'C-x C-f /ssh: TAB' I have seen the candidates 'xxx-63359:'
and 'yyy-63359:', in both tests.

Looks like there is something odd with your config? Could you please try
my recipe, whether it also works for you? Then you can add step by step
your config, and check what's wrong?

> Regards, bartk

Best regards, Michael.

      parent reply	other threads:[~2023-05-09 14:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-07 17:14 bug#63359: 30.0.50; Lack of ssh hosts completion in Tramp using Fido mode Bartosz Kaczyński
2023-05-08 11:08 ` Michael Albinus
2023-05-09  4:00   ` Bartosz Kaczyński
     [not found]   ` <87cz3aegyh.fsf@posteo.net>
     [not found]     ` <87r0rphgri.fsf@gmx.de>
     [not found]       ` <87mt2ds750.fsf@posteo.net>
2023-05-10  6:59         ` Michael Albinus
2023-05-09 14:32 ` 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=87mt2d1soc.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=63359@debbugs.gnu.org \
    --cc=bkaczynski@posteo.net \
    /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).