emacs-circe / circe

Circe, a Client for IRC in Emacs
GNU General Public License v3.0
390 stars 51 forks source link

Confusing logic for `circe-server-killed-confirmation` settings #402

Open duckwork opened 2 years ago

duckwork commented 2 years ago

Hi there, and thanks for circe!

I'm writing an issue instead of submitting a PR because I want to make sure I'm not misunderstanding behavior here. According to the docstring of circe-server-killed-confirmation, a value of kill-all should kill all associated channel buffers without prompting the user. However, the code for circe-server-killed asks the user to confirm whenever circe-server-killed-confirmation is non-nil, including when it's kill-all.

However, when circe-server-killed-confirmation is nil, only the server buffer is killed. The way the options read, I thought nil would only kill the server buffer, kill-all would kill the server buffer and associated buffers without confirmation, and ask-and-kill-all would kill the server buffer and associated buffers with confirmation.

Have I misunderstood the logic of these choices, or is this a bug in circe-server-killed? From what I can tell, at this moment kill-all and ask-and-kill-all are identical except in the question they ask the user, which doesn't really make any sense.

Anyway, just let me know. I'm happy to submit a PR if it's a bug.

wasamasa commented 2 years ago

From what I understand, it's supposed to be a combination of these choices:

The naming is a bit unfortunate. It might make more sense to instead expose it as a list of these choices or maybe even two separate variables. Does the current behavior still seem to be a bug to you?

duckwork commented 2 years ago

A "bug," I'm not sure -- however, I would like the added choices. My personal want would be to kill the server and all chat buffers without confirmation, so maybe a list (a la modus-themes) of options might be good? Or two options might be easier to do.

Honestly two options, each taking a symbol or list of symbols, might be best. Like, circe-confirm could take kill, server-kill, join, or w/e, and circe-kill-chat-buffers-with-server could be t or nil. Or .. something along those lines.