GNU bug report logs - #51360
29.0.50; variable `server-name' initialized too late for use in init file

Previous Next

Package: emacs;

Reported by: Gregor Zattler <grfz <at> gmx.de>

Date: Sat, 23 Oct 2021 18:40:02 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gregor Zattler <grfz <at> gmx.de>
To: 51360 <at> debbugs.gnu.org
Subject: bug#51360: 29.0.50; variable `server-name' initialized too late for use in init file
Date: Sun, 24 Oct 2021 21:42:57 +0200
Hi Gregory, emacs devs,
* Gregory Heytings <gregory <at> heytings.org> [2021-10-24; 15:45]:
>> Warning (initialization): An error occurred while loading 
>> ´/home/grfz/.config/emacs/init.el´:
>>
>> Symbol's value as variable is void: server-name
>
> You should (require 'server) before referring to server-name.  None of the 
> defcustoms in server.el are autoloaded.

thanks.  Requiring server prevents this error, but `server-name'
is not set to the command line value, though:

~$ cat ~/.emacs
(require 'server)
(when (equal server-name "foo") (setq greeting "My name is foo!"))
~$ emacsclient -a "" -s foo --eval '(message greeting)'
emacsclient: Should XDG_RUNTIME_DIR='/run/user/1000' be in the environment?
emacsclient: (Be careful: XDG_RUNTIME_DIR is security-related.)
emacsclient: can't find socket; have you started the server?
emacsclient: To start the server in Emacs, type "M-x server-start".
Starting Emacs daemon.
Emacs daemon should have started, trying to connect again
*ERROR*: Symbol's value as variable is void: greeting

Ciao,
-- 
Gregor




This bug report was last modified 3 years and 205 days ago.

Previous Next


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