I would like to bind the following key sequence C-x r l to a function called helm-bookmarks.
From what I understand, I could do this with a keymap that is triggered with C-x, e.g.
(define-prefix-command 'my_sense_map)
(global-set-key (kbd "C-x") 'my_sense_map)
(define-key my_sense_map (kbd "r l") 'helm-bookmarks)
but this shadows all my other bindings (e.g. C-x 2 or C-x 3 for window splitting), i.e. they stop working.
How can I bind C-x r l to 'helm-bookmarks without changing any other key bindings?
All you need to do is to just set the binding of C-xrl in the current global map to
helm-bookmarks:Emacs defines C-x as a prefix key that uses a keymap stored in the variable
ctl-x-map, which contains most bindings for key sequences starting with C-x. If you re-define it so that it uses a new keymap with no entries, you will lose all those bindings stored inctl-x-map.