Subject: bug#58839: [Patch] Re: bug#58839: 29.0.50; project-kill-buffer fails when Eglot is running

From: João Távora <[email-masked]>
Date: Mon, 31 Oct 2022 22:51:59 +0000

Dmitry Gutov <[email-masked]> writes:

> On 31.10.2022 22:36, João Távora wrote:
>> Dmitry Gutov<[email-masked]>  writes:
>> 
>>> On 31.10.2022 13:56, João Távora wrote:
>>>> On Mon, Oct 31, 2022 at 9:52 AM João Távora <[email-masked]
>>>> <mailto:[email-masked]>> wrote:
>>>>   > In the little time I've used this feature since the start of this
>>>>   > discussion I have discovered it backfires no small number of occasions:
>>>>   > Eglot, CIDER,*scratch*,*ielm*,*sly-scratch*,*Completions*,...  Heck
>>>>   > even*ibuffer*  itself is targeted by this.
>>>> And you can add the gnus mail buffers to this list. If you are
>>>> unlucky
>>>> enough to start M-x gnus from a project file to read your email, then
>>>> closing that project in the future will take your gnus session, your
>>>> summary buffers, messages, etc. with it.  This can't possibly be considered
>>>> an exotic use case, and can't be right.
>>> Does Gnus use fundamental-mode for some of its important buffers?
>> No idea.  gnus-summary-modes is one of the modes
>> Try:
>> emacs -Q
>> C-x C-f some/file/in/a/project/foo.c
>> M-x  gnus ; Remember to check your email
>> ; read mail, make searches, etc
>> C-x b foo.c ; go back to the file
>> C-x p k ; Get preposterous confirmation prompt about tens of buffers about to be killed
>>          ; say yes, bye all those emails
>
> I suppose it might match
>
>   (and (derived-mode . special-mode)
>        (not (major-mode . help-mode)))
>
> then.

Whatever it's doing, it's completely wrong and must be fixed.  It
probably break other email clients too.

João