all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dave Abrahams <dave@boostpro.com>
Cc: 63181-done@debbugs.gnu.org
Subject: bug#63181: 28.2; Can't suppress server-already-running warning
Date: Mon, 01 May 2023 19:56:11 +0300	[thread overview]
Message-ID: <83lei8ng7o.fsf@gnu.org> (raw)
In-Reply-To: <21AA1260-C9D6-41D6-A7CA-00B2D1C5A69E@boostpro.com> (message from Dave Abrahams on Mon, 1 May 2023 09:24:10 -0700)

> From: Dave Abrahams <dave@boostpro.com>
> Date: Mon, 1 May 2023 09:24:10 -0700
> Cc: 63181@debbugs.gnu.org
> 
> > 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))))

That's a good solution, thanks.

> 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? ;-)

The documentation was already fixed to mention this caveat and the
proposed solutions, as you will find if you look at the emacs-29
branch of the Emacs Git repository.

More generally, I think it's unreasonable to assume that every
let-binding takes effect for everything that is triggered inside the
body of the binding.  A prominent example where this is not true is
when the body triggers some display-related feature -- the binding
doesn't work in that case because redisplay happens later, after the
command performed its thing and returned to the Emacs main loop.  In
addition, problems during startup are notoriously hard to detect and
debug if their warnings are suppressed, so I think it's completely
okay if suppressing them is not really easy.

So I don't think we have anything else to do here aside of documenting
the fact that warnings are delayed during startup, and so I'm closing
this bug.





      reply	other threads:[~2023-05-01 16:56 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
2023-05-01 16:56         ` Eli Zaretskii [this message]

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=83lei8ng7o.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=63181-done@debbugs.gnu.org \
    --cc=dave@boostpro.com \
    /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.