From: Dave Abrahams <dave@boostpro.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 63181@debbugs.gnu.org
Subject: bug#63181: 28.2; Can't suppress server-already-running warning
Date: Mon, 1 May 2023 08:27:46 -0700 [thread overview]
Message-ID: <C28E37B2-3453-4EFC-A8C3-6BC2A8E59701@boostpro.com> (raw)
In-Reply-To: <83jzxtq5f3.fsf@gnu.org>
I let-bind because I don’t want to suppress all server warnings forever, which is what I presume adding ‘sever to the list means ; just this one. Thanks for the explanation
Sent from my iPhone
> On Apr 29, 2023, at 10:55 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>
>>
>> From: Dave Abrahams <dave@boostpro.com>
>> Date: Sat, 29 Apr 2023 19:27:14 -0700
>>
>> with emacs -Q or emacs -q, you can run
>>
>> (dlet ((warning-suppress-types '((server))))
>> (server-mode))
>>
>> from the *scratch* buffer, and if a server is already running, you just
>> get nil. But: if I put that stanza at the beginning of my early-init.el
>> (or init.el) and have no other configuration, I get a warning if the
>> server is already running.
>>
>> Warning (server): Unable to start the Emacs server.
>> There is an existing Emacs server, named "server".
>> To start the server in this Emacs process, stop the existing
>> server or call ‘M-x server-force-delete’ to forcibly disconnect it. Disable showing Disable logging
>>
>> It should be possible to suppress this warning programmatically, but I
>> can't find a way.
>
> Why do you let-bind the variable, instead of assigning a value to it?
> It's a defcustom, so it is meant to be bound with setq. You seem to
> assume that the warning produced by server-mode will be processed
> inside the binding, but that is not true during startup: warnings
> emitted during startup are delayed until after the init files are read
> and processed, and by that time your let-binding is long gone.
>
> If you, for some reason, insist on doing this with a let-binding, you
> will need to move this to after-init-hook or emacs-startup-hook, which
> are invoked after loading the init files, and warnings are no longer
> delayed.
next prev parent reply other threads:[~2023-05-01 15:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-30 2:27 bug#63181: 28.2; Can't suppress server-already-running warning Dave Abrahams
2023-04-30 5:56 ` Eli Zaretskii
2023-05-01 15:27 ` Dave Abrahams [this message]
2023-05-01 15:54 ` Eli Zaretskii
2023-05-01 16:24 ` Dave Abrahams
2023-05-01 16:56 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C28E37B2-3453-4EFC-A8C3-6BC2A8E59701@boostpro.com \
--to=dave@boostpro.com \
--cc=63181@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.