emacs调用SVN进行更新、提交、比较
需要安装SVN的TortoiseSVN客户端。
然后把下面的代码加入到.emacs文件:
(defun svn-update() "Svn update" (interactive) (let ((cmd (concat "TortoiseProc.exe /command:update /path:"" buffer-file-name "" /closeonend:0"))) (message cmd) (shell-command cmd))) (defun svn-commit() "Svn commit" (interactive) (let ((cmd (concat "TortoiseProc.exe /command:commit /path:"" buffer-file-name "" /closeonend:0"))) (message cmd) (shell-command cmd))) ;;SVN diff (defun svn-diff() "Svn diff" (interactive) (let ((cmd (concat "TortoiseProc.exe /command:diff /path:"" buffer-file-name "" /closeonend:0"))) (message cmd) (shell-command cmd)))