From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: Calling emacsclient Date: Mon, 12 Nov 2012 15:58:46 +0100 Message-ID: <87d2zirhp5.fsf@googlemail.com> References: <87ip9b9zvj.fsf@gmail.com> <87haovq8f4.fsf@googlemail.com> <20121112141521.GC14125@kuru.dyndns-at-home.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1352732346 20792 80.91.229.3 (12 Nov 2012 14:59:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Nov 2012 14:59:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 12 15:59:17 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TXvTn-0001io-2S for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Nov 2012 15:59:15 +0100 Original-Received: from localhost ([::1]:56101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXvTa-0006Rb-Ct for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Nov 2012 09:59:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXvTS-0006RE-S9 for help-gnu-emacs@gnu.org; Mon, 12 Nov 2012 09:58:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXvTP-0006cj-NI for help-gnu-emacs@gnu.org; Mon, 12 Nov 2012 09:58:54 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:35989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXvTP-0006cY-GK for help-gnu-emacs@gnu.org; Mon, 12 Nov 2012 09:58:51 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TXvTT-0001Yq-0n for help-gnu-emacs@gnu.org; Mon, 12 Nov 2012 15:58:55 +0100 Original-Received: from e178057094.adsl.alicedsl.de ([85.178.57.94]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Nov 2012 15:58:55 +0100 Original-Received: from tjolitz by e178057094.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Nov 2012 15:58:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178057094.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:A2b4JAEKTRpny/vrOcnKR3e612w= 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:87657 Archived-At: Suvayu Ali writes: > On Mon, Nov 12, 2012 at 02:04:31PM +0100, Thorsten Jolitz wrote: >> William Gardella writes: >> >> > One possibility would be to use the emacsclient -s option together with >> > a shell wildcard, e.g.: >> > >> > emacsclient -c -s /tmp/emacs1000/* >> > >> > works, whatever the name of the socket inside /tmp/emacs1000/ is. So >> > you could use that trick with the value of your `server-socket-dir' >> > variable. >> >> I have the same 'server-socket-dir', so hardcoding this works fine on my >> machine. But what if I need a generic version? Can I get the value of >> `server-socket-dir' and use it for the '-s' option in the same external >> call to emacsclient? Or would I need two consecutive calls to >> emacsclient, the first one reading the value of `server-socket-dir' via >> 'emacsclient -e "(...some lisp...)"', the second one using it for the >> '-s' option from a variable of the calling program? > > I believe a more generic server-socket-dir is /tmp/emacs${UID}/. if the /tmp/emacs part is more or less constant for all kinds of GNU/Linux distributions this would be even more generic than relying on the server-name 'server'. Thanks for the tip. -- cheers, Thorsten