From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jonathan Rockway Newsgroups: gmane.emacs.devel Subject: Re: emacs in "screen". Date: Fri, 05 Jun 2009 14:59:05 -0500 Message-ID: <87k53qpi46.fsf@bar.jrock.us> References: <3349475.2657871243596323209.JavaMail.www@wwinf4602> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1244234098 9838 80.91.229.12 (5 Jun 2009 20:34:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jun 2009 20:34:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: alinsoar@voila.fr Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 05 22:34:56 2009 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.50) id 1MCg7r-0003Ja-U1 for ged-emacs-devel@m.gmane.org; Fri, 05 Jun 2009 22:34:56 +0200 Original-Received: from localhost ([127.0.0.1]:54916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCg7r-0005sC-4F for ged-emacs-devel@m.gmane.org; Fri, 05 Jun 2009 16:34:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MCg7m-0005qj-7b for emacs-devel@gnu.org; Fri, 05 Jun 2009 16:34:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MCg7h-0005oC-8E for emacs-devel@gnu.org; Fri, 05 Jun 2009 16:34:49 -0400 Original-Received: from [199.232.76.173] (port=36970 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCg7h-0005o9-01 for emacs-devel@gnu.org; Fri, 05 Jun 2009 16:34:45 -0400 Original-Received: from dsl253-036-036.chi1.dsl.speakeasy.net ([66.253.36.36]:49373 helo=bar.jrock.us) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MCg7g-0001rl-MH for emacs-devel@gnu.org; Fri, 05 Jun 2009 16:34:44 -0400 Original-Received: by bar.jrock.us (Postfix, from userid 1000) id B84B2744084; Fri, 5 Jun 2009 14:59:05 -0500 (CDT) In-Reply-To: <3349475.2657871243596323209.JavaMail.www@wwinf4602> (A. Soare's message of "Fri, 29 May 2009 13:25:23 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Greylist: delayed 2136 seconds by postgrey-1.27 at monty-python; Fri, 05 Jun 2009 16:34:44 EDT 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:111350 Archived-At: I'm not sure if you got a reply to this on emacs-help (as I don't read that list), but I thought I'd share my experience anyway. * On Fri, May 29 2009, A. Soare wrote: > I started emacs in screen that was running in tty1. DISPLAY was set, > and emacs connected to X-server. > > I restarted emacs [ed: X?] using C-M-Backspace. Emacs continued to run > in tty1, but it lost the connection to X-server, and stopped. > > Is there a possibility to restart X-server and afterwards to continue > the same emacs session? Emacs should reconnect to the X-server in case > that is sees that X-connection died. Did you try make-frame-on-display? Did it work? Do you want emacs to automatically try making a frame on a display if the display dies? FWIW, I start emacs --daemon with daemontools when I log in, and then get my X frame via "emacsclient -c". Even after restarting X, I can still get my same session back. The key is to either start emacs with "emacs --daemon", or to start a "-nw" session in your screen session. Then do a M-x server-start and connect to that emacs with emacsclient. Also, you don't really need screen for this. You can start an "emacs --daemon" and then connect to that emacs session from the console with "emacsclient -t". emacs can do its own session management now, which will even save you in the rare event that screen crashes. (All this is contingent on having emacs23, of course.) Regards, Jonathan Rockway -- print just => another => perl => hacker => if $,=$"