From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63181: 28.2; Can't suppress server-already-running warning Date: Mon, 01 May 2023 19:56:11 +0300 Message-ID: <83lei8ng7o.fsf@gnu.org> References: <83jzxtq5f3.fsf@gnu.org> <83mt2onj2l.fsf@gnu.org> <21AA1260-C9D6-41D6-A7CA-00B2D1C5A69E@boostpro.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6467"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63181-done@debbugs.gnu.org To: Dave Abrahams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 01 18:56:31 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ptWpC-0001Pc-Mz for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 May 2023 18:56:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptWop-0006kY-6P; Mon, 01 May 2023 12:56:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptWol-0006k6-UY for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 12:56:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ptWok-0005Rt-Oy for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 12:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ptWok-0007m6-AR for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 12:56:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 May 2023 16:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 63181 X-GNU-PR-Package: emacs Mail-Followup-To: 63181@debbugs.gnu.org, eliz@gnu.org, dave@boostpro.com Original-Received: via spool by 63181-done@debbugs.gnu.org id=D63181.168296013929805 (code D ref 63181); Mon, 01 May 2023 16:56:02 +0000 Original-Received: (at 63181-done) by debbugs.gnu.org; 1 May 2023 16:55:39 +0000 Original-Received: from localhost ([127.0.0.1]:40942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptWoN-0007kc-0Q for submit@debbugs.gnu.org; Mon, 01 May 2023 12:55:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptWoK-0007jp-5K for 63181-done@debbugs.gnu.org; Mon, 01 May 2023 12:55:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptWoD-0005Gv-FI; Mon, 01 May 2023 12:55:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=riktxn6KAO4cEdOYBdcZO1SHLi11sSJYrpwPEtB0OR4=; b=O+hoqGOsKnTi SpiroUT0wbyRsb52xkDc5hGCPrYOUSkOb1XMRjBHFozVXpI6zrhR3T+2Y5/04/rEfAVQXkhClBP+i o8vrgA4TTdwNBfs0S+TduBVcbOrBtIF8swVPVSdeEf/chgXd1M4tlWk7p0EGUFxK5Wd9shTEvaEKB EMgreZMXvNHpQxfYEbKUpVpVEV4KyDue4eQEQ6HZ8dkR/TaI0eTur/ueEgpzK5doci4uRcy5JM6Bq UKLybuKmOdk4DaG0uXFTWzrqGrgL9LHGPCmMM7xmw/cA6ejC1VpuO7JtFrIihJYX5x3xkV5sCkByA vhipJ2CwG6bKzaHzEq2KgA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptWoC-0001aT-Kp; Mon, 01 May 2023 12:55:28 -0400 In-Reply-To: <21AA1260-C9D6-41D6-A7CA-00B2D1C5A69E@boostpro.com> (message from Dave Abrahams on Mon, 1 May 2023 09:24:10 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260880 Archived-At: > From: Dave Abrahams > 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.