From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dave Abrahams Newsgroups: gmane.emacs.bugs Subject: bug#63181: 28.2; Can't suppress server-already-running warning Date: Mon, 1 May 2023 08:27:46 -0700 Message-ID: References: <83jzxtq5f3.fsf@gnu.org> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6983"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63181@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 01 17:29:13 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 1ptVSj-0001c3-B0 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 May 2023 17:29:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptVSe-0006f7-6R; Mon, 01 May 2023 11:29:08 -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 1ptVSZ-0006en-Lw for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 11:29:03 -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 1ptVSY-0005J1-Q3 for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 11:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ptVSY-0005BB-GW for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 11:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dave Abrahams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 May 2023 15:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63181 X-GNU-PR-Package: emacs Original-Received: via spool by 63181-submit@debbugs.gnu.org id=B63181.168295488819847 (code B ref 63181); Mon, 01 May 2023 15:29:02 +0000 Original-Received: (at 63181) by debbugs.gnu.org; 1 May 2023 15:28:08 +0000 Original-Received: from localhost ([127.0.0.1]:40845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptVRf-0005A2-Un for submit@debbugs.gnu.org; Mon, 01 May 2023 11:28:08 -0400 Original-Received: from mail-pf1-f179.google.com ([209.85.210.179]:55770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptVRc-00059W-47 for 63181@debbugs.gnu.org; Mon, 01 May 2023 11:28:07 -0400 Original-Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-63b5c4c769aso3031823b3a.3 for <63181@debbugs.gnu.org>; Mon, 01 May 2023 08:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boostpro-com.20221208.gappssmtp.com; s=20221208; t=1682954878; x=1685546878; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=zXYiju2hkS/kOQcSTPcBCcWul/urP425slbW7fbx+bs=; b=kEvVEI5bW5AJDh+EBtZDIeZqqZ3mQzQQ/wQ/ITcIuyo4gKuLH4Db8m8GubOOm9fg0f U0fwqiJW133SDtNu5I4gGJ1ds6Z44Y97AbYmB2amroZa/ogLfkJB697JwQMAq/FEwR4J vJjNa8wTiwQvo03VgtsQ4OBGTRmQyFeynmh7bvxPEuejtlm7eRgr2d0fMQQUnfUpiNqh JTgPQE3d7NlIZzdrPJIuKl6r5+slLjHk/Da4898loBgrGFUTi4PUCdA4bEjucA+Ncbuf wtDb+UbSGl/ldtvLHtS3ujkMVPrK5mVZAIzJB0yeZl75P1uwmqBTc7jpxrXZDZapGlTt 4Tzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682954878; x=1685546878; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zXYiju2hkS/kOQcSTPcBCcWul/urP425slbW7fbx+bs=; b=MSljItaCx73wxgWKJykBFV3f0LQKgV6Or3XGD2IO6pN8WnvbnCHJBk2rAT7Z4ZNkOP 73vFXBY+bkTT9c0L6lMMVX8G2miGRKWj1dT/XZY1nDkq+LsTZTtPUVmpM6nzClxgO1eQ R1nvvL/paEvEuUJZzGI9VFqISHIWJZzTMBdbwmphWKE2xT0+Zyjvkb8EKrtTwt2PgjH4 yA2KCSKyzz2/adS9aclVacaNqw1jTy/MT5JREludqGfddr7e8WNaeuCtYQKP4sy4aTlo qf9c1SOixM/e7flK/plO6FwGeUG4A4z37IWC1s1VqL6PAuB3o/22MbY1qGvfNiV2d7V1 GtOA== X-Gm-Message-State: AC+VfDzU9VYIQWoXv+75Otp4FpbGHpA7k/Co+A0FxY8h+dds0mQ3Tbz2 ZF+HWtBzqFrQ0YUxeHG7zPg1sw== X-Google-Smtp-Source: ACHHUZ6NkQN2v8HJWyVKt3MJXmYyAMqO0vJOBJQ2OmGhk7/4yGhZ32aVY7TK9w/zBaPUNB+KJ7hPCw== X-Received: by 2002:a05:6a00:18aa:b0:63d:2f12:fa35 with SMTP id x42-20020a056a0018aa00b0063d2f12fa35mr21872144pfh.26.1682954877806; Mon, 01 May 2023 08:27:57 -0700 (PDT) Original-Received: from smtpclient.apple (69-209-31-205.lightspeed.sntcca.sbcglobal.net. [69.209.31.205]) by smtp.gmail.com with ESMTPSA id l21-20020a63ea55000000b005287a0560c9sm9565020pgk.1.2023.05.01.08.27.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 May 2023 08:27:57 -0700 (PDT) In-Reply-To: <83jzxtq5f3.fsf@gnu.org> X-Mailer: iPhone Mail (20E252) 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:260874 Archived-At: I let-bind because I don=E2=80=99t want to suppress all server warnings fore= ver, which is what I presume adding =E2=80=98sever to the list means ; just t= his one. Thanks for the explanation=20 Sent from my iPhone > On Apr 29, 2023, at 10:55 PM, Eli Zaretskii wrote: >=20 > =EF=BB=BF >>=20 >> From: Dave Abrahams >> Date: Sat, 29 Apr 2023 19:27:14 -0700 >>=20 >> with emacs -Q or emacs -q, you can run >>=20 >> (dlet ((warning-suppress-types '((server)))) >> (server-mode)) >>=20 >> 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. >>=20 >> 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 =E2=80=98M-x server-force-delete=E2=80=99 to forcibly disc= onnect it. Disable showing Disable logging >>=20 >> It should be possible to suppress this warning programmatically, but I >> can't find a way. >=20 > 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. >=20 > 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.