GNU bug report logs - #67609
29.1; (eglot-inlay-hints-mode -1) behaves surprisingly, does not work in cc-mode hooks

Previous Next

Package: emacs;

Reported by: Morgon Kanter <morgon.kanter <at> gmail.com>

Date: Sun, 3 Dec 2023 18:35:02 UTC

Severity: normal

Found in version 29.1

Full log


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

From: Morgon Kanter <morgon.kanter <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: 67609 <at> debbugs.gnu.org
Subject: Re: bug#67609: 29.1; (eglot-inlay-hints-mode -1) behaves
 surprisingly, does not work in cc-mode hooks
Date: Sun, 3 Dec 2023 14:02:24 -0500
Hi João,

> Hi.  Because you're using 'eglot-ensure' (hint, maybe you
> shoudn't, read the manual in the latest master for why)
> it means that after the eglot-ensure form executes,
> Eglot will not be setup yet, so the following form
> has no effect.  You need to replace it with [snip]

I believe there is more to the story than this. I can remove the
eglot-ensure, load eglot so eglot-inlay-hints-mode is a valid symbol,
and replace my config with this:

(defun config:cc-defaults ()
  ;(setq c-require-final-newline t)  ;; lol causes errors in cc-mode
  (c-toggle-comment-style 1)
  (subword-mode 1)
  (diminish 'subword-mode)
  (local-set-key (kbd "C-M-S-<backspace>") #'kill-outer-sexp-and-parens)
  (eglot-inlay-hints-mode -1))

...and I will receive the same behavior. The eglot-ensure here is a red herring.

To reproduce, visit a C++ buffer in a project, run M-x eglot. Inlay
hints will appear. Kill and reopen the buffer. Inlay hints will
appear.

-- Morgon




This bug report was last modified 1 year and 187 days ago.

Previous Next


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