5

I load GNU emacs in it's own window by typing emacs in the terminal. I like to use the keybindings from pc-selection-mode, which allows you to highlight characters using shift-right or shift-left, or entire lines by pressing shift-up or shift-down.

The problem is that when I run emacs in the terminal by typing emacs -nw, the latter 2 keybindings don't work. I can highlight characters using shift-left and shift-right, but pressing shift-up and shift-down doesn't do anything. The cursor stays where it is.

How do I fix this problem? Why is it even occurring? I'm using GNU Emacs 23.1.1, and I've confirmed that the same version is being used both when emacs is in it's own window and when emacs is running inside the terminal.

Thanks for any help

Eddy
  • 6,661
  • 21
  • 58
  • 71
  • Works for me emacs 22 on ubuntu 9.10. Anything enlightening in the *Messages* buffer when starting pc-selection-mode? I just see "Loading pc-select.. done" and "Loading delsel.. done". – Spacedman Nov 12 '10 at 17:23
  • Nope, just says 'Pc-Selection mode enabled ' – Eddy Nov 12 '10 at 17:25
  • Even when it's disabled, if I press shift-right or shift-left I can still move forwards and backwards through the text. It's just that shift-up and shift-down won't let me move up and down, whether pc-selection-mode is on or not. – Eddy Nov 12 '10 at 17:27
  • Could it be that shift-up and shift-down are conflicting with the keyboard shortcuts the terminal uses to scroll up and down? If you press shift-up in the terminal, it scrolls upwards. – Eddy Nov 12 '10 at 17:31
  • 2
    It seems that the terminal is intercepting `Shift+Up` and `Shift+Down`. If you want the keys to reach Emacs, you'll have to configure the terminal appropriately. How to do that entirely depends on the terminal: what terminal are you using, and on which operating system? – Gilles 'SO- stop being evil' Nov 12 '10 at 22:34

1 Answers1

2

A lot of times the bindings just aren't listed, or are mapped wrong. You can try M-x show-lossage (or C-h l) to see if the escape sequences reach emacs or not. If they do, you might want to try xterm-extras -- it's always worked even as I migrate between different versions of linux and solaris, and as I ssh between them (which is often a source of problems).

Ryan
  • 731
  • 6
  • 17