Shift selection and page up/down in emacs 23



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?

2 ответов


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)


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)
  • 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.

    12 августа 2009, 15:26
  • Хорошо, но вопрос в том, могу ли я вообще пропустить pc-select? Если я все еще использую его для этих двух ключей, я могу использовать его для всех ключей. Я хочу перейти на встроенный режим Shift-select, чтобы не использовать для этого еще один внешний пакет.

    12 августа 2009, 13:30
  • pc-select is included in my ubuntu emacs-snapshot release.

    danamlund12 августа 2009, 14:50