emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70835: closed (eglot-managed-mode-hook doesn't run when minor mode i


From: GNU bug Tracking System
Subject: bug#70835: closed (eglot-managed-mode-hook doesn't run when minor mode is turned off)
Date: Sat, 01 Jun 2024 16:02:02 +0000

Your message dated Sat, 01 Jun 2024 19:01:17 +0300
with message-id <86jzj8odo2.fsf@gnu.org>
and subject line Re: bug#70958: 30.0.50; eglot-managed-mode hooks not called on 
shutdown
has caused the debbugs.gnu.org bug report #70958,
regarding eglot-managed-mode-hook doesn't run when minor mode is turned off
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
70958: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70958
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: eglot-managed-mode-hook doesn't run when minor mode is turned off Date: Wed, 08 May 2024 16:50:11 -0300
As the title says, the public facing `eglot-managed-mode-hook' doesn't
run when `eglot--managed-mode' is turned off. That can be tested with

    (add-hook 'eglot-managed-mode-hook
              (lambda ()
                (message "ran eglot-managed-mode-hook with eglot--managed-mode 
'%s'"
                         (if eglot--managed-mode "on" "off"))))

    (add-hook 'eglot--managed-mode-hook
              (lambda ()
                (message "ran eglot--managed-mode-hook with eglot--managed-mode 
'%s'"
                         (if eglot--managed-mode "on" "off"))))

In fact, as of Eglot version 1.17, that is caused by the following

    (defun eglot--maybe-activate-editing-mode ()
      "Maybe activate `eglot--managed-mode'.

    If it is activated, also signal textDocument/didOpen."
      (unless eglot--managed-mode
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        ;; Called when `revert-buffer-in-progress-p' is t but
        ;; `revert-buffer-preserve-modes' is nil.
        (when (and buffer-file-name (eglot-current-server))
          (setq eglot--diagnostics nil)
          (eglot--managed-mode)
          (eglot--signal-textDocument/didOpen)
          ;; Run user hook after 'textDocument/didOpen' so server knows
          ;; about the buffer.
          (eglot-inlay-hints-mode 1)
          (run-hooks 'eglot-managed-mode-hook))))

Calling run-hooks inside the definition of eglot--managed-mode, but I'm
not sure.

Best,

-- 
João Pedro de A. Paula
IT bachelors at Universidade Federal do Rio Grande do Norte (UFRN)

--- End Message ---
--- Begin Message --- Subject: Re: bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown Date: Sat, 01 Jun 2024 19:01:17 +0300
> From: João Távora <joaotavora@gmail.com>
> Date: Sat, 1 Jun 2024 16:48:47 +0100
> 
> Yes, thanks

Thanks, done.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]