3

I used to be able to access Emacs registers with key sequence that were one item shorter. For example, I could jump to a point with C-xj <register>. This shortcut key seems to be gone in newer Emacsen. I'm wondering why these shortcuts went away and if there's any reason not to add them back.

  • I have always known the C-x r prefix used for register and rectangle commands. Are you sure C-x / j <reg> was the default binding? If so, which emacs version was that? C-x r j <reg> has always worked. – Kaushal Modi Jun 22 '15 at 13:45
  • @kaushalmodi, I don't know the history but you can see C-x/ and C-xj listed on some lists of key-bindings such as this one where they are marked as "compatibility bindings." – kuzzooroo Jun 22 '15 at 13:51
3

Doing a quick ag (like grep, but better) of the regular expression 'C-x\s*/' in the emacs lisp source code gives the below as one of the results:

ChangeLog.12
1889:   C-x /, C-x j, C-x x, and C-x g (deprecated since Emacs 19).
18917:  item instead of "C-x/C-c/C-v (CUA)" if cua-enable-cua-keys is nil.

From ChangeLog.12:

2007-02-11  Kim F. Storm  <storm@cua.dk>

    * bindings.el (ctl-x-map): Remove register compatibility bindings
    C-x /, C-x j, C-x x, and C-x g (deprecated since Emacs 19).

So looks like C-x / is one of the bindings long deprecated. You can, though, always define your own bindings. Have a look at this Elisp Manual page on How to set key bindings.

| improve this answer | |
  • @kuzzooroo I have updated my answer with more info. You can instead do grep -r 'C-x\s*/' *. – Kaushal Modi Jun 22 '15 at 14:07
1

Based on kaushalmodi's answer I was able to dig the following explanation up of why these keys were deprecated (emphasis mine):

C-x a
C-x n
C-x r

Three new prefix keys have been created to make many of the C-x commands more systematic: C-x a, C-x n and C-x r. C-x a is used for abbreviation commands, C-x n for commands pertaining to narrowing, and C-x r for register and rectangle commands...

(source)

| improve this answer | |
  • Such blogs tend to get outdated pretty quickly. You can use the emacs internal help bindings C-h f (to know what and if a command is bound to), C-h k (to know which command a binding executes) or simply refer to this official emacs bindings reference card. – Kaushal Modi Jun 22 '15 at 14:31
  • C-h f and C-h k unfortunately don't give me any insight into why the keys were deprecated (or even that the bindings ever existed), so are not a good substitute for the quoted text. – kuzzooroo Jun 22 '15 at 15:31
  • I agree, my comment was not meant as a substitute for the quoted text. I just gave few pointers to help figure out a command<->binding combination. The first thing I did on reading your original question was C-h k C-x / and with confidence I knew that that's not a default binding and then I proceeded to search for that in the emacs source code. If you knew what that binding bound to originally, you can see if it is still bound to anything using C-h f. Or you can search in the refcard.pdf to figure it out. – Kaushal Modi Jun 22 '15 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.