GNU bug report logs - #13319
24.2.91; emacsclient doesn't find server with nonstandard name

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Michael Heerdegen <michael_heerdegen@HIDDEN>; dated Mon, 31 Dec 2012 17:17:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 13319 <at> debbugs.gnu.org:


Received: (at 13319) by debbugs.gnu.org; 31 Dec 2012 20:20:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 31 15:20:28 2012
Received: from localhost ([127.0.0.1]:38355 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TplqV-0003G7-Jq
	for submit <at> debbugs.gnu.org; Mon, 31 Dec 2012 15:20:28 -0500
Received: from mout.web.de ([212.227.17.12]:54267)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1TplqR-0003Fw-Qq
	for 13319 <at> debbugs.gnu.org; Mon, 31 Dec 2012 15:20:25 -0500
Received: from drachen.dragon ([89.204.130.115]) by smtp.web.de (mrweb003)
	with ESMTPA (Nemesis) id 0M1o4o-1T1WaN0iba-00tz06;
	Mon, 31 Dec 2012 21:19:09 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
Subject: Re: bug#13319: 24.2.91;
	emacsclient doesn't find server with nonstandard name
References: <87zk0u405l.fsf@HIDDEN> <m2fw2mj9rg.fsf@HIDDEN>
Date: Mon, 31 Dec 2012 21:20:16 +0100
In-Reply-To: <m2fw2mj9rg.fsf@HIDDEN> (Andreas Schwab's message of "Mon, 31
	Dec 2012 20:34:43 +0100")
Message-ID: <8738ym3ren.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V02:K0:3v8eE97fjHmLeLZu90PjIdzdp0CW8yWUmUpjzfPuGZt
	/1M/a2m2up6oFajlKZx6WkotlUU+GCCuy/Syh5O43WlPJ4dMDo
	NinWZlwa5wGwxL4S1+eoHD4fnVwGXTA/wzIwa8empEJgKtCy4h
	EfBx3SCOoV1C1izgZYPpB06ODAisML61D0B2XdIwLU12a0MyPP
	et9jyMvDhlko1wn9+OWA+vvtY7VxGrLibv1dRsf8Ac=
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13319
Cc: 13319 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.0 (/)

Andreas Schwab <schwab@HIDDEN> writes:

> Michael Heerdegen <michael_heerdegen@HIDDEN> writes:
>
> > Obviously this is not fulfilled here.  And it is no useful behavior.  If
> > only one server is running (and the socket is located under the
> > canonical path), emacsclient should find and use it.
>
> This is questionable.  How does it know that a random socket is a emacs
> server socket?

Here on Debian, it looks under /tmp/emacs$UID.  Can there be any other
socket?


Regards,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13319; Package emacs. Full text available.

Message received at 13319 <at> debbugs.gnu.org:


Received: (at 13319) by debbugs.gnu.org; 31 Dec 2012 19:35:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 31 14:35:59 2012
Received: from localhost ([127.0.0.1]:38327 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tpl9T-0000MO-I6
	for submit <at> debbugs.gnu.org; Mon, 31 Dec 2012 14:35:59 -0500
Received: from mail-out.m-online.net ([212.18.0.9]:59717)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <whitebox@HIDDEN>) id 1Tpl9Q-0000MF-Gp
	for 13319 <at> debbugs.gnu.org; Mon, 31 Dec 2012 14:35:57 -0500
Received: from frontend1.mail.m-online.net (unknown [192.168.8.180])
	by mail-out.m-online.net (Postfix) with ESMTP id 3YZpd06ycdz4KK3h;
	Mon, 31 Dec 2012 20:34:44 +0100 (CET)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.68])
	by mail.m-online.net (Postfix) with ESMTP id 3YZpd06kr8zbbgT;
	Mon, 31 Dec 2012 20:34:44 +0100 (CET)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.180])
	by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new,
	port 10024)
	with ESMTP id sFl4EP4_EkoA; Mon, 31 Dec 2012 20:34:36 +0100 (CET)
X-Auth-Info: Nkq7SEpYwHKsRyjVHkoz5mRokVu7/wFPaggjAhBJ9c0=
Received: from igel.home (ppp-93-104-157-148.dynamic.mnet-online.de
	[93.104.157.148]) by mail.mnet-online.de (Postfix) with ESMTPA;
	Mon, 31 Dec 2012 20:34:44 +0100 (CET)
Received: by igel.home (Postfix, from userid 501)
	id 05D84CA2A2; Mon, 31 Dec 2012 20:34:43 +0100 (CET)
From: Andreas Schwab <schwab@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#13319: 24.2.91;
	emacsclient doesn't find server with nonstandard name
References: <87zk0u405l.fsf@HIDDEN>
X-Yow: What I want to find out is -- do parrots know much about Astro-Turf?
Date: Mon, 31 Dec 2012 20:34:43 +0100
In-Reply-To: <87zk0u405l.fsf@HIDDEN> (Michael Heerdegen's message of "Mon, 31
	Dec 2012 18:11:18 +0100")
Message-ID: <m2fw2mj9rg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 13319
Cc: 13319 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Obviously this is not fulfilled here.  And it is no useful behavior.  If
> only one server is running (and the socket is located under the
> canonical path), emacsclient should find and use it.

This is questionable.  How does it know that a random socket is a emacs
server socket?

Andreas.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13319; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Dec 2012 17:16:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 31 12:16:47 2012
Received: from localhost ([127.0.0.1]:38248 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tpiyk-0005HC-OU
	for submit <at> debbugs.gnu.org; Mon, 31 Dec 2012 12:16:47 -0500
Received: from eggs.gnu.org ([208.118.235.92]:53699)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1Tpiyh-0005H3-RN
	for submit <at> debbugs.gnu.org; Mon, 31 Dec 2012 12:16:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1TpixT-000738-SO
	for submit <at> debbugs.gnu.org; Mon, 31 Dec 2012 12:15:33 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD,
	USER_IN_WHITELIST autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:55275)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1TpixT-00070p-P2
	for submit <at> debbugs.gnu.org; Mon, 31 Dec 2012 12:15:27 -0500
Received: from eggs.gnu.org ([208.118.235.92]:36148)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1Tpisc-0003m3-GK
	for bug-gnu-emacs@HIDDEN; Mon, 31 Dec 2012 12:10:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1TpisZ-0005du-Cb
	for bug-gnu-emacs@HIDDEN; Mon, 31 Dec 2012 12:10:26 -0500
Received: from mout.web.de ([212.227.15.4]:64610)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <michael_heerdegen@HIDDEN>) id 1TpisZ-0005Ve-1s
	for bug-gnu-emacs@HIDDEN; Mon, 31 Dec 2012 12:10:23 -0500
Received: from drachen.dragon ([89.204.130.115]) by smtp.web.de (mrweb102)
	with ESMTPA (Nemesis) id 0M4qav-1T6AMp30zl-00yrrc;
	Mon, 31 Dec 2012 18:10:11 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.2.91; emacsclient doesn't find server with nonstandard name
Date: Mon, 31 Dec 2012 18:11:18 +0100
Message-ID: <87zk0u405l.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V02:K0:Oml7KemU5GfVo8KdNNOWcT6G6En5+cmihStbiqIvpez
	Oz5PeY5uym4o2MEzucAghY4Z+BMuf4Y2ASSSpZvdyH04nAnfHZ
	8wD2w+k3sjiszJFUreDA+o5p+bNVUfdDWDWarCPXgbgDZPuRN6
	4xB3LBo0JsWV5QbH3V0xQiqULP5VHw1KH4zSktRt1Ra3vW5eVX
	nORKf4vu5sJbaLYkN4FQXxQkfj45/rcSBwOLTjDCFQ=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -4.2 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.2 (----)

Hi,

In emacs -Q, do this:

(progn
  (require 'server)
  (let ((server-name (concat "server_" (format-time-string  "%H:%M:%S"))))
    (server-start)))

Then I try to connect to this server, but it fails:

| bash-4.2:mh:~$ /usr/bin/emacsclient ~/.bashrc 
| /usr/bin/emacsclient: can't find socket; have you started the server?
| To start the server in Emacs, type "M-x server-start".
| /usr/bin/emacsclient: No socket or alternate editor.  Please use:
| 
|         --socket-name
|         --server-file      (or environment variable EMACS_SERVER_FILE)
|         --alternate-editor (or environment variable ALTERNATE_EDITOR)


When I explicitly specify the server name with the -s option,
emacsclient succeeds.  But due to the doc (man page), "emacsclient"
should connect to "the first server it finds":

| `-s SERVER-NAME'
| `--socket-name=SERVER-NAME'
|      Connect to the Emacs server named SERVER-NAME.  The server name is
|      given by the variable `server-name' on the Emacs server.  If this
|      option is omitted, `emacsclient' connects to the first server it
|      finds.  (This option is not supported on MS-Windows.)

Obviously this is not fulfilled here.  And it is no useful behavior.  If
only one server is running (and the socket is located under the
canonical path), emacsclient should find and use it.  It is arguable
which server should be used if more than one is running (and what the
"first server it finds" should be).

BTW, here is an explanation for why I want to start the server like
above (not substantially important for this report):

I often make changes to my config file/ elpa installations or rebuild
Emacs.  To guarantee that I always have a running Emacs (as a fallback
when something went wrong and a newly started Emacs fails to start), I
keep my old Emacs open and start a new one.  If I had just

  (server-start)

in my config, the new Emacs would not start a server (since the old one
is still running).  After having closed the old Emacs, I had no server
running, so I had to manually start the server every time.  This is
annoying.  So I want to start a server with a unique name.


Thanks,

Michael.


In GNU Emacs 24.2.91.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
 of 2012-12-30 on drachen
Bzr revision: rgm@HIDDEN
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
System Description:	Debian GNU/Linux testing (wheezy)





Acknowledgement sent to Michael Heerdegen <michael_heerdegen@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#13319; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.