From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.emacs.help Subject: emacs server per project? Date: Tue, 20 Dec 2011 08:49:02 -0800 Message-ID: <4EF0BC7E.4040103@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1324403993 26484 80.91.229.12 (20 Dec 2011 17:59:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 20 Dec 2011 17:59:53 +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 Dec 20 18:59:47 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rd3yb-00081J-B2 for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Dec 2011 18:59:45 +0100 Original-Received: from localhost ([::1]:52638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rd3ya-0008Is-T5 for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Dec 2011 12:59:44 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:44061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rd2sK-0003py-Jn for help-gnu-emacs@gnu.org; Tue, 20 Dec 2011 11:49:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rd2sE-00063g-TO for help-gnu-emacs@gnu.org; Tue, 20 Dec 2011 11:49:12 -0500 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:37654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rd2sE-00063H-PZ for help-gnu-emacs@gnu.org; Tue, 20 Dec 2011 11:49:06 -0500 Original-Received: by iacb35 with SMTP id b35so10280318iac.0 for ; Tue, 20 Dec 2011 08:49:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=m8+oklBANGTqwHkdeLL6CTLmfi0b8MSTwbLZR8lho7Q=; b=QaZ8HS4N+4bM2DyT40RflBTm8GFELZT0awIvfT7n6Spqf2OgO8dKMbXrldIHXAUFmo Gjq5Rx5BORTW63wgEgAcxwpFOfeWfKzUR3MW6o9QrVkw4MQlPx0jkeccDTEeAUvacRnx XmoDeVYTcsCiVjr58k04D5fPFpD3xcqvvjpgA= Original-Received: by 10.43.47.135 with SMTP id us7mr2390728icb.31.1324399745893; Tue, 20 Dec 2011 08:49:05 -0800 (PST) Original-Received: from [10.0.0.2] (adsl-75-0-185-118.dsl.pltn13.sbcglobal.net. [75.0.185.118]) by mx.google.com with ESMTPS id py9sm2891311igc.2.2011.12.20.08.49.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Dec 2011 08:49:04 -0800 (PST) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 X-Mailman-Approved-At: Tue, 20 Dec 2011 12:59:38 -0500 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:83231 Archived-At: Hi, I work on a number of different projects. Each project has a devoted desktop, a cscope task and an emacs process. Unfortunately, only one cscope gets to talk with one emacs process because all of them want to be /tmp/emacs1000/server. I know I can manually change the value of "server-name", but that is pretty inconvenient given that this yields a perfectly usable server name: server=$(dirname $(pwd | sed "s@^$HOME/*@@") ) more-or-less. It is easy enough to add "-s $server" to the emacsclient invocation, but telling emacs itself which server name to use doesn't seem obvious to me. Is there a way, or does one have to learn emacs lisp and fiddle it in ~/.emacs? Thank you! Regards, Bruce P.S. I also tried spawning emacs as a daemon process with --daemon=$server but I wind up with either a process that steals input from the shell, or, if I redirect stdin and stdout to /dev/null, it just sees EOF and quits. That *does* seem a bit odd since if I do *not* specify --daemon, then it creates its own terminal (or something like that) and does its stdin and stdout there -- even if I spawn emacs as a true daemon process. But then I must manually type a bunch of longish manual commands to change the server name.