Open an Emacs buffer when a command tries to open an editor in shell-mode

后端 未结 6 1743
梦毁少年i
梦毁少年i 2021-02-07 04:13

I like to use Emacs\' shell mode, but it has a few deficiencies. One of those is that it\'s not smart enough to open a new buffer when a shell command tries to invoke an editor.

6条回答
  •  耶瑟儿~
    2021-02-07 04:32

    I wanted to do something similar for merging in an emacs shell via mercurial. Thanks to the posters here, i found the way. two steps:

    1. add: (start-server) in your .emacs file (remember to load-file after your change)

    2. in your hgrc:

      [merge-tools]
      emacs.executable = emacsclient
      emacs.premerge = False
      emacs.args = --eval "(ediff-merge-with-ancestor \"$local\" \"$other\" \"$base\" nil \"$output\")"
      

提交回复
热议问题