Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
duckwork opened this issue Sep 14, 2021 · 2 comments
Open

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

duckwork opened this issue Sep 14, 2021 · 2 comments

Comments

@duckwork
Copy link

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
Copy link
Collaborator

wasamasa commented Jan 1, 2022

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

  • Ask / Don't ask: Whether to display a question before doing any killing
  • Kill / Kill all: Whether to only send a /quit and delete the server process or kill all chat buffers as well

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
Copy link
Author

duckwork commented Jan 1, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants