unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 10085@debbugs.gnu.org
Subject: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names
Date: Tue, 22 Nov 2011 22:55:25 +0100	[thread overview]
Message-ID: <877h2r3jqq.fsf@gmx.de> (raw)
In-Reply-To: <jwvehx0t2qb.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 22 Nov 2011 14:05:42 -0500")

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> Start "emacs -Q". Apply "C-x C-f /sudo:: TAB". This results in
>> "/sudo:sudo:root@". A correct expansion would be "/sudo:root@".
>
>> As far as I can see, Tramp's completion functions work properly.
>> The problem seems to be `completion-pcm--find-all-completions'.

> I think the patch below fixes it.

Yes, it does.

> The problem is that PCM assumes that
> a field separator cannot appear within a field.  In "/sudo::" the first
> / is a field separator, and the last ":" is also a field separator, but
> the first ":" isn't.

Unfortunately, I don't know anything about the completion machinery in
minibuffer.el. Maybe I should learn about. Is there documentation which
explains the concept of completion-table?

And is there something Tramp could do? It shall know the boundaries, and
it could provide such information more precisely.

> If you do "C-x C-f /sudo ?" you get "/sudo:" but if you
> do "C-x C-f /sudo: ?" you get "sudo:root@".  So fundamentally, the : of
> "/sudo:" acts a field separator, so (completion-boundaries "/sudo:") should
> probably return (6 . 0) rather than (1 . 0), and then "C-x C-f /sudo: ?"
> should list '("root@" ":") rather than '("sudo:root@").
>
> Related inconsistency from a trace of C-x C-f /sud: TAB:
>    1 -> completion-file-name-table: string="/sud:" pred=file-exists-p action=(boundaries . "")
>    1 <- completion-file-name-table: (boundaries 5)
>    [...]
>    ======================================================================
>    1 -> completion-file-name-table: string="/sudo:" pred=file-exists-p action=(boundaries . "")
>    1 <- completion-file-name-table: (boundaries 1)

I'ld like to check it if I could understand what's behind.

>         Stefan

Best regards, Michael.





  reply	other threads:[~2011-11-22 21:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-20 15:58 bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Michael Albinus
2011-11-22 17:04 ` Stefan Monnier
2011-11-22 22:13   ` Michael Albinus
2011-11-22 23:05     ` Stefan Monnier
2011-11-23  6:43       ` Michael Albinus
2011-11-23 14:04         ` Stefan Monnier
2011-11-23 20:28           ` Michael Albinus
2011-11-24  2:10             ` Stefan Monnier
2016-04-27 14:16             ` Stefan Monnier
2016-04-27 18:37               ` Michael Albinus
2016-04-27 19:16                 ` Stefan Monnier
2016-05-02  7:19                   ` Michael Albinus
2011-11-22 19:05 ` Stefan Monnier
2011-11-22 21:55   ` Michael Albinus [this message]
2012-03-30 18:28 ` Stefan Monnier
2012-03-31 12:36   ` Michael Albinus
2012-03-31 15:29     ` Stefan Monnier
2016-04-23 20:08 ` bug#10085: Tramp method completions Live System User
2016-04-24  8:22   ` 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=877h2r3jqq.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=10085@debbugs.gnu.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).