From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 16334@debbugs.gnu.org
Subject: bug#16334: 24.3.50; company-capf eats the first char in IELM filename completions
Date: Tue, 07 Jan 2014 22:33:20 -0500 [thread overview]
Message-ID: <jwvob3nyx2b.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <52CB6BDB.4020601@yandex.ru> (Dmitry Gutov's message of "Tue, 07 Jan 2014 06:52:11 +0400")
>>>>> `completion-file-name-table' is more of an exception, I think. But if
>>>>> it was only passed the segment of STRING after the last path
>>>>> separator, it could still look behind it in the buffer and see the
>>>>> full path.
>>>> But the completion may actually want to *change* the text before
>>>> the boundary. E.g. completion of /u/s/d to /usr/share/doc.
> Maybe I didn't ask the right question. If the completion may want to change
> the text outside of its defined boundaries, doesn't that subvert the meaning
> of the "boundaries"?
There are 2 levels: the level of try-completion, all-completions, an
completion-boundaries. At that level, the completion should not affect
the text outside of the boundaries. This is the level at which
completion-tables operate.
Then there's the level of completion-try-completion and
completion-all-completions. This uses the info from the previous level
to implement completion according to completion-styles. It can change
things outside of the boundaries. This is part of the UI, not of
the backends.
>>> In that case, "/usr/share/doc" is the completion candidate, not "doc",
>>> right?
>> Not sure what you mean by "completion candidate":
> Elements returned by the completion table?
Then "/u/s/d" returns no completion candidates.
> Already done:
> https://github.com/company-mode/company-mode/compare/b70540b5fcd062c4670dea7004453de326ff4f70...8ecec3594931ae8e2329fec4b793ad4ba392e4ef
It's not in elpa yet.
> On the other hand, the backend is free to try all completion styles it
The backends know nothing about completion styles.
> We currently deal with that by only using the backends that respond with the
> same prefix as the first one that returned non-nil. Guess we could add the
> boundaries to the comparison list, too...
Exactly.
Stefan
next prev parent reply other threads:[~2014-01-08 3:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-03 23:20 bug#16334: 24.3.50; company-capf eats the first char in IELM filename completions Dmitry Gutov
2014-01-04 5:00 ` Stefan Monnier
2014-01-05 2:20 ` Dmitry Gutov
2014-01-05 3:17 ` Dmitry Gutov
2014-01-05 4:53 ` Stefan Monnier
2014-01-06 5:33 ` Dmitry Gutov
2014-01-06 15:23 ` Stefan Monnier
2014-01-07 2:52 ` Dmitry Gutov
2014-01-08 3:33 ` Stefan Monnier [this message]
2014-01-09 6:21 ` Dmitry Gutov
2014-01-09 16:00 ` Stefan Monnier
2014-01-10 6:23 ` Dmitry Gutov
2014-01-10 14:58 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvob3nyx2b.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=16334@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.