From unknown Tue Jun 17 01:47:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76606: 30.1; Conflict between completion-preview and yasnippet Resent-From: Vincent Foley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2025 04:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 76606@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174063053915206 (code B ref -1); Thu, 27 Feb 2025 04:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Feb 2025 04:28:59 +0000 Received: from localhost ([127.0.0.1]:57427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnVW4-0003x9-A6 for submit@debbugs.gnu.org; Wed, 26 Feb 2025 23:28:58 -0500 Received: from lists.gnu.org ([2001:470:142::17]:55136) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnRJY-0003pP-1F for submit@debbugs.gnu.org; Wed, 26 Feb 2025 18:59:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tnRJR-0003Yb-K5 for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2025 18:59:37 -0500 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tnRJL-0006sv-4u for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2025 18:59:37 -0500 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-543d8badc30so369082e87.0 for ; Wed, 26 Feb 2025 15:59:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740614368; x=1741219168; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=1DB6h0fruv5qtpCITyicmEUE4JbyD+snflx/S++lOe8=; b=aDhrgv8eQ2PCzgmczIqrBihruSYLXvT2i570G+ipAfEx3vV8MiHGTcPNUZZX20aNDb ZVWXyw+aoNBwE2zJGWFitDYwFcUx3KyyjxeTYPXqF4t7SM9onuuFJBSg9CxJYcp2hnbd PQ09DF+cxJ3ivMlcA+0rVjnqDgdEgsPge7jNB7uzjjeL/XqUxWJkNVgYNXCyiSzQZpCM BycWVZIeWEliAGQ3kJU0Jv2JqYWk5ONKARZKErtio5OBFU+i2+X6/FhGcrRGUQTozPu8 AioeDPsl6GBwF1Foqxu8P6fjcCyUgJqkW8BdwPJisSR+D/Ye1NuW2lKZwo6rC5L6iNIj K3rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740614368; x=1741219168; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=1DB6h0fruv5qtpCITyicmEUE4JbyD+snflx/S++lOe8=; b=PXc7LmDMqN/IkjhcXbLwBUkHOR2JFXSq+4wuOQVzSAHt7w/Oy8J07OJ5weil95xj4N zccX/jaAY0Rd+wayoWWmEoVXkzMRlARcv6BsS+/xhGdiAy7jl0/kD12ytw+EH78I4Oos 8UylngKyYYayEurm6+GMD9UWbCAXi9QuM0a8UGsRq3M1Hs62+vu5NAaxAfyXgJBEyfLr 8Wwcyno6s6HH2N/HwFuhSl83VLcatciDj2RS8aMGduwtiV/4DXW26LpuwvF8tRDWq6MG pcG8gbvSL39cSlbNUOG5cnNNveyPDgPjI6GLRYq5tSOFBcRprTQJCx3KQOkUZYBsKvO8 F0OQ== X-Gm-Message-State: AOJu0YzcH2SmtairmlvTUmDuclawA1R4YHxP3wr3qtl8w3BAHuU5j8U0 frnldSxpHEVCXBlD6436mcD/OI2PSPCzsh9/PgeaQbRr1A5UeMa5FhQzTzR1z+cDDooLkE3Vczo aHp3COrIy2rWeqwnvE3J3WX7ZeSjE9wsz X-Gm-Gg: ASbGncuO3kjtiy8YeyhW+r8xPMxDibiqZKpjvh6sRL8U8T2t1Fe1+VYVh7rXUU70vEa Vg6/goVFBeDaE/K5NqUVHW0DOZweAnI2R+49CAjSg67koACJ7RtdPz7Wnd69W7A5Ff3JAAdkYyb M6acrvly0= X-Google-Smtp-Source: AGHT+IEmPRafkJt2ZbPKI6VDLBGHppVPDTfQocB+A4TIddOaJbkgh2GzGt1LWf86mKVGoN09KPaQ29RQrpduBnxXkj8= X-Received: by 2002:a05:6512:a94:b0:545:1da8:39e7 with SMTP id 2adb3069b0e04-548510d1bc5mr6256093e87.15.1740614367473; Wed, 26 Feb 2025 15:59:27 -0800 (PST) MIME-Version: 1.0 From: Vincent Foley Date: Wed, 26 Feb 2025 20:29:16 -0330 X-Gm-Features: AQ5f1Joberwu46jHEgvfy13fD9l3UjGcM-OYIIWFoSZR_K1YuR3Yf3vBragCyPA Message-ID: Content-Type: multipart/alternative; boundary="000000000000107be4062f145df2" Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=vfoley@gmail.com; helo=mail-lf1-x134.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Mailman-Approved-At: Wed, 26 Feb 2025 23:28:54 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --000000000000107be4062f145df2 Content-Type: text/plain; charset="UTF-8" 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)) In GNU Emacs 30.1 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.2) of 2025-02-26 built on x1 Windowing system distributor 'The X.Org Foundation', version 11.0.12101015 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --prefix=/home/vfoley/.local --with-native-compilation=aot' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_ALL: en_US.utf8 value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: C/*l Minor modes in effect: eglot-inlay-hints-mode: t eglot--managed-mode: t flymake-mode: t completion-preview-mode: t yas-minor-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t abbrev-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date comp-run comp-common rx eglot external-completion jsonrpc xref flymake thingatpt project compat diff diff-mode track-changes easy-mmode ert pp ewoc debug backtrace find-func filenotify warnings compile text-property-search comint ansi-osc ansi-color ring pcase imenu completion-preview yasnippet cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-extra help-mode use-package-core finder-inf yasnippet-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs icons password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 254279 18736) (symbols 48 15078 0) (strings 32 66912 2838) (string-bytes 1 2272245) (vectors 16 41013) (vector-slots 8 418802 16721) (floats 8 88 172) (intervals 56 1405 0) (buffers 992 18)) --000000000000107be4062f145df2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In Emacs 30.1, completion-preview and yasnippet appea= r to conflict with
each other. In a c-mode buffer with eglot, yasnippet,= and
completion-preview enabled, accepting a completion from
completi= on-preview with M-i inserts the formal parameters over and over
again.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 // Initial state -- cursor is at the pipe= (|);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 int add(int x, int y) { return x + y; = }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 int f(void) { |

=C2=A0 =C2=A0 =C2= =A0 =C2=A0 // Type "add"; completion-preview activates and propos= es a
=C2=A0 =C2=A0 =C2=A0 =C2=A0 // completion (the text `(int x, int y)= ` is not actual text,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 // but an overlay in a= lighter color and underlined.)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 int add(int = x, int y) { return x + y; }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 int f(void) { ad= d|(int x, int y)

=C2=A0 =C2=A0 =C2=A0 =C2=A0 // Pressing M-i to acce= pt the completion moves the cursor
=C2=A0 =C2=A0 =C2=A0 =C2=A0 // inside= the parentheses, but confusingly creates a copy
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 // of the parameters outside the parentheses.
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 int add(int x, int y) { return x + y; }
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 int f(void) { add(|int x, int y)int x, int y)

=C2=A0 =C2=A0 = =C2=A0 =C2=A0 // Pressing M-i again adds more text to the end of the line=C2=A0 =C2=A0 =C2=A0 =C2=A0 int add(int x, int y) { return x + y; }
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 int f(void) { add(|int x, int y)int x, int y), = int y)
=C2=A0 =C2=A0 =C2=A0 =C2=A0
The following init.el should be s= ufficient to reproduce the bug.
I used the clangd LSP from the Deb= ian apt repositories.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 (package-initiali= ze)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (use-package eglot
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 :hook (c-mode . eglot-ensure))
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 (use-package completion-preview
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 :hook (c-mode . completion-preview-mode))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 (use-package yasnippet
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :hook (c-m= ode . yas-minor-mode))

In GNU Emacs 30.1 (build 3, x86_64-pc-linux-g= nu, GTK+ Version 3.24.43,
=C2=A0cairo version 1.18.2) of 2025-02-26 buil= t on x1
Windowing system distributor 'The X.Org Foundation', ver= sion 11.0.12101015
System Description: Debian GNU/Linux trixie/sid
Configured using:
=C2=A0'configure --prefix=3D/home/vfoley/.local = --with-native-compilation=3Daot'

Configured features:
CAIRO D= BUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBS= YSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG SECCOMP SO= UND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
WEBP X11 XDBE X= IM XINPUT2 XPM GTK3 ZLIB

Important settings:
=C2=A0 value of $LC_= ALL: en_US.utf8
=C2=A0 value of $LANG: en_US.utf8
=C2=A0 locale-codin= g-system: utf-8-unix

Major mode: C/*l

Minor modes in effect:<= br>=C2=A0 eglot-inlay-hints-mode: t
=C2=A0 eglot--managed-mode: t
=C2= =A0 flymake-mode: t
=C2=A0 completion-preview-mode: t
=C2=A0 yas-mino= r-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2= =A0 eldoc-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 electric-indent-mo= de: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 me= nu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-loc= k-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2= =A0 minibuffer-regexp-mode: t
=C2=A0 line-number-mode: t
=C2=A0 inden= t-tabs-mode: t
=C2=A0 transient-mark-mode: t
=C2=A0 auto-composition-= mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: = t
=C2=A0 abbrev-mode: t

Load-path shadows:
None found.

= Features:
(shadow sort mail-extr emacsbug message yank-media puny dired<= br>dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
= gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gm= m-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsv= r mail-utils time-date comp-run comp-common rx eglot
external-completion= jsonrpc xref flymake thingatpt project compat diff
diff-mode track-chan= ges easy-mmode ert pp ewoc debug backtrace find-func
filenotify warnings= compile text-property-search comint ansi-osc
ansi-color ring pcase imen= u completion-preview yasnippet cc-mode
cc-fonts cc-guess cc-menus cc-cmd= s cc-styles cc-align cc-engine cc-vars
cc-defs cl-extra help-mode use-pa= ckage-core finder-inf
yasnippet-autoloads package browse-url url url-pro= xy url-privacy
url-expand url-methods url-history url-cookie generate-li= sp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source c= l-seq
eieio eieio-core cl-macs icons password-cache json subr-x map byte= -opt
gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl=
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp= -float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tou= ch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list
re= place newcomment text-mode lisp-mode prog-mode register page tab-bar
men= u-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-loc= k font-lock syntax font-core term/tty-colors frame minibuffer
nadvice se= q simple cl-generic indonesian philippine cham georgian
utf-8-lang misc-= lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp519= 32 hebrew greek romanian slovak czech european
ethiopic indian cyrillic = chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-= cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs them= e-loaddefs faces cus-face macroexp
files window text-properties overlay = sha1 md5 base64 format env
code-pages mule custom widget keymap hashtabl= e-print-readable backquote
threads dbusbind inotify dynamic-setting syst= em-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-= tty move-toolbar
make-network-process native-compile emacs)

Memor= y information:
((conses 16 254279 18736) (symbols 48 15078 0) (strings 3= 2 66912 2838)
=C2=A0(string-bytes 1 2272245) (vectors 16 41013)
=C2= =A0(vector-slots 8 418802 16721) (floats 8 88 172) (intervals 56 1405 0)=C2=A0(buffers 992 18))

--000000000000107be4062f145df2-- From unknown Tue Jun 17 01:47:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76606: 30.1; Conflict between completion-preview and yasnippet Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2025 07:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Vincent Foley Cc: 76606@debbugs.gnu.org Received: via spool by 76606-submit@debbugs.gnu.org id=B76606.174064262823367 (code B ref 76606); Thu, 27 Feb 2025 07:51:02 +0000 Received: (at 76606) by debbugs.gnu.org; 27 Feb 2025 07:50:28 +0000 Received: from localhost ([127.0.0.1]:57858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnYf6-00064o-At for submit@debbugs.gnu.org; Thu, 27 Feb 2025 02:50:28 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:56746 helo=eshelyaron.com) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnYf2-00064Z-Ue for 76606@debbugs.gnu.org; Thu, 27 Feb 2025 02:50:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1740642624; bh=SlhWA/XJQT62bG5bYEkVK8jR+UlV2RfjDhGaPEzyS8M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WgPILS/tjfI8+5qlzaamKsS50I5R90tOU2FTt5G3FuAS2khEX0S56N6WG5AO8Poqp e4keMUnMVuIUVbX/Hj6ekgS8esaJcQ7VT1DRRYrvGrTJA+xK9iEluHrqMFiCTy2IoT 7yMEax5PrvSKPKmmuGQax80tJ6i1F07+5swSaAXyf+iwfg+pTT7CtZGXfG8e9eqLeX HmnZ/USWiL5hiSrJC/BdmmldmsqebDCCAbywacaMw1aGVh0QWX+GqYoISCFRyhcnC4 7M/qYcHtICNP9IIwdFimSjvb1gS2NVVPBdvhj1gdlMButDmLXF/8DvVm3LgOOUnkI0 Dhakyxhv2rCHA== From: Eshel Yaron In-Reply-To: References: Date: Thu, 27 Feb 2025 08:50:21 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi there, Vincent Foley writes: > 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)) Thank you for the detailed report. I can reproduce the issue. A general note: TAB (completion-preview-insert) accepts the whole completion suggestion, while M-i (completion-preview-complete) only inserts the common prefix of all completion candidates. In this case these happen to be the same since there's only one candidate, expect that TAB doesn't suffer from the problem you've stumbled upon. The following diff should fix this bug, could you please test it? diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el index 4928d9a8824..eb4b9111b30 100644 --- a/lisp/completion-preview.el +++ b/lisp/completion-preview.el @@ -520,6 +520,7 @@ completion-preview-complete ;; hook update the completion preview in case the candidate ;; can be completed further. (when (functionp efn) + (completion-preview-active-mode -1) (funcall efn (concat base com) (if (cdr all) 'exact 'finished))) ;; Otherwise, remove the common prefix from the preview. (completion-preview--inhibit-update) Regards, Eshel From unknown Tue Jun 17 01:47:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76606: 30.1; Conflict between completion-preview and yasnippet Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2025 08:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Vincent Foley , Eshel Yaron , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Cc: 76606@debbugs.gnu.org Received: via spool by 76606-submit@debbugs.gnu.org id=B76606.1740645386406 (code B ref 76606); Thu, 27 Feb 2025 08:37:01 +0000 Received: (at 76606) by debbugs.gnu.org; 27 Feb 2025 08:36:26 +0000 Received: from localhost ([127.0.0.1]:58016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnZNZ-00006T-H4 for submit@debbugs.gnu.org; Thu, 27 Feb 2025 03:36:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47398) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnZNY-00006H-8v for 76606@debbugs.gnu.org; Thu, 27 Feb 2025 03:36:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tnZNS-0006qX-Lz; Thu, 27 Feb 2025 03:36:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=H5vSOHeVUhqpIwqGTMHwKITflQVQEZD90BHnSSRPDeU=; b=hFRSntE5DfiHOgQbyypM TjAtw+PpgJrmm6ZAalTgHFEJbM+xQxURf3szPSMNhepbxUSlaepGpLBd66ja5wfbbP5bfvbZ55AVI OUYNvDI+OP67ftVLCJaA6U3XBWDlc1l7Pd29GBy/ssl2LBYQh0w1HJ3jLCOyCwGWUMM8LjbxGbLwI 2r4Vc1fAtSZT55MEqOU/Q0HPkpBBmtKvax42wAr9Zift47JDXpXFPwMeF8WD+ljQn7itM5XIg5Zal GxDog3pMisTSdnd7YE6CBDcxrBx7z16981zzkA0BJpMGegf4cL/CLXjj9RJ2PwHdIOym+MPTuN7K1 5nuomHLUhioxFw==; Date: Thu, 27 Feb 2025 10:36:03 +0200 Message-Id: <86v7svu6mk.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Vincent Foley on Wed, 26 Feb 2025 20:29:16 -0330) References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Vincent Foley > 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. From unknown Tue Jun 17 01:47:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76606: 30.1; Conflict between completion-preview and yasnippet Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2025 08:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Vincent Foley , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , 76606@debbugs.gnu.org Received: via spool by 76606-submit@debbugs.gnu.org id=B76606.17406463943743 (code B ref 76606); Thu, 27 Feb 2025 08:54:02 +0000 Received: (at 76606) by debbugs.gnu.org; 27 Feb 2025 08:53:14 +0000 Received: from localhost ([127.0.0.1]:58072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnZdq-0000yJ-53 for submit@debbugs.gnu.org; Thu, 27 Feb 2025 03:53:14 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:39830 helo=eshelyaron.com) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnZdn-0000yA-Ap for 76606@debbugs.gnu.org; Thu, 27 Feb 2025 03:53:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1740646390; bh=s3fIMvOtIHDkNBI+9BnmGU1uqmsXW+wk497eV8AmXvs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=sObHd/5lYrnhZna+R7NbIX/KRld6uTpf9U0IBoWjrNCgBg4L+oS6rvI173NB1h4XN 9HfNSb+d+hUo2cpYAlsxdYj6RJvSiIXFmR+j+uERLMbC4aITr8lWS82jX/T/1Su+39 G5GNsOoCUMg/kMVc7tBXf71kp4e7KbXYM7tT+JC1H317IYMKbJUd91wAg18BynlLW2 xDRfbr1U+m+shkzr+KDL1CNMefpoOem4JqMnPykvz+PFJMCnS2zP++x2a2YKQJh67c cV6kzEwLZMVfneZ0zNNXiFbMT/SIsNVJXzimj+OmKAA0Iqk98eaI2+gTZ4OAbr9QJK P2qUy5d30Fqvw== From: Eshel Yaron In-Reply-To: <86v7svu6mk.fsf@gnu.org> References: <86v7svu6mk.fsf@gnu.org> Date: Thu, 27 Feb 2025 09:53:01 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Thanks, I'm adding Eshel and Jo=C3=A3o to this discussion. Thanks Eli, I already took a look and saw the cause (and hopefully a fix) in completion-preview.el, see my reply to Vincent. Eshel From unknown Tue Jun 17 01:47:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76606: 30.1; Conflict between completion-preview and yasnippet Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2025 09:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eshel Yaron Cc: vfoley@gmail.com, joaotavora@gmail.com, 76606@debbugs.gnu.org Received: via spool by 76606-submit@debbugs.gnu.org id=B76606.17406470305896 (code B ref 76606); Thu, 27 Feb 2025 09:04:01 +0000 Received: (at 76606) by debbugs.gnu.org; 27 Feb 2025 09:03:50 +0000 Received: from localhost ([127.0.0.1]:58088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnZo5-0001X1-Kw for submit@debbugs.gnu.org; Thu, 27 Feb 2025 04:03:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34726) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnZo1-0001Wf-Tg for 76606@debbugs.gnu.org; Thu, 27 Feb 2025 04:03:47 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tnZnw-000335-Dr; Thu, 27 Feb 2025 04:03:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=FjBZnz/0qEBG2vtGE8O3vLIAXSDB5PQjtvd9IUPj9X8=; b=cRvgtQZ/xcMUHHnu48lV Ik3XNSGE/D7BzFcGHMUAlO6Fyk+3e+YRic3WtsrkfEsv9JArbr1SL50HnXK0N435tt8h2DZNnZiV7 DMqqrhJ+lZSh8xwejB/vR/NBcN3cKvsu/LfkJypD6d3QzY9se54bnjvPaojKv00cO1ODLNQ/DMS1z LOQEQI4cXVtb6pT1+HRlcS5F19hmw+jQQpk0x/0ZhBfyttop0zsuvIzflv0weKeBixrfmyWFeq2Rc GEDAYP2aVo74nX5ai9d3fYU9nF8RcsKSLXBIFy1EDjv6n9DXxYe+zVWui+BWp2VE1bIzFLtfeXnzc mnCkCBqgu2djUA==; Date: Thu, 27 Feb 2025 11:03:24 +0200 Message-Id: <86o6ynu5cz.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Eshel Yaron on Thu, 27 Feb 2025 09:53:01 +0100) References: <86v7svu6mk.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Eshel Yaron > Cc: Vincent Foley , João Távora > , > 76606@debbugs.gnu.org > Date: Thu, 27 Feb 2025 09:53:01 +0100 > > Eli Zaretskii writes: > > > Thanks, I'm adding Eshel and João to this discussion. > > Thanks Eli, I already took a look and saw the cause (and hopefully a fix) > in completion-preview.el, see my reply to Vincent. Thanks! From unknown Tue Jun 17 01:47:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76606: 30.1; Conflict between completion-preview and yasnippet Resent-From: Vincent Foley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2025 13:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eshel Yaron Cc: 76606@debbugs.gnu.org Received: via spool by 76606-submit@debbugs.gnu.org id=B76606.174066217213611 (code B ref 76606); Thu, 27 Feb 2025 13:17:02 +0000 Received: (at 76606) by debbugs.gnu.org; 27 Feb 2025 13:16:12 +0000 Received: from localhost ([127.0.0.1]:59907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tndkK-0003XT-6w for submit@debbugs.gnu.org; Thu, 27 Feb 2025 08:16:12 -0500 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:59656) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tndkH-0003WI-EW for 76606@debbugs.gnu.org; Thu, 27 Feb 2025 08:16:10 -0500 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-30a2f240156so10938021fa.3 for <76606@debbugs.gnu.org>; Thu, 27 Feb 2025 05:16:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740662162; x=1741266962; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WbyI4wqQfvjKqvb2DrPhQIit0kQKfxWmFX0HutXABn4=; b=Xf/Reg3mJ+0OmoXr8b1edvQUN9iZO2+SsBGQU4gVSULjLbZaZmSbrphSCsO5zb40HZ G93yQktD7sC0KX8wA0cuniQQeeK5+H2fSYDu8LJFoYFnOEX8BmUQnLF0FQG98neXCoEX pYNFMcq5cGZRwBHTfPEquKhC6yIrlBN/sfmBFALVV6glAf/AYkl/tybnz01cfDZ5pZfo 9oC/YWVod28qW8oRaE17G7Y77uOvRopoPvpVhrW1cFjW7429B+nktM7h/xA2O+dPRn8y vZx7QQF+MkGWLYFqIUe3VOSlLqoDGqCazwG2sh9Bn7qJDKqTcaNTcejthTqgTzpHOOoB lmLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740662162; x=1741266962; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WbyI4wqQfvjKqvb2DrPhQIit0kQKfxWmFX0HutXABn4=; b=xCQrsFnBqpDJYCMS6lrb0de9SMoX3jq9PqpISPYjT3yFUQl5SQ88JmxPogdQIehPr6 ZsNB9Ec6VK+wzpiJVtujVT5kLQJROgn5GzHlDdpYZ+x9YMTxZUz1/fCiXyk6HC/l9zEF nnBcvXZApVgkeNIfgIIVVM53ItCf82AdkhZnQKKXrw6C85MlsW9KCHT7UHxFhLLzpZEl G9xzGYbBoJLaYHGte/sRCAmTfOs2bg+Dd2mbh+Q5Gehvnol+X1d+fU3yrE1b/uz09IZk kyD22dmYJ1yRep6osWDRgVQOynyNgSrheL4X2u+yiSkIu6HWzJnHdRxmgo0jKVHqPinq nVNg== X-Gm-Message-State: AOJu0YyXd+k4q0BIAuIlfSR3iVS5iVY3z3zBzXoZRIFL4c5ZYw220zzE xyal2cf7q9J6NbG3b3FYnArGDm4GfSRM/loWl4HcisksHP8BPf1y2Z3CJ2x8cqK4oAHtnCtgoUA aRwoHfnvDIGv6XBxMebeR7VvEEqw= X-Gm-Gg: ASbGncusA9YjMClld49fODwVSmT4xuQwGp4PpFGezItQ4IN8szj4ezivWhLkYflLiOj 9082v5lV+LJohs6k9oOJLLl/QdYb70vUtar7aUCzlH+W+bBAU9PPBzPseGZhELiR3Rdel0BxGtP b5XVxD//k= X-Google-Smtp-Source: AGHT+IFbuhX1/mO0Lof+hOFvT7T0JDe3NcIQ0VVonXeET5TKk/oA7lZYSc6G7lZlbgBf3pu7vmMlRsuDw+9L/QLyw+Y= X-Received: by 2002:a05:6512:3e05:b0:546:2ea9:6666 with SMTP id 2adb3069b0e04-5493c5b8deemr4977630e87.34.1740662161915; Thu, 27 Feb 2025 05:16:01 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Vincent Foley Date: Thu, 27 Feb 2025 09:45:50 -0330 X-Gm-Features: AQ5f1JrK826KjLPJirUal1XLdj7HbZWXyOsv-2QVi2yRTEGD_apQNRUuJ8LxA1o Message-ID: Content-Type: multipart/alternative; boundary="000000000000d5c911062f1f7d4c" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000d5c911062f1f7d4c Content-Type: text/plain; charset="UTF-8" > > The following diff should fix this bug, could you please test it? > > diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el > index 4928d9a8824..eb4b9111b30 100644 > --- a/lisp/completion-preview.el > +++ b/lisp/completion-preview.el > @@ -520,6 +520,7 @@ completion-preview-complete > ;; hook update the completion preview in case the candidate > ;; can be completed further. > (when (functionp efn) > + (completion-preview-active-mode -1) > (funcall efn (concat base com) (if (cdr all) 'exact > 'finished))) > ;; Otherwise, remove the common prefix from the preview. > (completion-preview--inhibit-update) > > > > Regards, > > Eshel > Hi Eshel, I applied this patch to my emacs-30.1 source tree and I can confirm that it fixes the issue. Thank you for addressing this so quickly! Vincent --000000000000d5c911062f1f7d4c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The following diff should fix this bug, could you please test it?

diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el
index 4928d9a8824..eb4b9111b30 100644
--- a/lisp/completion-preview.el
+++ b/lisp/completion-preview.el
@@ -520,6 +520,7 @@ completion-preview-complete
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; hook update the completi= on preview in case the candidate
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; can be completed further= .
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when (functionp efn)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (completion-preview-activ= e-mode -1)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(funcall efn (concat= base com) (if (cdr all) 'exact 'finished)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Otherwise, remove the common pr= efix from the preview.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(completion-preview--inhibit-updat= e)



Regards,

Eshel

Hi Eshel,

=C2=A0I applied this patch to my emacs-30.1 source tree and I can confirm= that
it fixes the issue. Thank you for addressing this so quickly!
<= br>Vincent
--000000000000d5c911062f1f7d4c-- From unknown Tue Jun 17 01:47:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76606: 30.1; Conflict between completion-preview and yasnippet Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2025 13:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Vincent Foley Cc: Eli Zaretskii , 76606@debbugs.gnu.org Received: via spool by 76606-submit@debbugs.gnu.org id=B76606.17406639136437 (code B ref 76606); Thu, 27 Feb 2025 13:46:03 +0000 Received: (at 76606) by debbugs.gnu.org; 27 Feb 2025 13:45:13 +0000 Received: from localhost ([127.0.0.1]:60246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tneCP-0001en-G1 for submit@debbugs.gnu.org; Thu, 27 Feb 2025 08:45:13 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:36450 helo=eshelyaron.com) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tneCM-0001Ra-2n for 76606@debbugs.gnu.org; Thu, 27 Feb 2025 08:45:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1740663909; bh=F/AfWgr6GAouLMLzqnJnu3EE1oXZnYZxSw8o6pR6YFk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=NXIyrSU7EP2dcOFEL/+cHQs/Im6xExjDCDzadjo8OwhrGizcya29ju21AC181lVcv GW+64VAL4XX87Qjg7JD0z/rnE4nyhT6YTzPop+RZRj6jC7GaAu972y50kgUHipwP6R btojAwXx+huPURlWh+dd9unMXIBwxbTWPXFtpYlr3UgrrHDkCKm9SZPGzjsaasU1AO M0abP0KFwnt0l8H9m6P7aRO3f1E7qD2v66LR9hw48+NxQa8meBZ8TwpkOGyJX08KwL MSjnD6GUa79QcBX76Ou8/heTVRUOti4cvohokOl/2Hed5u3TMAhAY0lIVyTnXPqyba 88qKm4mD7X8fQ== From: Eshel Yaron In-Reply-To: References: Date: Thu, 27 Feb 2025 14:45:01 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Vincent Foley writes: >> The following diff should fix this bug, could you please test it? >> >> diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el >> index 4928d9a8824..eb4b9111b30 100644 >> --- a/lisp/completion-preview.el >> +++ b/lisp/completion-preview.el >> @@ -520,6 +520,7 @@ completion-preview-complete >> ;; hook update the completion preview in case the candidate >> ;; can be completed further. >> (when (functionp efn) >> + (completion-preview-active-mode -1) >> (funcall efn (concat base com) (if (cdr all) 'exact 'finished))) >> ;; Otherwise, remove the common prefix from the preview. >> (completion-preview--inhibit-update) >> >> Regards, >> >> Eshel > > Hi Eshel, > > I applied this patch to my emacs-30.1 source tree and I can confirm that > it fixes the issue. Thank you for addressing this so quickly! Great, thanks for confirming. Eli, is this fix OK for the emacs-30 branch or should it go to master? Eshel From unknown Tue Jun 17 01:47:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76606: 30.1; Conflict between completion-preview and yasnippet Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2025 14:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eshel Yaron Cc: vfoley@gmail.com, 76606@debbugs.gnu.org Received: via spool by 76606-submit@debbugs.gnu.org id=B76606.174066586228565 (code B ref 76606); Thu, 27 Feb 2025 14:18:02 +0000 Received: (at 76606) by debbugs.gnu.org; 27 Feb 2025 14:17:42 +0000 Received: from localhost ([127.0.0.1]:60630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnehq-0007Qf-5C for submit@debbugs.gnu.org; Thu, 27 Feb 2025 09:17:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35062) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnehn-0007QH-Q2 for 76606@debbugs.gnu.org; Thu, 27 Feb 2025 09:17:40 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tnehh-000395-H1; Thu, 27 Feb 2025 09:17:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Tn2wOAr9Z8jD3+XWLnJi4p/ssrq/HsLgJTZ0GmlsUrU=; b=UDQ32IVqlYaW o+wfYL/xz/MUyLgI6fjzTIJp0mCmCeXH3Ic8Mt3gInvurT5Gt8C+41PCQ+hZx2aLbRlY6dmKMvmsF LVLprWv3bSUkN8yBY9woNzpKYBnVHmBFMRXb4S8Ud+drlGMEmo/fuQIr4GAJN3EqYim0nAka4Ai+P 1b5EisrcI0YtVuBk1caI7T8sbb3HiT7zYQP1hSEhwXMeYgSMx8k8PjmccGdSn1I1F3Ppj1p7DSGAj hIMX14sZ4ZPgj0uSjSAkrTXTo7QreM/Cz+JzN5U6Umpnbsax86+Yt07aULeg61/hkiRm3WtogxlPF lZVvxiePHftq5PRVO5tPjA==; Date: Thu, 27 Feb 2025 16:17:07 +0200 Message-Id: <86h64ftqu4.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Eshel Yaron on Thu, 27 Feb 2025 14:45:01 +0100) References: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Eshel Yaron > Cc: 76606@debbugs.gnu.org, Eli Zaretskii > Date: Thu, 27 Feb 2025 14:45:01 +0100 > > Vincent Foley writes: > > > I applied this patch to my emacs-30.1 source tree and I can confirm that > > it fixes the issue. Thank you for addressing this so quickly! > > Great, thanks for confirming. > > Eli, is this fix OK for the emacs-30 branch or should it go to master? It should go to emacs-30, since completion-preview was introduced in Emacs 30.1. From unknown Tue Jun 17 01:47:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76606: 30.1; Conflict between completion-preview and yasnippet Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2025 14:43:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: vfoley@gmail.com, 76606@debbugs.gnu.org Received: via spool by 76606-submit@debbugs.gnu.org id=B76606.17406673237896 (code B ref 76606); Thu, 27 Feb 2025 14:43:03 +0000 Received: (at 76606) by debbugs.gnu.org; 27 Feb 2025 14:42:03 +0000 Received: from localhost ([127.0.0.1]:32975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnf5O-000232-IK for submit@debbugs.gnu.org; Thu, 27 Feb 2025 09:42:03 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:58218 helo=eshelyaron.com) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnf4p-0001zD-6J; Thu, 27 Feb 2025 09:41:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1740667286; bh=SFlZW+VgVcaK9cGS4qaSDXOlfrGQwSdlzkrrca7fp/Y=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=tUaf4NwOq1msUXuZzdiPN/yNXk6ICau9DXJAPWIoXNhx/NkZ+7Eb8PYtQcghR/tHO jdE+fqA+UMMUSZ7SLX/b2NAsBg+qF+7CjUL/rHy9/2ICuhVmwXX7oBrBdu93o7mQ4K wUx3vGSKdW3Y0SgvA+2G5nDa2WkhaugxE00jQneW55cxBTGG5uWzQ7xXj7a1y0Npmq 26TSwuQXe6D5+Dzv2/NDxC6b+u7EPUBdGf6gv/dhRoG469fvXJLnNtJLbOyXQfl6FQ BbTDEZTlTd1h7rTXhA2NclvOsbXBuzwGgtRNzVRYunP6RgWCwRuXJmXSno9bSnRzhp /rITVht4D+m/w== From: Eshel Yaron In-Reply-To: <86h64ftqu4.fsf@gnu.org> References: <86h64ftqu4.fsf@gnu.org> Date: Thu, 27 Feb 2025 15:41:24 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 76606 30.2 quit Eli Zaretskii writes: >> From: Eshel Yaron >> Cc: 76606@debbugs.gnu.org, Eli Zaretskii >> Date: Thu, 27 Feb 2025 14:45:01 +0100 >> >> Vincent Foley writes: >> >> > I applied this patch to my emacs-30.1 source tree and I can confirm that >> > it fixes the issue. Thank you for addressing this so quickly! >> >> Great, thanks for confirming. >> >> Eli, is this fix OK for the emacs-30 branch or should it go to master? > > It should go to emacs-30, since completion-preview was introduced in > Emacs 30.1. Thanks, done in commit 840c6824589. I'm therefore closing this bug.