From 3c10e85909d63ef9d66445e703e16450dc0016c9 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 8 Sep 2017 00:06:25 -0700 Subject: [PATCH] [Emacs] Add command to make the current server the main emacs server --- dotfiles/emacs.d/README.org | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index da6f1aa8..90617991 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -1402,11 +1402,17 @@ Paradox is a package.el extension. I have no use for it now that I use straight. (use-package server :config (progn + (defun imalison:make-main-emacs-server () + (interactive) + (when (not (equal server-name "server")) + (shell-command-to-string + (format "cd ~/.emacs.d/server/ && rm -f server && ln -s %s server" server-name)))) (defun imalison:get-server-filepath () (let ((server-dir (if server-use-tcp server-auth-dir server-socket-dir))) (expand-file-name server-name server-dir))) (setq server-use-tcp t) - (unless (server-running-p) (server-start)))) + (unless (server-running-p) (server-start)) + (imalison:make-main-emacs-server))) #+END_SRC ** list-environment #+BEGIN_SRC emacs-lisp