From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Newsgroups: gmane.emacs.help Subject: Re: Emacs server Date: Tue, 21 Feb 2012 08:58:23 +0100 Message-ID: <87ehtohb34.fsf@googlemail.com> References: <87mx8hes5w.fsf@googlemail.com> <87ty2pu16g.fsf@micropit.couberia.bzh> <87k43l4lut.fsf@googlemail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1329811062 1362 80.91.229.3 (21 Feb 2012 07:57:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 21 Feb 2012 07:57:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 21 08:57:41 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RzkbU-0002of-CB for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Feb 2012 08:57:40 +0100 Original-Received: from localhost ([::1]:51911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzkbT-000572-UT for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Feb 2012 02:57:39 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:47284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzkbL-00056o-O3 for help-gnu-emacs@gnu.org; Tue, 21 Feb 2012 02:57:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzkbF-0007ti-Rz for help-gnu-emacs@gnu.org; Tue, 21 Feb 2012 02:57:31 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:56512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzkbF-0007ta-Mq for help-gnu-emacs@gnu.org; Tue, 21 Feb 2012 02:57:25 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RzkbE-0002i4-DU for help-gnu-emacs@gnu.org; Tue, 21 Feb 2012 08:57:24 +0100 Original-Received: from g231227238.adsl.alicedsl.de ([92.231.227.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Feb 2012 08:57:24 +0100 Original-Received: from quintfall by g231227238.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Feb 2012 08:57:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: g231227238.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:18y8SlWEaftsQ4KlaxFQNVj4DJU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83822 Archived-At: Kevin Rodgers writes: > On 2/17/12 6:42 AM, Thorsten wrote: >> Thank, that does the job. One more related question: I like to have a >> black background and white (or wheat) foreground (and I'm not such a fan >> of the color-themes because of their generally weak contrasts). In an X >> session, I would start emacs with -fg black and -bg wheat flags. In an >> console session, this looks strange, but starting emacs without those >> two flags already gives a black background and a white foreground. >> >> Now - what can I do when I want to have only one emacs-server running >> and start several emacsclients in the console as well as in the X >> session? Is there a way to start different emacsclients with different >> fg/bg colors without always changing the colors explicitly with M-x >> set-{background, foreground}-color when switching between the clients? > > Does emacsclient handle the -name argument? If so, you can set up > different > foreground/background pairs in ~/.Xdefaults with different instance names. Yes "The emacsclient program can specify a server by name, using the -s option" Since I want only one server instance running, you mean I could define alias-names that point to the same server, but set up different fg/bg colors? I would not know how to do this. I already solved the color-problem using the server-visit-hook and display-graphic-p predicate. I still have some problems to gracefully exit my "1 server, many (terminal and X11) clients" setup. When I use 'C-x #' to close unused emacsclients in the X11 and return to my terminal session, all my emacsclients there are killed too - very inconvenient. And when I finally kill the emacs-daemon with 'M-x kill-emacs', I'm asked at the next start-up if I want to recover the crashed session. But I don't want to crash emacs on exit, I want to shut it down in a controlled and civilized manner. cheers -- Thorsten