 
 (eval-after-load "compile"
   '(add-to-list 'compilation-error-regexp-alist-alist
-                '(git-svn "^\\t[A-Z]\\t(.*)$" 1)))
-(defun git-svn ()
-  (interactive)
-  (compile (concat "git-svn " (ido-completing-read "git-svn command: " (list "rebase" "dcommit" "log") nil t))))
+                '(git-svn "^\t[A-Z]\t(.*)$" 1)))
+
+(defun git-svn (dir)
+  (interactive "DSelect directory: ")
+  (let* ((default-directory (git-get-top-dir dir))
+         (compilation-buffer-name-function (lambda (major-mode-name) "*git-svn*")))
+    (compile (concat "git-svn " (ido-completing-read "git-svn command: " (list "rebase" "dcommit" "log") nil t)))))
 
 
 ;;----------------------------------------------------------------------------


(add-auto-mode 'ruby-mode "Rakefile$" "\.rake$" "\.rxml$" "\.rjs" ".irbrc")
(add-auto-mode 'html-mode "\.rhtml$")
(eval-after-load "compile"
  '(progn
     ;; Jump to lines from Ruby stack traces in 'compile' mode
     (add-to-list 'compilation-error-regexp-alist-alist
                  '(ruby "\\([0-9A-Za-z_./\:-]+\\.rb\\):\\([0-9]+\\):in `" 1 2))))
(setq compile-command "rake ")

(eval-after-load "mmm-mode"


(define-derived-mode ruby-compilation-mode compilation-mode "Compilation[ruby]"
  "Major mode for running ruby scripts and tests."
  (set (make-local-variable 'compilation-error-regexp-alist) '(ruby-backtrace ruby-test-backtrace)))

(defun ruby-compile (command)
  (compile command)
