unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Gregory Heytings <gregory@heytings.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 50387@debbugs.gnu.org
Subject: bug#50387: Possible bug in Tramp or in completions
Date: Wed, 08 Sep 2021 09:26:54 +0200	[thread overview]
Message-ID: <87k0jrbk8x.fsf@gmx.de> (raw)
In-Reply-To: <11c4e3821a2fd364eabe@heytings.org> (Gregory Heytings's message of "Tue, 07 Sep 2021 19:02:06 +0000")

Gregory Heytings <gregory@heytings.org> writes:

>>
>> I will, when I'm convinced the current situation isn't
>> acceptable. The current situation (you must type a char in order to
>> see the host name) is described in the Tramp manual, and I haven't
>> heard complaints about since ever.
>>
>
> That might be what the manual says, but it's not what the current
> situation actually is.  Type C-x C-f /scp TAB and you'll see scp:
> scpx:.

Sure. Completion style `substring' is not active, and so we see in the
traces buffer

--8<---------------cut here---------------start------------->8---
======================================================================
1 -> (tramp-completion-handle-file-name-all-completions "scp" "/")
1 <- tramp-completion-handle-file-name-all-completions: ("scp:" "scpx:")
======================================================================
1 -> (tramp-completion-handle-file-name-all-completions "scp" "/")
1 <- tramp-completion-handle-file-name-all-completions: ("scp:" "scpx:")
--8<---------------cut here---------------end--------------->8---

See, how `tramp-completion-handle-file-name-all-completions' is invoked
differently.

> Type C-x C-f /scp: TAB and you'll see scp:foo: scp:bar:.  This
> is coherent, ':' acts like a directory separator, like the '://' in
> URLs.

The traces show us

--8<---------------cut here---------------start------------->8---
======================================================================
1 -> (tramp-completion-handle-file-name-all-completions "scp:" "/")
1 <- tramp-completion-handle-file-name-all-completions: ("scp:test:" ... "scp:osboxes@")
======================================================================
1 -> (tramp-completion-handle-file-name-all-completions "scp:" "/")
1 <- tramp-completion-handle-file-name-all-completions: ("scp:test:" ... "scp:osboxes@")
--8<---------------cut here---------------end--------------->8---

(I've cut the result of the function, you don't want to see the zillions
of possible completions in my stanza :-) Again, see the arguments the
function is called with.

> But for those who use the substring and flex completion styles, typing
> C-x C-f /scp TAB displays pscp: scp: scpx:.  Typing C-x C-f /scp: TAB
> still displays scp: scpx:.  This isn't at all coherent.

I've said it several times: `tramp-completion-handle-file-name-all-completions'
is called with arguments, and it returns a corresponding result. It is
consistent. How completion styles interpret the result, is out of
Tramp's responsibility.

I don't say there's no bug. But as Tramp maintainer I believe there is
no bug in Tramp (anymore); I have no knowledge of completion styles in
order to help fixing it there.

Best regards, Michael.





  parent reply	other threads:[~2021-09-08  7:26 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-05  0:43 bug#50387: Possible bug in Tramp or in completions Gregory Heytings
2021-09-05 12:49 ` Gregory Heytings
2021-09-06  8:18   ` Michael Albinus
2021-09-06 16:34     ` Gregory Heytings
2021-09-06 16:59       ` Michael Albinus
2021-09-06 17:26         ` Gregory Heytings
2021-09-06 17:41           ` Michael Albinus
2021-09-06 18:22             ` Gregory Heytings
2021-09-06 19:39               ` Michael Albinus
2021-09-06 20:00                 ` Gregory Heytings
2021-09-06 20:31                   ` Michael Albinus
2021-09-06 20:55                     ` Gregory Heytings
2021-09-07 12:58                       ` Michael Albinus
2021-09-07 13:23                         ` Gregory Heytings
2021-09-07 13:30                           ` Gregory Heytings
2021-09-07 14:23                             ` Michael Albinus
2021-09-07 16:46                               ` Gregory Heytings
2021-09-07 17:31                                 ` Michael Albinus
2021-09-07 17:51                                   ` Gregory Heytings
2021-09-07 18:04                                     ` Michael Albinus
2021-09-07 19:02                                       ` Gregory Heytings
2021-09-07 19:41                                         ` Gregory Heytings
2021-09-08  7:28                                           ` Michael Albinus
2021-09-08  7:26                                         ` Michael Albinus [this message]
2021-09-08  7:57                                           ` Gregory Heytings
2021-09-08 14:25                                             ` Michael Albinus
2021-09-07 13:37                         ` Lars Ingebrigtsen
2021-09-07 14:31                           ` Michael Albinus
2021-09-06 20:41                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-06 20:49                   ` Michael Albinus
2021-09-06 21:39                   ` Gregory Heytings
2021-09-07  5:42                     ` Eli Zaretskii
2021-09-07 11:29                       ` 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

  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=87k0jrbk8x.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=50387@debbugs.gnu.org \
    --cc=gregory@heytings.org \
    --cc=monnier@iro.umontreal.ca \
    /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).