2
votes

i write this in .emacs

(require 'dired-x)
(global-set-key (kbd "C-x C-j") 'dired-jump)

but when i start emacs ,i can use M-x dired-jump ,but C-x C-j does nothing.I googled a lot,perhaps it is the autoloading problem?anyone can slove it?

1
In general, keys of the form C-c <letter> are reserved for the user, so maybe use C-c j instead?jpkotta

1 Answers

2
votes

dired-x binds dired-jump by default, so if you have required the library, you shouldn't need to add a binding (unless you wanted it on another key sequence, of course).

That said, I'm not sure why this isn't working for you, but try it without the global-set-key and see if it makes any difference?

Also test starting emacs -Q, entering (require 'dired-x) followed by C-j into the *scratch* buffer, and then testing whether C-xC-j is bound.

Also check the value of the dired-bind-jump variable:

M-x customize-group RET dired-keys RET

By default it's enabled, but when disabled that actually appears to unset a global binding if it exists, so depending on the actual order of execution, that might be undoing the binding you've set.