2

I'm trying to change the keybindings to all the smerge commands. I added : (setq smerge-command-prefix "\C-c v") to my Emacs config. M-x customize smerge confirms that the Smerge Command Prefix is ^C v but all my smerge commands still starts with C-c ^.

I also tried (setq smerge-command-prefix (kbd "C-c v")) but same result.

Any help would be appreciated.

1

It looks like this will take effect if you restart Emacs.

Alternatively, M-x load-library RET smerge RET will process it. (In which case the old prefix will also remain active, until you restart.)

  • I've tried restarting my emacs daemon multiple times but still no effects. I just tried load-library also but still nothing. Thanks though. – M-Gregoire Sep 24 '18 at 10:59
  • 1
    It worked for me after (setq smerge-command-prefix (kbd "C-c v")) in Emacs 26.1. – phils Sep 24 '18 at 11:09
  • Thanks you for your help. I tried it with emacs -Q and it works perfectly. After spending some time investigating the problem in my emacs config, I found the source of the problem to be magit-filenotify.el (github.com/ruediger/magit-filenotify). I'm not sure yet why it breaks this keybinding. – M-Gregoire Sep 24 '18 at 13:03
1

smerge-command-prefix is used by smerge.el when the smerge.el file is loaded. So you need to perform your setq before smerge.el is loaded. My crystal ball tells me that you likely have something in your .emacs which causes smerge to be loaded before that setq.

  • Thank you very much for your help, unfortunately, I don't think this is the problem as disabling magit-filenotify.el solves the issue (As explain to @phils) but smerge.el isn't called by this file. I still have to take the time to understand why. – M-Gregoire Sep 24 '18 at 13:07
  • magit-filenotify.el requires magit which requires magit-diff which requires smerge-mode – phils Sep 24 '18 at 21:52

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.