From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 72765@debbugs.gnu.org
Subject: bug#72765: Eglot + Clangd + Company + non-empty suffix = duplicate text
Date: Thu, 29 Aug 2024 14:34:10 +0300 [thread overview]
Message-ID: <86o75bftql.fsf@gnu.org> (raw)
In-Reply-To: <83e5b9c4-0f5f-49c4-a4b2-fe553c59b2f6@gutov.dev> (message from Dmitry Gutov on Fri, 23 Aug 2024 02:07:59 +0300)
> Date: Fri, 23 Aug 2024 02:07:59 +0300
> From: Dmitry Gutov <dmitry@gutov.dev>
>
> Here's an example I came upon when testing:
>
>
> test.c
> ```
> int foo_bar_1;
> int foo_bar_2;
>
> int main() {foo_bar|456
>
> ```
>
> Point is at |.
>
> If you use completion-at-point, *Completions* buffer pops up, you choose
> one of the options with M-down and M-RET, "_1" is inserted. Good.
>
> But if you use Company, type "_" (or backspace and re-add "r") - a popup
> comes up with "foo_bar_1" and "foo_bar_2", you choose one of the
> options, and the text becomes "foo_bar_1456456", suffix is duplicated.
>
> This only happens with Clang, out of the servers I've tested.
>
> You need a fairly recent Company to reproduce (from master), the
> previous versions simply didn't support completion in the middle of a
> symbol.
>
> To add something that completion-at-point trips over, though: when
> "foo_bar_2" (existing var name) is already inserted, move point to the
> middle of it and press C-M-i:
>
> ```
> foo_|bar_2
> ```
>
> will turn to
>
> ```
> foo_bar_2bar_2|
> ```
Is this an Eglot problem or a completion-at-point problem?
next prev parent reply other threads:[~2024-08-29 11:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 23:07 bug#72765: Eglot + Clangd + Company + non-empty suffix = duplicate text Dmitry Gutov
2024-08-29 11:34 ` Eli Zaretskii [this message]
2024-08-30 21:23 ` Dmitry Gutov
2024-08-31 6:47 ` Eli Zaretskii
2024-08-31 12:03 ` João Távora
2024-09-01 1:43 ` Dmitry Gutov
2024-09-01 9:43 ` João Távora
2024-09-01 14:28 ` Dmitry Gutov
2024-09-03 13:20 ` Dmitry Gutov
2024-09-03 13:43 ` João Távora
2024-09-08 2:41 ` Dmitry Gutov
2024-09-08 15:51 ` João Távora
2024-09-09 0:20 ` Dmitry Gutov
2024-09-09 11:46 ` Eli Zaretskii
2024-09-10 0:58 ` Dmitry Gutov
2024-09-10 11:47 ` Eli Zaretskii
2024-09-10 13:20 ` Dmitry Gutov
2024-09-10 1:40 ` Dmitry Gutov
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=86o75bftql.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=72765@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
/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.