From: Spencer Baugh <sbaugh@janestreet.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gerd.moellmann@gmail.com, sbaugh@catern.com,
Eshel Yaron <me@eshelyaron.com>,
69809@debbugs.gnu.org
Subject: bug#69809: 30.0.50; flymake: error in process sentinel
Date: Tue, 16 Jul 2024 16:48:25 -0400 [thread overview]
Message-ID: <ierh6cpukpy.fsf@janestreet.com> (raw)
In-Reply-To: <86v81bktv5.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 Jul 2024 09:27:26 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Eshel Yaron <me@eshelyaron.com>
>> Cc: sbaugh@catern.com, Spencer Baugh <sbaugh@janestreet.com>, Eli
>> Zaretskii <eliz@gnu.org>, 69809@debbugs.gnu.org
>> Date: Thu, 11 Jul 2024 13:15:41 +0200
>>
>> Eshel Yaron <me@eshelyaron.com> writes:
>>
>> [...]
>>
>> > This issue bothered me as well. Here's a recipe for reproducing on
>> > master, with emacs -Q:
>> >
>> > 1. (add-hook 'c-mode-hook 'flymake-mode)
>> > 2. (add-hook 'c-mode-hook 'eglot-ensure)
>> > 3. Find some C file
>> >
>> > This happens because Eglot _restarts_ flymake-mode while flymake-cc's
>> > process is already running. Here's a simple fix:
>> >
>> > diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
>> > index a893a8d749a..c9e1bb7b52d 100644
>> > --- a/lisp/progmodes/eglot.el
>> > +++ b/lisp/progmodes/eglot.el
>> > @@ -2040,7 +2040,7 @@ eglot--managed-mode
>> > (unless (eglot--stay-out-of-p 'imenu)
>> > (add-function :before-until (local 'imenu-create-index-function)
>> > #'eglot-imenu))
>> > - (unless (eglot--stay-out-of-p 'flymake) (flymake-mode 1))
>> > + (unless (or (eglot--stay-out-of-p 'flymake) flymake-mode) (flymake-mode 1))
>> > (unless (eglot--stay-out-of-p 'eldoc)
>> > (add-hook 'eldoc-documentation-functions #'eglot-hover-eldoc-function
>> > nil t)
>>
>> I realized that the change above has the downside of no longer
>> immediately initiating a Flymake analysis with Eglot in place. To
>> preserve that behavior, maybe something like the following is better:
>>
>> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
>> index a893a8d749a..6cd48917d47 100644
>> --- a/lisp/progmodes/eglot.el
>> +++ b/lisp/progmodes/eglot.el
>> @@ -2040,7 +2040,8 @@ eglot--managed-mode
>> (unless (eglot--stay-out-of-p 'imenu)
>> (add-function :before-until (local 'imenu-create-index-function)
>> #'eglot-imenu))
>> - (unless (eglot--stay-out-of-p 'flymake) (flymake-mode 1))
>> + (unless (eglot--stay-out-of-p 'flymake)
>> + (if flymake-mode (flymake-start) (flymake-mode 1)))
>> (unless (eglot--stay-out-of-p 'eldoc)
>> (add-hook 'eldoc-documentation-functions #'eglot-hover-eldoc-function
>> nil t)
>
> Spencer, any comments?
>
> From where I stand, this is okay for the emacs-30 release branch,
> unless you think it could break some legitimate workflow.
Yes, this seems good for emacs-30. Thanks Eshel!
next prev parent reply other threads:[~2024-07-16 20:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-15 7:09 bug#69809: 30.0.50; flymake: error in process sentinel Gerd Möllmann
2024-03-21 10:23 ` Eli Zaretskii
2024-03-23 14:02 ` sbaugh
2024-03-23 14:20 ` Gerd Möllmann
2024-07-11 9:45 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-11 11:15 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-11 11:46 ` Gerd Möllmann
2024-07-12 6:27 ` Eli Zaretskii
2024-07-16 20:48 ` Spencer Baugh [this message]
2024-07-17 6:12 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-17 8:20 ` João Távora
2024-07-17 9:07 ` João Távora
2024-07-17 13:08 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-17 13:44 ` João Távora
2024-07-17 17:25 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-17 17:38 ` João Távora
2024-07-17 23:54 ` João Távora
2024-07-18 0:10 ` João Távora
2024-07-24 16:25 ` Spencer Baugh
2024-07-25 7:28 ` Eli Zaretskii
2024-07-25 7:45 ` João Távora
2024-07-25 10:50 ` Eli Zaretskii
2024-07-25 11:49 ` João Távora
2024-07-27 7:26 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ierh6cpukpy.fsf@janestreet.com \
--to=sbaugh@janestreet.com \
--cc=69809@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=gerd.moellmann@gmail.com \
--cc=me@eshelyaron.com \
--cc=sbaugh@catern.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.