From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Morgon Kanter Newsgroups: gmane.emacs.bugs Subject: bug#67609: 29.1; (eglot-inlay-hints-mode -1) behaves surprisingly, does not work in cc-mode hooks Date: Sun, 3 Dec 2023 13:28:36 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19982"; mail-complaints-to="usenet@ciao.gmane.io" To: 67609@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 03 19:35:14 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r9rJC-00052R-02 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Dec 2023 19:35:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9rJ0-0003ja-L0; Sun, 03 Dec 2023 13:35:02 -0500 Original-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 1r9rIr-0003j6-9c for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 13:34:55 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r9rIq-0001HJ-70 for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 13:34:53 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r9rJ0-0003Ez-5v for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 13:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Morgon Kanter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Dec 2023 18:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67609 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170162846312394 (code B ref -1); Sun, 03 Dec 2023 18:35:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Dec 2023 18:34:23 +0000 Original-Received: from localhost ([127.0.0.1]:60945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9rIM-0003Dp-VE for submit@debbugs.gnu.org; Sun, 03 Dec 2023 13:34:23 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:48962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9rDD-000313-O9 for submit@debbugs.gnu.org; Sun, 03 Dec 2023 13:29:04 -0500 Original-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 1r9rCy-0002Ue-Cj for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 13:28:48 -0500 Original-Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r9rCw-0005py-Ew for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 13:28:48 -0500 Original-Received: by mail-qv1-xf2d.google.com with SMTP id 6a1803df08f44-67a894ccb4eso24544446d6.3 for ; Sun, 03 Dec 2023 10:28:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701628125; x=1702232925; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=zbJUH69ThZgW5DpqlpdWTOCfVUlgeguwkXEPIxj9qrQ=; b=G5CrTuS5ckDtwU9qQECYRdS9b/0JOwXH5Bo/8K1yq1UKhAay/UOqr8Nv4QqId+LdGW kNxZ6m8bgD85szmEm2+Eg61w/ACItxG3kdOIY7QhZCd7/mI+m+pNvcv5nYadZjMbvTTA CwoqyElQQqpjOl+NVw7kr1vuURGY1B6T0VGvMLn6k85t1Yfh908ydlknBclEp+kWUMoC jjMozTDc4UpR8zU1lZPuMBjCdbfYJgNtrv87/QbmSoCdi43toJ1vN6/7IHwBst9EmLk/ vqpjPVtjEM8ikJCXSJSt9CTuFTXY2en5Dvp3pSkDZzj6SgXv+XX4aZwehBPd22rTz5Gq W3Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701628125; x=1702232925; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zbJUH69ThZgW5DpqlpdWTOCfVUlgeguwkXEPIxj9qrQ=; b=g8CnvnAtyR9qaTcFHx/wmKLZpipi1FSpgjBpoZSNVMgGFojZ2Hcc00+MBf2cqLt6dd CZYA95xvmGcnK/atiYcXfgmzHBadD0UB5Gv70efrSB9N57M66AAtgsnyV+UFwmtc6CuK Ikx4kCdqohBRUWzZdlfJCdcyENFPmFqIkkIGDo4z6vne3+9XifZ2Ug4TLIFKL+Vb73rm 9f2XGQZ0+3/QMFs1Ho26vI8vxLSeWPrJdFO/Uk1YpBA4ikvFGDRQB5bGut0jG2FU+oi9 iEl7G2zLQTnCh351C1/2NcmQBUEO4Gi1hED0Ljm6SAfn7eWqNvQceMc0vo+CTNhURqrD cBYQ== X-Gm-Message-State: AOJu0Ywcrz1tKtwsdUJV6fyOenytmMNOkorEfJQxZwnBWpwxtqKBKqvZ LZFtMS1pGQDmnOMPE4J+72vQxhWI2/5Fa/IIFjd9MyCr X-Google-Smtp-Source: AGHT+IH/hGPz3wdas2Ifak7Y/hnsWjn4ZECy3CcWL6Lf0XrBSGPnL84vuBjNgCe4LRZ3HqujNluCCfoR6MYZqMQTpLQ= X-Received: by 2002:a05:6214:16f:b0:67a:a8a7:9e56 with SMTP id y15-20020a056214016f00b0067aa8a79e56mr3198392qvs.71.1701628124817; Sun, 03 Dec 2023 10:28:44 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::f2d; envelope-from=morgon.kanter@gmail.com; helo=mail-qv1-xf2d.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 03 Dec 2023 13:34:21 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275443 Archived-At: eglot-inlay-hints-mode seems to always turn on, at least in cc-mode, even when explicitly disabled by a hook, leaving me to disable it once the buffer is loaded. For example, this is my config: (defun config:cc-defaults () (c-toggle-comment-style 1) (subword-mode 1) (diminish 'subword-mode) (local-set-key (kbd "C-M-S-") #'kill-outer-sexp-and-parens) ;; Run eglot if we're under a project. (when (project-current) (eglot-ensure) (eglot-inlay-hints-mode -1))) (add-hook 'c-mode-common-hook #'config:cc-defaults) This will, when visiting a C++ file for the first time, turn on eglot. Then it should also turn *off* the inlay-hints mode, but it does not. The inlay hints appear until I manually run eglot-inlay-hints-mode. This behavior appears even if I change the above configuration to remove the eglot-ensure portion, and simply run (eglot-inlay-hints-mode -1) unconditionally in the hook. They will still appear, and I still have to run it manually to turn it off. This behavior is, I think, different from most other mode configurations throughout Emacs which can be set up and torn down in hooks. In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) Windowing system distributor 'Microsoft Corporation', version 11.0.12010000 System Description: Arch Linux Configured using: 'configure --with-x-toolkit=gtk3 --with-native-compilation=aot --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --with-tree-sitter --localstatedir=/var --with-cairo --disable-build-details --with-harfbuzz --with-libsystemd --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/d Minor modes in effect: global-git-commit-mode: t magit-auto-revert-mode: t shell-dirtrack-mode: t marginalia-mode: t override-global-mode: t vertico-mode: t which-key-mode: t server-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/surgo/.emacs.d/elpa/transient-20231103.2312/transient hides /usr/share/emacs/29.1/lisp/transient /home/surgo/.emacs.d/elpa/seq-2.24/seq hides /usr/share/emacs/29.1/lisp/emacs-lisp/seq Features: (shadow sort mail-extr emacsbug misearch multi-isearch eglot external-completion array jsonrpc ert pp ewoc debug backtrace find-func xref flymake-proc flymake thingatpt compile project mule-util vc-git vc-dispatcher cap-words superword subword cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs magit-submodule magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff diff-mode git-commit log-edit message sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor comp comp-cstr warnings icons rx shell pcomplete comint ansi-osc ring ansi-color magit-mode transient magit-git magit-base magit-section format-spec cursor-sensor crm dash marginalia edmacro kmacro use-package-bind-key bind-key easy-mmode vertico compat diminish which-key cl-extra help-mode use-package-diminish use-package-core tango-dark-theme server magit-autoloads pcase git-commit-autoloads magit-section-autoloads dash-autoloads marginalia-autoloads projectile-autoloads transient-autoloads vertico-autoloads with-editor-autoloads info compat-autoloads seq-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 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 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 lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 262393 20795) (symbols 48 19979 3) (strings 32 68186 1843) (string-bytes 1 2926233) (vectors 16 46984) (vector-slots 8 840297 27324) (floats 8 117 317) (intervals 56 941 111) (buffers 984 17))