Subject: Re: bug#43888: 28.0.50; emacsclient not working properly

From: Gábor <[email-masked]>
Date: Wed, 28 Oct 2020 14:11:24 +0100

The problem seems to be with having two different versions of with-editor
installed. Removed the older one and emacsclient behavior is now normal.
Thanks for the pointers,

Best regards,
Gabor

Gábor <[email-masked]> ezt írta (időpont: 2020. okt. 13., K, 9:36):

> I get this error when I only have the following in my .emacs:
>
> (setq debug-on-signal t)
> (setq debug-on-error t)
> (server-start)
>
> Gábor <[email-masked]> ezt írta (időpont: 2020. okt. 13., K, 9:30):
>
>> I moved it to the top of my config, then I get the following error on
>> startup:
>>
>> Debugger entered--Lisp error: (void-variable server-use-tcp)
>>   default-toplevel-value(server-use-tcp)
>>   custom-initialize-reset(server-use-tcp (funcall #'#f(compiled-function
>> () #<bytecode 0x1e0000171e91>)))
>>   custom-declare-variable(server-use-tcp (funcall #'#f(compiled-function
>> () #<bytecode 0x1e0000171e91>)) "If non-nil, use TCP sockets instead of
>> local socke..." :set #f(compiled-function (sym val) #<bytecode
>> 0xecd269cdbfc6f97>) :type boolean :version "22.1")
>>
>> byte-code("\300\301\302\303\304\305%\210\306\307\310\311\312DD\313\314\315\316\317\320\321&\11\210\306\322\310\311\323DD\324\316\325\320\321&\7\210\326\322\327\330#\210\306\331\310\311..."
>> [custom-declare-group server nil "Emacs running as a server process."
>> :group external custom-declare-variable server-use-tcp funcall function
>> #f(compiled-function () #<bytecode 0x1e0000171e91>) "If non-nil, use TCP
>> sockets instead of local socke..." :set #f(compiled-function (sym val)
>> #<bytecode 0xecd269cdbfc6f97>) :type boolean :version "22.1" server-host
>> #f(compiled-function () #<bytecode 0x1e0000171e91>) "The name or IP address
>> to use as host address of t..." (choice (string :tag "Name or IP address")
>> (const :tag "Local" nil)) put risky-local-variable t server-port
>> #f(compiled-function () #<bytecode 0x1e0000171e91>) "The port number that
>> the server process should lis..." (choice (string :tag "Port number")
>> (const :tag "Random" nil)) "24.1" server-auth-dir #f(compiled-function ()
>> #<bytecode 0xae5c6d90276fe>) "Directory for server authentication
>> files.\nWe only..." directory server-auth-key #f(compiled-function ()
>> #<bytecode 0x1e0000171e91>) "Server authentication key.\nThis is only used
>> if `s..." (choice (const :tag "Random" nil) (string :tag "Password"))
>> "24.3" server-raise-frame #f(compiled-function () #<bytecode
>> 0x1e0000171e5d>) "If non-nil, raise frame when switching to a buffer..."
>> server-visit-hook #f(compiled-function () #<bytecode 0x1e0000171e91>) "Hook
>> run when visiting a file for the Emacs server..." hook server-switch-hook
>> #f(compiled-function () #<bytecode 0x1e0000171e91>) "Hook run when
>> switching to a buffer for the Emacs ..." server-after-make-frame-hook ...]
>> 10)
>>   (server-start)
>>   eval-buffer(#<buffer  *load*> nil "/home/username/.emacs" nil t)  ;
>> Reading at buffer position 216
>>   load-with-code-conversion("/home/username/.emacs"
>> "/home/username/.emacs" t t)
>>   load("~/.emacs" noerror nomessage)
>>   startup--load-user-init-file(#f(compiled-function () #<bytecode
>> 0xcee8b0bce81ba0f>) #f(compiled-function () #<bytecode 0x81a386fa1b1b513>)
>> t)
>>   command-line()
>>   normal-top-level()
>>
>> Gábor <[email-masked]> ezt írta (időpont: 2020. okt. 13., K, 9:17):
>>
>>> I set them both to t, now I have the following error on startup:
>>>
>>> Debugger entered--Lisp error: (file-missing "make client process failed"
>>> "No such file or directory" :name "server-client-test" :family local
>>> :server nil :noquery t :service "/run/user/1000/emacs/server")
>>>   make-network-process(:name "server-client-test" :family local :server
>>> nil :noquery t :service "/run/user/1000/emacs/server")
>>>   server-running-p("server")
>>>   server-start()
>>>   eval-buffer(#<buffer  *load*> nil "/home/username/.emacs" nil t)  ;
>>> Reading at buffer position 27778
>>>   load-with-code-conversion("/home/username/.emacs"
>>> "/home/username/.emacs" t t)
>>>   load("~/.emacs" noerror nomessage)
>>>   startup--load-user-init-file(#f(compiled-function () #<bytecode
>>> 0xed8d667e6160a0f>) #f(compiled-function () #<bytecode 0x81a386fa1b1b513>)
>>> t)
>>>   command-line()
>>>   normal-top-level()
>>>
>>>
>>>
>>> Eli Zaretskii <[email-masked]> ezt írta (időpont: 2020. okt. 12., H,
>>> 16:50):
>>>
>>>> > From: Michael Heerdegen <[email-masked]>
>>>> > Cc: Gábor <[email-masked]>,  [email-masked],
>>>> >   [email-masked],
>>>> >   [email-masked]
>>>> > Date: Mon, 12 Oct 2020 07:58:27 +0200
>>>> >
>>>> > Eli Zaretskii <[email-masked]> writes:
>>>> >
>>>> > > > *ERROR*: Wrong number of arguments: (1 . 4), 5
>>>> >
>>>> > > But since with "emacs -Q" it does work, it is still some of your
>>>> > > customizations that are the prime suspect.
>>>> >
>>>> > Is there a way for the user to get an error message more verbose than
>>>> > above?
>>>>
>>>> Yes, make sure debug-on-signal and debug-on-error are both non-nil in
>>>> the Emacs that runs the server, then you will have the backtrace pop
>>>> up in Emacs.  Assuming there's some frame visible for the server, that
>>>> is.
>>>>
>>>