From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: emacsclient wrapper to launch emacs server if none running? Date: Tue, 04 Oct 2005 09:12:58 +0200 Message-ID: <43422B7A.6090908@student.lu.se> References: <4341D715.4010400@redhat.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1128410164 15003 80.91.229.2 (4 Oct 2005 07:16:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Oct 2005 07:16:04 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 04 09:15:58 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EMh0h-0005hE-F3 for ged-emacs-devel@m.gmane.org; Tue, 04 Oct 2005 09:14:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMh0g-0000ZX-Qi for ged-emacs-devel@m.gmane.org; Tue, 04 Oct 2005 03:14:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EMgzY-0000Gz-J7 for emacs-devel@gnu.org; Tue, 04 Oct 2005 03:13:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EMgzW-0000GL-NR for emacs-devel@gnu.org; Tue, 04 Oct 2005 03:13:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMgzW-0000GF-FS for emacs-devel@gnu.org; Tue, 04 Oct 2005 03:13:34 -0400 Original-Received: from [81.228.8.83] (helo=pne-smtpout1-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EMgz8-0003NG-RF for emacs-devel@gnu.org; Tue, 04 Oct 2005 03:13:11 -0400 Original-Received: from [192.168.123.121] (83.249.202.31) by pne-smtpout1-sn2.hy.skanova.net (7.2.060.1) id 4332AC7800284F30; Tue, 4 Oct 2005 09:13:00 +0200 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: Jens Petersen In-Reply-To: <4341D715.4010400@redhat.com> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:43531 Archived-At: Jens Petersen wrote: >Does anyone have an emacsclient wrapper script or program which >can reliably launch emacs with server-start if none is running? > >Jens > >ps (I noticed an experimental "emacsclient-plus" script in the debian emacs >package diff a while back, but it didn't quite seem to work yet for me out >of the box.) > > I have such a script, but it is for gnuclient since emacsclient does not work (yet?) on w32. However it consists of changes to both gnuclient.exe self and a new script gnuservauto.el. You can find it all if you download the zip file called something like EmacsW32-0.95.zip from http://ourcomments.org/Emacs/DL/EmacsW32/. It is under the setup\bin folder in the zip file. (The source is also there.) However this only works on w32. You can only get ideas there. I have added a new option "emacsclient -s" that starts gnuserv automatically. With the setup used by EmacsW32 you do not have to start gnuserv in .emacs, it is started automatically if -s is used. (An additional advantage of this is that you can start emacs.exe and have the same setup as usual, but run the extra emacs.exe without gnuserv.) Hope this can be of some help. I would like to port this feature to emacsclient as soon as emacsclient works on w32.