tags:

views:

361

answers:

2

I’m trying to replace pc-selection-mode with the new shift-select-mode with emacs 23. It works generally well, only the shift+pgup/down keys don’t create a selected region and I can’t find a confguration setting where I could tell emacs I want these keys too shift translated. Are the supported keys hardcoded? It would be so unlike emacs, so there must be some setting somewhere which I overlook. Any ideas?

A: 

With pc-select-mode enabled, Shift-PageUp is bound to scroll-down-mark and Shift-PageDown scroll-up-mark. scroll-down-mark is from pc-select.el so you have to require it before binding the keys (you don't have to enable pc-select).

Binding keys as mentioned can be done evaluating:

(require 'pc-select)
(global-set-key (kbd "S-<prior>") 'scroll-down-mark)
(global-set-key (kbd "S-<next>") 'scroll-up-mark)
danamlund
Okay, but the question is if I can skip pc-select altogether? If I still use it for those two keys then I could use it for all keys. I'd like to migrate to shift-select mode which is built-in, so that I don't have to use yet another external package for this.
pc-select is included in my ubuntu emacs-snapshot release.
danamlund
By built-in I mean it's in the Emacs binary. Check the definition of `this-command-keys-shift-translated', for example. Pc-select is included with emacs as lisp code. There is no reason to load additional lisp if the feature is loaded with the emacs binary anyway. That's why I want to use the built-in solution if it can be set up to work like pc-select.
+1  A: 

I removed PC-select mode and this just worked. For the record, here's what I get for the Page-Down key from describe-key:

<next> (translated from <S-next>) runs the command scroll-up, which is
an interactive built-in function in `C source code'.

It is bound to <next>, C-v.

(scroll-up &optional ARG)

...
Ryan Thompson