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

repl: beep and ignore unrecognized inputs rather then crashing #9713

Closed

Conversation

srp
Copy link
Contributor

@srp srp commented Jan 10, 2015

Fixes #9696

@ivarne
Copy link
Sponsor Member

ivarne commented Jan 10, 2015

Pretty useless to beep when beep is disabled.

@ivarne
Copy link
Sponsor Member

ivarne commented Jan 10, 2015

But that seems to be fixed in #9710

@Keno
Copy link
Member

Keno commented Jan 11, 2015

This isn't the right place to put this, because it's generic code. It should probably go in one of the keymaps instead.

@ivarne ivarne added the REPL Julia's REPL (Read Eval Print Loop) label Jan 11, 2015
@JeffBezanson
Copy link
Sponsor Member

Shouldn't the fallback behavior for unhandled keys apply to all keymaps?

@Keno
Copy link
Member

Keno commented Jan 11, 2015

This code isn't julia REPL specific. I would rather disallow creating keymaps that don't specify a default.

@stevengj
Copy link
Member

@Keno, since this is the default that nearly all imaginable keymaps would want for undefined inputs, wouldn't it make more sense to put it here rather than force this code to be repeated in every keymap? If the keymap really wants to throw an exception, they can always specify a different default, no?

@srp
Copy link
Contributor Author

srp commented Jan 13, 2015

I didn't understand what @Keno was saying at first, but I've been learning a lot more about keymaps. Now that I have a much better understanding about what's going on, I don't think we should be seeing this failure, I believe there may be a but where the default key in the keymap of the highest precedence isn't propagated to the lower precedent keymaps. I arrived at that this morning, but haven't had time to try to prove it and identify the bug.

If that's the case, I'd also agree with @Keno that this check should be replaced with an error at keymap creation time for any keymaps missing defaults.

@Keno
Copy link
Member

Keno commented Jan 13, 2015

I can take another look at the code. I suspect this place to add the default may be wrong anyway.

@srp srp closed this Jan 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shift-enter kills REPL on Linux
5 participants