From: Philip Kaludercic <philipk@posteo.net>
To: "João Távora" <joaotavora@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
58839@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>
Subject: bug#58839: [Patch] Re: bug#58839: 29.0.50; project-kill-buffer fails when Eglot is running
Date: Wed, 02 Nov 2022 14:42:59 +0000 [thread overview]
Message-ID: <87r0ylh0y4.fsf@posteo.net> (raw)
In-Reply-To: <87cza5sbfx.fsf@gmail.com> ("João Távora"'s message of "Wed, 02 Nov 2022 14:00:50 +0000")
João Távora <joaotavora@gmail.com> writes:
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> João Távora <joaotavora@gmail.com> writes:
>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>
>>>>> Not sure. This started has a report of hidden buffer being incorrectly
>>>>> killed by project.el.
>>>>
>>>> The issue that was reported was that Eglot/jsonrpc raised an error that
>>>> broke `project-kill-buffer'. This could have also all been solved by
>>>> wrapping a `with-demoted-errors' around `kill-buffer'.
>>>
>>> No. It couldn't. The error is there to show you among other things
>>> that the LSP connection isn't being shut down correctly, which is not
>>> something to paper over. And even if you did paper over the error, you
>>> would break eglot-autoshutdown. I've explained that at least 3 times
>>> already in the beginning of this discussion.
>>
>> That was not my concern, my concern was that project-kill-buffer
>> broke. I continue to not see a reason why project.el should be
>> considered broken because of this, and not jsonrpc/eglot.
>
> It was always broken since the way it was created. Eglot's precedes it,
> I've also explained this.
This is not an argument.
> You can't kill a internal hidden buffer just
> because you can see it anymore than you unintern some "--" symbol in
> obarray simply because you can see it and don't like its inelegant name,
> or you think it's taking too much RAM. I can't really explain this any
> other way.
The equivalence is not given, more so because there is no package that
manages symbols the way that project.el manages buffers. If this is
all, your argument, or rather statement, is simply not convincing, no
matter how often it is reiterated. *
>> This is probably best solved by reading code. Can you point me to a few
>> functions/section/etc. that would help me clarify the situation.
>> I haven't made up my mind, I am just trying to understand all
>> perspectives, and get a better overview over the issue.
>
> OK, one last time. First, the above principle of encapsulation has
> nothing to do with LSP or Eglot or Jsonrpc.
Again, it is not given that this applies to buffers. Robust code should
be able to handle a missing resource or prevent the resource from being
revoked. This is not possible with buffers, so this is a design fault
with Eglot or Jsonprc. *
> Specifically in Eglot, as I already explained, eglot.el and jsonrpc.el
> colaborate so that jsonrpc.el holds a network process to communicate
> with the LSP server. It uses a buffer for more convenient and efficient
> parsing of messages. That buffer is out of bounds for Eglot (and anyone
> else).
Can I `switch-to-buffer' into it, can I `kill-buffer' it? Yes? So it
is not out of bounds, and a mistake was made in the design by assuming
this is the case. *
E.g. why does the buffer have a default directory?
> Eglot doesn't know or care that a buffer is being used, it only
> actuate on the handle using operations of jsonrpc.el's API. According
> to user options, Eglot provides controlled shutdown and reconnection
> using these operations.
OK, these appear as convince options that can be used, but don't prevent
me from killing any buffers. *
> All of this has worked for a long time and predates project.el's buffer
> collection/killing/switching logic.
Again, this is not an argument, just a statement of fact that doesn't
imply anything definitive. From the same statement I can also infer
that jsonrpc/Eglot had an undetected bug that was exposed by project.el.
You are committing an informal logical fallacy by assuming some kind of
temporal order in the attribution of mistakes. *
> If you or some Lisp package finds and destroys the hidden implementation
> detail, all the above is broken. Therefore packages like project.el
> that do it are buggy in that regard.
This is a "If it can be destroyed by the truth, it deserves to be
destroyed"-kind of thing. Double-dash symbols are "private" by
convention, but that might change in the future. Hidden buffers are
just not displayed, as said in the manual (found via the index):
Buffers that are ephemeral and generally uninteresting to the user
have names starting with a space, so that the ‘list-buffers’ and
‘buffer-menu’ commands don’t mention them (but if such a buffer visits a
file, it *is* mentioned). A name starting with space also initially
disables recording undo information; see *note Undo::.
The keywords being "ephemeral and generally uninteresting", not "private
and off-limits" This is not the same kind of thing like with a symbol
that was generated using `make-symbol', where you are guaranteed nobody
can access it without being passed the symbol directly or via some dirty
hacks. And just so it is clear, using `buffer-list' is not a dirty
hack. *
If you need private buffers, you either need to argue that the
convention be clarified in the reference manual or have these
implemented in such a way (e.g. by passing a flag to
`get-buffer-create') nobody can access a private buffer without being
passed the buffer object or via some dirty hacks. And just so it is
clear, using `buffer-list' is not a dirty hack.
* These are all "Strong Opinions, Weakly Held", I really don't care
about it too much. What I don't like about this discussion is the
tone you take in postulating the mistake was made somewhere else and
that is that. This is arrogant, unkind and non-constructive
behaviour. If necessary I am ready to discuss this off-list and
resolve any issues. I am inherently non-confrontation and dislike
the fact that I have to even clarify this. My top priority is
always to find common grounds.
I am almost never frustrated by discussions on the Emacs development
mailing list or in bug reports. The tone is at best productive, at
worst lethargic. This thread is an exception, which is very sad to
see. I implore you once more to consider the GNU Kind Communication
Guidelines and try to foster a productive and positive atmosphere.
next prev parent reply other threads:[~2022-11-02 14:42 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 12:56 bug#58839: 29.0.50; project-kill-buffer fails when Eglot is running Philip Kaludercic
2022-10-28 17:17 ` bug#58839: [Patch] " João Távora
2022-10-28 17:28 ` Philip Kaludercic
2022-10-28 17:36 ` João Távora
2022-10-28 18:14 ` Dmitry Gutov
2022-10-28 18:20 ` Philip Kaludercic
2022-10-28 18:30 ` João Távora
2022-10-28 18:40 ` Dmitry Gutov
2022-10-29 0:15 ` João Távora
2022-10-29 1:09 ` Dmitry Gutov
2022-10-29 1:39 ` João Távora
2022-10-29 11:27 ` Dmitry Gutov
2022-10-29 12:16 ` João Távora
2022-10-29 14:32 ` Philip Kaludercic
2022-10-29 20:38 ` João Távora
2022-10-29 22:01 ` Philip Kaludercic
2022-10-29 22:49 ` João Távora
2022-10-30 6:28 ` Eli Zaretskii
2022-10-30 12:40 ` João Távora
2022-10-30 15:58 ` Dmitry Gutov
2022-10-30 16:39 ` Eli Zaretskii
2022-10-30 19:13 ` Dmitry Gutov
2022-10-30 19:54 ` Eli Zaretskii
2022-10-30 21:15 ` Dmitry Gutov
2022-10-31 9:53 ` João Távora
2022-10-31 11:56 ` João Távora
2022-10-31 17:11 ` Dmitry Gutov
2022-10-31 20:36 ` João Távora
2022-10-31 22:26 ` Dmitry Gutov
2022-10-31 22:51 ` João Távora
2022-10-31 14:35 ` Philip Kaludercic
2022-10-31 17:33 ` Dmitry Gutov
2022-10-31 23:19 ` João Távora
2022-11-01 10:51 ` Philip Kaludercic
2022-11-01 13:22 ` Dmitry Gutov
2022-11-01 13:39 ` João Távora
2022-10-31 17:24 ` Dmitry Gutov
2022-10-31 20:58 ` João Távora
2022-10-31 22:51 ` Dmitry Gutov
2022-11-01 10:48 ` Philip Kaludercic
2022-11-01 10:59 ` João Távora
2022-11-01 11:23 ` Dmitry Gutov
2022-11-01 11:39 ` João Távora
2022-11-01 15:27 ` Dmitry Gutov
2022-11-01 16:23 ` João Távora
2022-11-01 22:24 ` Dmitry Gutov
2022-11-02 7:40 ` João Távora
2022-11-01 11:27 ` Philip Kaludercic
2022-11-01 11:59 ` João Távora
2022-11-01 13:03 ` Philip Kaludercic
2022-11-01 13:37 ` João Távora
2022-11-01 14:00 ` Philip Kaludercic
2022-11-01 14:11 ` João Távora
2022-11-01 14:36 ` Philip Kaludercic
2022-11-02 7:19 ` João Távora
2022-11-02 7:29 ` Philip Kaludercic
2022-11-02 7:48 ` João Távora
2022-11-02 8:21 ` Philip Kaludercic
2022-11-02 8:41 ` João Távora
2022-11-02 9:06 ` Philip Kaludercic
2022-11-02 9:52 ` João Távora
2022-11-02 11:31 ` Philip Kaludercic
2022-11-01 15:26 ` Dmitry Gutov
2022-11-01 18:44 ` Philip Kaludercic
2022-11-01 19:50 ` Dmitry Gutov
2022-11-01 20:10 ` Philip Kaludercic
2022-11-01 22:40 ` Dmitry Gutov
2022-11-01 11:36 ` João Távora
2022-11-01 22:23 ` Dmitry Gutov
2022-11-02 7:34 ` João Távora
2022-11-02 8:36 ` Philip Kaludercic
2022-11-02 8:50 ` João Távora
2022-11-02 9:13 ` Philip Kaludercic
2022-11-02 14:00 ` João Távora
2022-11-02 14:42 ` Philip Kaludercic [this message]
2022-11-02 17:32 ` Juri Linkov
2022-11-03 17:30 ` Juri Linkov
2022-11-03 18:19 ` João Távora
2022-11-02 18:16 ` João Távora
2022-11-04 1:13 ` Dmitry Gutov
2022-11-04 11:21 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-05 0:53 ` Dmitry Gutov
2022-10-29 6:38 ` Philip Kaludercic
2022-10-29 10:59 ` Dmitry Gutov
2022-10-29 11:12 ` João Távora
2022-10-29 11:05 ` João Távora
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=87r0ylh0y4.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=58839@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=joaotavora@gmail.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.