GNU bug report logs -
#7135
24.0.50; Mac OS X X11: emacsclient cannot find server from remote login
Previous Next
Reported by: Bob Nnamtrop <bobnnamtrop <at> gmail.com>
Date: Wed, 29 Sep 2010 17:07:02 UTC
Severity: normal
Merged with 3992,
4001
Found in version 24.0.50
Fixed in version 23.3
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7135 in the body.
You can then email your comments to 7135 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7135
; Package
emacs
.
(Wed, 29 Sep 2010 17:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bob Nnamtrop <bobnnamtrop <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 29 Sep 2010 17:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
When using daemon mode locally on my computer it works correctly. However,
if I login (using ssh -Y) to a computer with an emacs daemon running
(started with emacs -Q --daemon) and use emacsclient to connect to it
emacsclient does not find the server. I get the error:
emacsclient -n -c
emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
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)
I can get emacsclient to work if I use --server-file option after I have
located the server-file. I have the following bash function which does this
automatically:
emc () { emacsclient -n -c --socket-name="$( (find /var/ -name server | grep
emacs8060) 2> /dev/null )"}
but emacclient should be able to find the socket on its own. Note that this
was present in 23.1 and 23.2 as well.
Bob
In GNU Emacs 24.0.50.2 (i386-apple-darwin9.8.0, GTK+ Version 2.20.1)
of 2010-09-29 on ***
Windowing system distributor `The X.Org Foundation', version 11.0.10802000
configured using `configure '--prefix=/Users/name/local-emacs-bzr''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: nil
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
[Message part 2 (text/html, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7135
; Package
emacs
.
(Wed, 29 Sep 2010 19:43:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 7135 <at> debbugs.gnu.org (full text, mbox):
After sending this bug report I noticed bug # 3992 that mentions that
the system variable TMPDIR is not set when logging in remotely and
suggests setting in .bashrc it with:
if [ -z "$TMPDIR" ]; then
export TMPDIR=`getconf DARWIN_USER_TEMP_DIR`
fi
I can confirm that this fixes the problem and I have sumbitted a bug
report to Apple to set TMPDIR when logging in remotely. However, I
wonder if emacsclient could check if TMPDIR is set and if not set it
with the above command so this problem is fixed within emacs.
Bob
Merged 3992 4001 7135.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 29 Sep 2010 20:14:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7135
; Package
emacs
.
(Thu, 30 Sep 2010 00:32:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 7135 <at> debbugs.gnu.org (full text, mbox):
Please try this patch (against the emacs-23 emacsclient.c):
*** lib-src/emacsclient.c 2010-01-13 15:38:28 +0000
--- lib-src/emacsclient.c 2010-09-29 20:48:44 +0000
***************
*** 1249,1255 ****
--- 1249,1261 ----
{
tmpdir = egetenv ("TMPDIR");
if (!tmpdir)
+ {
+ #ifdef DARWIN_OS
+ tmpdir = egetenv ("DARWIN_USER_TEMP_DIR"); /* bug#3992 */
+ if (!tmpdir)
+ #endif
tmpdir = "/tmp";
+ }
socket_name = alloca (strlen (tmpdir) + strlen (server_name)
+ EXTRA_SPACE);
sprintf (socket_name, "%s/emacs%d/%s",
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7135
; Package
emacs
.
(Thu, 30 Sep 2010 01:39:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 7135 <at> debbugs.gnu.org (full text, mbox):
> + tmpdir = egetenv ("DARWIN_USER_TEMP_DIR"); /* bug#3992 */
Oh, is this D_U_T_D thing actually an environment variable, though?
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7135
; Package
emacs
.
(Thu, 30 Sep 2010 05:28:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 7135 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris skrev 2010-09-30 03.41:
>
>> + tmpdir = egetenv ("DARWIN_USER_TEMP_DIR"); /* bug#3992 */
>
> Oh, is this D_U_T_D thing actually an environment variable, though?
>
>
No. It is a getconf variable.
Jan D.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7135
; Package
emacs
.
(Thu, 30 Sep 2010 06:44:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 7135 <at> debbugs.gnu.org (full text, mbox):
Jan Djärv wrote:
> No. It is a getconf variable.
Something more like this then?
*** lib-src/emacsclient.c 2010-01-13 15:38:28 +0000
--- lib-src/emacsclient.c 2010-09-30 06:40:27 +0000
***************
*** 1249,1255 ****
--- 1249,1266 ----
{
tmpdir = egetenv ("TMPDIR");
if (!tmpdir)
+ {
+ #ifdef DARWIN_OS
+ size_t n = confstr (_CS_DARWIN_USER_TEMP_DIR, NULL, (size_t) 0);
+ if (n > 0)
+ {
+ tmpdir = alloca (n);
+ confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n);
+ }
+ else
+ #endif
tmpdir = "/tmp";
+ }
socket_name = alloca (strlen (tmpdir) + strlen (server_name)
+ EXTRA_SPACE);
sprintf (socket_name, "%s/emacs%d/%s",
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7135
; Package
emacs
.
(Thu, 30 Sep 2010 09:16:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 7135 <at> debbugs.gnu.org (full text, mbox):
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Thu, 30 Sep 2010 02:45:59 -0400
> Cc: Bob Nnamtrop <bobnnamtrop <at> gmail.com>, 7135 <at> debbugs.gnu.org
>
> Jan Djärv wrote:
>
> > No. It is a getconf variable.
>
> Something more like this then?
>
> *** lib-src/emacsclient.c 2010-01-13 15:38:28 +0000
> --- lib-src/emacsclient.c 2010-09-30 06:40:27 +0000
> ***************
> *** 1249,1255 ****
> --- 1249,1266 ----
> {
> tmpdir = egetenv ("TMPDIR");
> if (!tmpdir)
> + {
> + #ifdef DARWIN_OS
> + size_t n = confstr (_CS_DARWIN_USER_TEMP_DIR, NULL, (size_t) 0);
> + if (n > 0)
> + {
> + tmpdir = alloca (n);
> + confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n);
> + }
> + else
> + #endif
> tmpdir = "/tmp";
> + }
If this works, shouldn't it rather be part of egetenv? Or at least a
new get_tmpdir function that would call egetenv on all platforms
except Darwin, and use the above on Darwin?
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7135
; Package
emacs
.
(Thu, 30 Sep 2010 10:12:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 7135 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris skrev 2010-09-30 08.45:
> + {
> + #ifdef DARWIN_OS
> + size_t n = confstr (_CS_DARWIN_USER_TEMP_DIR, NULL, (size_t) 0);
> + if (n> 0)
> + {
> + tmpdir = alloca (n);
> + confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n);
> + }
> + else
> + #endif
> tmpdir = "/tmp";
> + }
That works.
Jan D.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7135
; Package
emacs
.
(Thu, 30 Sep 2010 18:07:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 7135 <at> debbugs.gnu.org (full text, mbox):
On Thu, Sep 30, 2010 at 4:14 AM, Jan Djärv <jan.h.d <at> swipnet.se> wrote:
>
>
> Glenn Morris skrev 2010-09-30 08.45:
>>
>> + {
>> + #ifdef DARWIN_OS
>> + size_t n = confstr (_CS_DARWIN_USER_TEMP_DIR, NULL, (size_t)
>> 0);
>> + if (n> 0)
>> + {
>> + tmpdir = alloca (n);
>> + confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n);
>> + }
>> + else
>> + #endif
>> tmpdir = "/tmp";
>> + }
>
> That works.
>
> Jan D.
>
Yes, this works for me also.
Thanks,
Bob
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Fri, 01 Oct 2010 03:41:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Bob Nnamtrop <bobnnamtrop <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 01 Oct 2010 03:41:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 7135-done <at> debbugs.gnu.org (full text, mbox):
Version: 23.3
2010-10-01 Glenn Morris <rgm at gnu.org>
* emacsclient.c (set_local_socket) [DARWIN_OS]: Try as a
fall-back DARWIN_USER_TEMP_DIR. (Bug#3992)
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Fri, 01 Oct 2010 03:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
bread <breaddawson <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 01 Oct 2010 03:41:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Fri, 01 Oct 2010 03:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
bread <breaddawson <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 01 Oct 2010 03:41:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7135
; Package
emacs
.
(Fri, 01 Oct 2010 03:55:01 GMT)
Full text and
rfc822 format available.
Message #49 received at 7135 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii wrote:
> If this works, shouldn't it rather be part of egetenv? Or at least a
> new get_tmpdir function that would call egetenv on all platforms
> except Darwin, and use the above on Darwin?
I'm not sure if this matters anywhere outside of the current context.
I added a kludge to the init of temporary-file-directory in the trunk.
Maybe as you say there should be a Ftemporary_file_directory that is
used there and elsewhere.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 29 Oct 2010 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 295 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.