From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Marschke Newsgroups: gmane.emacs.devel Subject: Re: screen & emacs Date: Thu, 3 Feb 2011 21:54:29 +0100 Message-ID: <20110203205429.GA21916@andres.andreas> References: <87k4hh4thk.fsf@sysu76.podval.org> <20110203181348.GA15004@andres.andreas> <87wrlghnb5.fsf@nzebook.haselwarter.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1296766511 14189 80.91.229.12 (3 Feb 2011 20:55:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Feb 2011 20:55:11 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 03 21:55:06 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pl6Ck-00027w-8L for ged-emacs-devel@m.gmane.org; Thu, 03 Feb 2011 21:55:02 +0100 Original-Received: from localhost ([127.0.0.1]:45399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl6Cj-0005Gn-Ff for ged-emacs-devel@m.gmane.org; Thu, 03 Feb 2011 15:55:01 -0500 Original-Received: from [140.186.70.92] (port=53497 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl6Cb-0005Et-GW for emacs-devel@gnu.org; Thu, 03 Feb 2011 15:54:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pl6Ca-0003o1-4z for emacs-devel@gnu.org; Thu, 03 Feb 2011 15:54:53 -0500 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:61512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pl6CZ-0003ns-UU for emacs-devel@gnu.org; Thu, 03 Feb 2011 15:54:52 -0500 Original-Received: by fxm12 with SMTP id 12so1664702fxm.0 for ; Thu, 03 Feb 2011 12:54:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:date:from:to:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=KFsYC9OtMedc4R58UZBL+31VgCqKRy/Jeb9n2t2qyUE=; b=mLDMTLuvxtbi1weUyhQPpV3iPR5Iov40LMbnV5kGdgRND6h0hxas4FFNf6LsVh0wfW JKEwMTrmCwaPznhUUm91aUP70kjaiWQjs8yjEBxPXD4ST+DAYVxwHVoWXXiwVz31TyIz D+5UIxrQ+L4qmWVVKjzcXdVd7vs87sxd3N8nQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=WymPXqHUCrx8QSsKgIoYBT1rYrEMf32g9zk+O8iKJxfMDElTZFsT30EnjyW++XDqeu 9iu2QDhVwoTkkWGfZSlWrUaLYrl0yKx4sfAuVRjLUVmAO/E1rUfKJ6vtgCb6UL6gACgu J3NMqsKFvdEOi/dCOrHkXv3XSsI2O6MIPE9KM= Original-Received: by 10.223.72.12 with SMTP id k12mr7337412faj.114.1296766490903; Thu, 03 Feb 2011 12:54:50 -0800 (PST) Original-Received: from andres.andreas (p5B2A7C1E.dip.t-dialin.net [91.42.124.30]) by mx.google.com with ESMTPS id 5sm479642fak.47.2011.02.03.12.54.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 03 Feb 2011 12:54:50 -0800 (PST) Content-Disposition: inline In-Reply-To: <87wrlghnb5.fsf@nzebook.haselwarter.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.41 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:135525 Archived-At: Oh thanks for that tipp. Its part of my conf now thanks! On Thu, Feb 03, 2011 at 09:31:58PM +0100, Philipp Haselwarter wrote: > Andreas Marschke writes: > > > Hi! > > > ---8<---[snipped 20 lines]---8<--- > > > > Here is a more elaborate example from both my `.screenrc' and my > > `.bashrc': > > --------: .bashrc > > function emacs() > > { > > if [ -x /tmp/emacs$UID/server ];then > > emacsclient -nw $@ > > else > > screen emacs -nw -f server-start $@ > > fi > > } > > > ---8<---[snipped 91 lines]---8<--- > > This shouldn't be necessary anymore, I used to use a similar construct, > but there's simpler. > If you run emacsclient with `-a=""' or `--alternate-editor=""', it tries > to connect to the server first, and if it fails to connect, starts > it. This way, you never end up trying to start several daemons at once > etc: > .bashrc: > --8<---------------cut here---------------start------------->8--- > alias emacs='emacsclient -a="" -nw' > --8<---------------cut here---------------end--------------->8--- > and similarly in your .screenrc: > --8<---------------cut here---------------start------------->8--- > screen -t EMACS 4 emacsclient -a="" -nw > --8<---------------cut here---------------end--------------->8--- > > -- > Philipp Haselwarter > > -- Cheers, Andreas Marschke