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: 51386@debbugs.gnu.org, Manuel Uberti <manuel.uberti@inventati.org>
Subject: bug#51386: 29.0.50; fido-vertical-mode: ssh host completion
Date: Tue, 26 Oct 2021 20:53:12 +0200	[thread overview]
Message-ID: <8735onk487.fsf@gmx.de> (raw)
In-Reply-To: <664bd93fdd51d1c62c79@heytings.org> (Gregory Heytings's message of "Tue, 26 Oct 2021 18:24:44 +0000")

Gregory Heytings <gregory@heytings.org> writes:

Hi Gregory,

>> Bonus point, if somebody who knows completion styles by heart could
>> fix this annoyance. Then we don't need to document it.
>>
>
> ??? I sent you a (one-line!) patch for the second annoyance, and you
> rejected it.  I'd be willing to look at the first annoyance, but not
> if it's to see the patch again rejected.

Your patch violates the file-name-all-completions API. Testing with
"emacs -Q -l tramp":

Currently, we have the following with vanilla Emacs (on my laptop):

--8<---------------cut here---------------start------------->8---
(file-name-all-completions "" "/")
=> ("sudoedit:" "sshfs:" "smb:" "rcp:" "remcp:" "scp:" "scpx:" "rsync:" "rsh:" "remsh:" "ssh:" "sshx:" "telnet:" "nc:" "su:" "sg:" "sudo:" "doas:" "ksu:" "krlogin:" "plink:" "plinkx:" "pscp:" "psftp:" "fcp:" "rclone:" "afp:" "dav:" "davs:" "gdrive:" "mtp:" "nextcloud:" "sftp:" "ftp:" "adb:" "sbin/" "proc/" "bin/" "snap/" "opt/" "var/" "dev/" "lib64/" "./" "nonexistent/" "lost+found/" "media/" "root/" "srv/" "etc/" "mnt/" "../" "tmp/" "net/" "sys/" "lib/" "boot/" "home/" "run/" "usr/")
--8<---------------cut here---------------end--------------->8---

With your one-line patch, we have instead

--8<---------------cut here---------------start------------->8---
(file-name-all-completions "" "/")
=> ("sbin/" "proc/" "bin/" "snap/" "opt/" "var/" "dev/" "lib64/" "./" "nonexistent/" "lost+found/" "media/" "root/" "srv/" "etc/" "mnt/" "../" "tmp/" "net/" "sys/" "lib/" "boot/" "home/" "run/" "usr/")
--8<---------------cut here---------------end--------------->8---

That means, all Tramp methods are suppressed. This is wrong, a valid
file name can start with a Tramp method. The Elisp manual calls such
cnstructs "magic" file names, but they are still valid file name
prefixes in the sense of file-name-all-completions. And so they are
valid results.

Our discrepancy is, that I believe we shall follow the API, and fix
problems where they are located. You want a workaround in Tramp, which
would IMO do more damage than it is good for. My experience tells me
that such hacks will create new problems we have to deal with in the
future.

Both of us agree that there is a problem. I don't intend to reject
patches from you, I just must be convinced that they solve the problem
adequately.

Best regards, Michael.





  reply	other threads:[~2021-10-26 18:53 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 14:37 bug#51386: 29.0.50; fido-vertical-mode: ssh host completion Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-25 14:54 ` Gregory Heytings
2021-10-25 15:08   ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-25 16:13     ` Gregory Heytings
2021-10-26  4:47       ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-26  7:13         ` Gregory Heytings
2021-10-26 15:30           ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-26 16:00             ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-26 18:12               ` Michael Albinus
2021-10-26 18:24                 ` Gregory Heytings
2021-10-26 18:53                   ` Michael Albinus [this message]
2021-10-26 19:06                     ` Gregory Heytings
2021-10-27  5:50                 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-27  7:51                   ` Gregory Heytings
2021-10-27  7:55                     ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-27  8:05                       ` Gregory Heytings
2021-10-27  8:07                         ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-27  9:05                         ` Michael Albinus
2021-10-27  9:08                           ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-27  9:12                           ` Gregory Heytings
2021-10-27 11:10                             ` Michael Albinus
2021-10-27 11:19                               ` Dmitry Gutov
2021-10-27 11:22                                 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-27 11:39                                 ` Gregory Heytings
2021-10-27 11:55                                   ` Michael Albinus
2021-10-27 11:23                               ` Gregory Heytings
2021-10-27 11:42                                 ` Michael Albinus
2021-10-27 12:04                                   ` Gregory Heytings
2021-10-27 12:12                                     ` Michael Albinus
2021-10-27 10:15                       ` Dmitry Gutov
2021-10-27 10:23                         ` Gregory Heytings
2021-10-27 10:25                           ` Dmitry Gutov
2021-10-27 11:35                           ` Michael Albinus
2021-10-27 12:02                             ` Gregory Heytings
2021-10-31 18:13 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=8735onk487.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=51386@debbugs.gnu.org \
    --cc=gregory@heytings.org \
    --cc=manuel.uberti@inventati.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 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).