GNU bug report logs - #76606
30.1; Conflict between completion-preview and yasnippet

Previous Next

Package: emacs;

Reported by: Vincent Foley <vfoley <at> gmail.com>

Date: Thu, 27 Feb 2025 04:29:01 UTC

Severity: normal

Found in version 30.1

Fixed in version 30.2

Done: Eshel Yaron <me <at> eshelyaron.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 76606 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vincent Foley <vfoley <at> gmail.com>, Eshel Yaron <me <at> eshelyaron.com>,
 João Távora <joaotavora <at> gmail.com>
Cc: 76606 <at> debbugs.gnu.org
Subject: Re: bug#76606: 30.1; Conflict between completion-preview and yasnippet
Date: Thu, 27 Feb 2025 10:36:03 +0200
> From: Vincent Foley <vfoley <at> gmail.com>
> Date: Wed, 26 Feb 2025 20:29:16 -0330
> 
> In Emacs 30.1, completion-preview and yasnippet appear to conflict with
> each other. In a c-mode buffer with eglot, yasnippet, and
> completion-preview enabled, accepting a completion from
> completion-preview with M-i inserts the formal parameters over and over
> again.
> 
>         // Initial state -- cursor is at the pipe (|);
>         int add(int x, int y) { return x + y; }
>         int f(void) { |
> 
>         // Type "add"; completion-preview activates and proposes a
>         // completion (the text `(int x, int y)` is not actual text,
>         // but an overlay in a lighter color and underlined.)
>         int add(int x, int y) { return x + y; }
>         int f(void) { add|(int x, int y)
> 
>         // Pressing M-i to accept the completion moves the cursor
>         // inside the parentheses, but confusingly creates a copy
>         // of the parameters outside the parentheses.
>         int add(int x, int y) { return x + y; }
>         int f(void) { add(|int x, int y)int x, int y)
> 
>         // Pressing M-i again adds more text to the end of the line
>         int add(int x, int y) { return x + y; }
>         int f(void) { add(|int x, int y)int x, int y), int y)
>         
> The following init.el should be sufficient to reproduce the bug.
> I used the clangd LSP from the Debian apt repositories.
> 
>         (package-initialize)
>         (use-package eglot
>           :hook (c-mode . eglot-ensure))
>         (use-package completion-preview
>           :hook (c-mode . completion-preview-mode))
>         (use-package yasnippet
>           :hook (c-mode . yas-minor-mode))

Thanks, I'm adding Eshel and João to this discussion.




This bug report was last modified 79 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.