From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kurtz Newsgroups: gmane.emacs.help Subject: Re: emacs for everything? Date: Thu, 30 Dec 2004 13:25:02 +0100 Message-ID: <20041230122502.GA7372@buddha> References: <87oeh82hia.fsf@thalassa.informatimago.com> <1104390545.758301@sj-nntpcache-3> <1104398985.835551@sj-nntpcache-5> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="GvXjxJ+pjyke8COw" X-Trace: sea.gmane.org 1104428303 5215 80.91.229.6 (30 Dec 2004 17:38:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Dec 2004 17:38:23 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 30 18:38:11 2004 Return-path: Original-Received: from mail-relay.eunet.no ([193.71.71.242]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ck35Q-0000si-01 for ; Thu, 30 Dec 2004 17:23:40 +0100 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by mail-relay.eunet.no (8.13.1/8.13.1/GN) with ESMTP id iBUEFore064085 for ; Thu, 30 Dec 2004 15:16:45 +0100 (CET) (envelope-from help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org) Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Ck0hZ-0004AG-BS for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Dec 2004 08:50:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CjzYq-00072R-GI for help-gnu-emacs@gnu.org; Thu, 30 Dec 2004 07:37:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CjzXw-0006o9-5M for help-gnu-emacs@gnu.org; Thu, 30 Dec 2004 07:36:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CjzXk-0006hS-GU for help-gnu-emacs@gnu.org; Thu, 30 Dec 2004 07:36:40 -0500 Original-Received: from [213.4.129.135] (helo=telesmtp4.mail.isp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CjzMl-0008Um-JH for help-gnu-emacs@gnu.org; Thu, 30 Dec 2004 07:25:20 -0500 Original-Received: from localhost.localdomain ([80.38.119.13]) by telesmtp4.mail.isp (terra.es) with ESMTP id I9JBTV01.7N6 for ; Thu, 30 Dec 2004 13:25:07 +0100 Original-Received: from kurtz by localhost.localdomain with local (Exim 4.34) id 1CjzMU-0001wZ-TT for help-gnu-emacs@gnu.org; Thu, 30 Dec 2004 13:25:02 +0100 Original-To: help-gnu-emacs@gnu.org Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <1104398985.835551@sj-nntpcache-5> User-Agent: Mutt/1.5.6+20040907i X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:23053 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23053 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Ravi Uday escribe: > Yea right, it works, but how does one start the server to enable this > client to connect to it. Do you have a procedure which could be easily > followed ? I set in my .bashrc something like alias emacs="`emacswrapper.sh`" where emacswrapper.sh is the attached script. Here, dtemacs is a nice script provided with the Debian gnuserv package. Google for it if not using Debian. It tries to contact emacs with gnuclient, starting a new emacs if there is no answer. Thanks to my emacswrapper.sh script, whenever I call `emacs', the correct instance for me is executed, this is, `emacs -nw' if connected by ssh, `dtemacs' if on Linux with X running, `gnuclientw' if on a cygwin environment and a bare `emacs' in any other case. Works for me, I hope is also useful for you. Of course, YMMV! -- http colon slash slash kurtz dot blogsite dot org --GvXjxJ+pjyke8COw Content-Type: application/x-sh Content-Disposition: attachment; filename="emacswrapper.sh" Content-Transfer-Encoding: quoted-printable #!/bin/sh=0A=0A# if connected via ssh, use always emacs-nox=0A[ "$SSH_CONNE= CTION" ] && echo emacs -nw && exit=0A=0A# X running, try to contact emacs w= ith gnuclient, starting emacs if no=0A# answer=0A[ "$DISPLAY" ] && [ "`whic= h 2> /dev/null dtemacs`" ] && echo dtemacs && exit=0A=0A# X not running, ma= ybe win32, try gnuclientw=0A[ "`which 2> /dev/null gnuclientw`" ] && echo g= nuclientw && exit=0A=0A# start plain emacs if available=0A[ "`which 2> /dev= /null emacs`" ] && echo emacs && exit=0A=0Aecho /dev/null=0A --GvXjxJ+pjyke8COw Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --GvXjxJ+pjyke8COw--