From 8175d6dfad767bd4e59c7622b1e57d794cf732e3 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 1 Apr 2010 09:19:41 +0200 Subject: [PATCH] Only start the server if it isn't running magit's interactive rebase feature tries to start the server even if it is already running. If it is already running then Emacs asks whether or not it should destroy existing clients. This is fatal if the frame magit is running in was created by emacsclient itself (e.g. Emacs is running in the background with "--daemon"), so the user has to answer "no". This question can be avoided if the server is only startet if it isn't already running. --- magit.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index 98c1a466..70aab971 100644 --- a/magit.el +++ b/magit.el @@ -3532,7 +3532,8 @@ Prefix arg means justify as well." (defun magit-interactive-rebase () "Start a git rebase -i session, old school-style." (interactive) - (server-start) + (unless (server-running-p) + (server-start)) (let* ((section (get-text-property (point) 'magit-section)) (commit (and (member 'commit (magit-section-context-type section)) (magit-section-info section)))