vcsh and Emacs: the other solution

Rémi Vanicat vanicat at debian.org
Thu Aug 29 21:17:38 CEST 2013


Hello all,

It occur to me that one could use another way to interact with vcsh in
Emacs: to use tramp!

add 

    (add-to-list 'tramp-methods '("vcsh"
                                  (tramp-login-program "vcsh")
                                  (tramp-login-args
                                   (("enter")
                                    ("%h")))
                                  (tramp-remote-shell "/bin/sh")
                                  (tramp-remote-shell-args
                                   ("-c"))))


to you .emacs. Then Emacs will understand path like /vcsh:zsh:. as been
your home directory, but inside 'vcsh enter zsh'. 

You could then run obviously magit-status, but also eshell with all
command run with the correct environment variable, and with the same
power to shoot your own foot that you add with plain 'vcsh enter zsh'.

It also give vcsh interface for other git interface like egg.

Sadly, core Emacs VC interface fail to detect we are somewhat inside a
git repository, so we cannot use it.

-- 
Rémi Vanicat



More information about the vcs-home mailing list