Ticket #95 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

More default Emacs bindings

Reported by: viritrilbia Owned by:
Priority: trivial Milestone:
Version: Keywords:
Cc:

Description

In Emacs mode I would expect the following key-bindings to exist by default:

bind: ctrl-p up
bind: ctrl-n down
bind: ctrl-/ ctrl-_

Change History

Changed 5 years ago by judah

Thanks for the report! ctrl-p and ctrl-n have already been added in the development repo at http://code.haskell.org/haskeline .

I wasn't aware of the ctrl-/ binding; and when I try to use it in bash I don't get an effect. What is its purpose, and is it set by default in readline or another line editor?

Changed 5 years ago by viritrilbia

ctrl-/ works for me in bash. It means "undo," the same as ctrl-_. But it's easier to type because _ requires the shift key but / doesn't.

Changed 5 years ago by judah

I looked into this; some terminals automatically translate Ctrl-/ into C-_. For example, search the Emacs tutorial for "C-_": http://braeburn.aquamacs.org/code/master/etc/tutorials/TUTORIAL

I tried this out on OS X. In the Terminal.app program, ctrl-/ is not recognized by the terminal itself. But xterm in the X11 program does translate C-/ to C-_. In fact, C-/ *does* work in haskeline for me in X11.

Is there an environment (xterm, urxvt, etc.) on your machine such that ctrl-/ works in bash but not in Haskeline? If so, what is the output when you run "ghc -e getLine", type ctrl-/ and then return?

Changed 5 years ago by viritrilbia

That's weird, now C-/ is working for me too in haskeline, at least anywhere it works in bash. I could swear it wasn't working before, though.

Changed 5 years ago by judah

  • status changed from new to closed
  • resolution set to fixed

OK, thanks for the update; I'll close this ticket. Please re-open it if you do find a case where haskeline doesn't work but bash does.

Note: See TracTickets for help on using tickets.