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

ERL-1068: edlin: Improved bash-emacs UX #3918

Closed
OTP-Maintainer opened this issue Oct 15, 2019 · 2 comments
Closed

ERL-1068: edlin: Improved bash-emacs UX #3918

OTP-Maintainer opened this issue Oct 15, 2019 · 2 comments

Comments

@OTP-Maintainer
Copy link

Original reporter: dogweather
Affected version: OTP-19.1.1
Component: Not Specified
Migrated from: https://bugs.erlang.org/browse/ERL-1068


As a user of erl, The Erlang Emulator, or iex, The Elixir Shell, my expectation is that it will act like other emacs-key shells and REPLs I've used. And it does for 99% of the functionality. However, there are two extremely common {{ctrl-}} keystrokes that edlin acts in a surprisingly different manner:

{{ctrl-d}}   Bash, and other prog langage REPLs will immediately exit when this is typed on an empty line. Erl/Iex, in contrast, appears to do nothing, and provides no feedback to the user. (When pressed in the middle of a line, edlin performs the same as bash et al, by deleting ahead.)

{{ctrl-l}}    Users have the expectation that this will clear the screen, and re-draw the prompt. In erl/iex, however, it appears to do nothing, and provides no user feedback.

Polyglot programmers would immensely benefit from either;

* Improving the emacs emulation to act like other similar apps for these two keystrokes, or
* Providing a configuration mechanism so that users can customize the keymapping.

I'd really like to contribute a PR for this work --- would the Erlang project be open to it?

See:  https://github.com/erlang/otp/blob/master/lib/stdlib/src/edlin.erl#L220 -- the hard-coded key mapping for {{ctrl-d}}
@OTP-Maintainer
Copy link
Author

josevalim said:

Ctrl+D has already been proposed here: https://bugs.erlang.org/browse/ERL-331. There is also a link to a PR that was rejected with a proper rationale. It is probably best to continue the Ctrl+D discussion there.

@OTP-Maintainer
Copy link
Author

lukas said:

yes, please continue the discussion in the existing ticket.

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

No branches or pull requests

1 participant