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 09:24:10 -0700 [thread overview]
Message-ID: <21AA1260-C9D6-41D6-A7CA-00B2D1C5A69E@boostpro.com> (raw)
In-Reply-To: <83mt2onj2l.fsf@gnu.org>
> On May 1, 2023, at 8:54 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Dave Abrahams <dave@boostpro.com>
>> Date: Mon, 1 May 2023 08:27:46 -0700
>> Cc: 63181@debbugs.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
>
> If you want to suppress these warnings only during startup, you can
> restore the original value of warning-suppress-types in
> emacs-startup-hook.
Saving and restoring this thing manually seems very inelegant compared with allowing `let' to do what it's designed for, and I don't want to globally override
I should point out that I wasn't presuming that warnings would be issued immediately, only that the setting of warning-suppress-types would be examined in whichever function was responsible for queueing warnings, rather than (only) the code that reports them.
>
> Did you try my other suggestions? did they work? can we close this bug
> report?
This works for me:
;;
;; Start the server, suppressing warnings
;;
;; I often run a 2nd emacs especially when working on configuration,
;; and I don't like startup to be noisy. But the suppression doesn't
;; work unless I defer the work because warning processing is
;; deferred until after startup; see
;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63181
(add-hook 'emacs-startup-hook
(lambda ()
(dlet ((warning-suppress-types '((server))))
(server-mode))))
Whether to close the bug is up to you of course, but IMO there's still a problem, at *least* in documentation. Ideally the value of warning-suppress-types should be respected at the time warnings are queued, but if not, the documentation should be updated with a caveat about trying to use it during startup. But really, who wants more caveats? ;-)
next prev parent reply other threads:[~2023-05-01 16:24 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
2023-05-01 15:54 ` Eli Zaretskii
2023-05-01 16:24 ` Dave Abrahams [this message]
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=21AA1260-C9D6-41D6-A7CA-00B2D1C5A69E@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.