From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: master d9b5f618baa 2/4: Eglot: introduce eglot-events-buffer-config Date: Wed, 27 Dec 2023 17:07:22 +0000 Message-ID: References: <83le9f8ufh.fsf@gnu.org> Mime-Version: 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="6195"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 27 18:05:14 2023 Return-path: Envelope-to: ged-emacs-devel@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 1rIXLG-0001LB-MR for ged-emacs-devel@m.gmane-mx.org; Wed, 27 Dec 2023 18:05:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rIXKS-0002d2-6r; Wed, 27 Dec 2023 12:04:24 -0500 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 1rIXKI-0002cb-8N for emacs-devel@gnu.org; Wed, 27 Dec 2023 12:04:16 -0500 Original-Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rIXKF-0003We-VW; Wed, 27 Dec 2023 12:04:14 -0500 Original-Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2cc7b9281d1so64849691fa.1; Wed, 27 Dec 2023 09:04:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703696649; x=1704301449; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PtcTlHRP2SvZNfnwynGfXh/qRUC2BpvPDSvtf4EGNj0=; b=m4+z6xQB07aqa8WODnxwAqwlRc7r3u1bKRmoiqyRaG59azCK12tfYmEJQTuJz1OraR 3hdOl+zLDDkKT/9MxfWoudBl03peBrx6MGfX/aysEvRoNMqafpMfLN/imHi4EzDPsH+B iBCb9qixCvUF4qDUggqoXIVm0/lj+T7ovFH8fRdj+7LM2Z64staK1sMKnUPchOs76isc CUQ3L4ZY/t/cwd7sD9T1x9gnz8y0AY3h79riYoOMToRceuITow+/NGLZfaynEdHrOxIf g+d2KB7O3bSI6q8ggZ0Oer0jafAjyLR7MMra9d9DbvocKdpenWG9cpm8dhUgNpbTD+gu 0vvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703696649; x=1704301449; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PtcTlHRP2SvZNfnwynGfXh/qRUC2BpvPDSvtf4EGNj0=; b=p4+vzmYCeEcflOgpqKRLW9sTjb5+h+xB08L03daka3c29pKfXeEDu2w1myahRN3wNo cHJc+bPIV0T5G5CFSOhBlNfv+K98vedficXsM2saSd4T+SeLV5MGXx2uwLRPhiMu/eaB Cqg1DtdFZ5joPC8sJ1mrdLpV+HVOhHH1G7MjHHCm4uZFPqrc2kb2cuN8CWSGOU7m8rtI XPu1JnDGuwSzBGTMLgXHwILGZWxeHZo0FFOdQFurrXK6SxA8s3pZpmTZYm7EyGoJXu7s r+KK+3K4q+/YjvUto9nQh+45sHLKOkm1OqHXr0O0rwl+rnCvRPngl4OglRLu1VYbO435 rDgw== X-Gm-Message-State: AOJu0Yy6Y0BOrr4Q8mUIM5VllsP2dffYhQ7Aih6Frs8U8uMq47BEbyvV AsI6Rou9JEDZ4bSly+yJhGN10OryWx2liLklTUz6m+Zv/ug= X-Google-Smtp-Source: AGHT+IEanYktV1qr5p0TcwCYhVlmoeO34nJvAPEZbJ6OQOCuRabwUHRUjRH3O5KsSRmpLuS9WFvj5nOrhVEjtmooQv8= X-Received: by 2002:a05:651c:201:b0:2cc:5368:6c52 with SMTP id y1-20020a05651c020100b002cc53686c52mr4110900ljn.93.1703696648897; Wed, 27 Dec 2023 09:04:08 -0800 (PST) In-Reply-To: <83le9f8ufh.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=joaotavora@gmail.com; helo=mail-lj1-x22b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314248 Archived-At: On Wed, Dec 27, 2023 at 4:47=E2=80=AFPM Eli Zaretskii wrote: > > > +(defcustom eglot-events-buffer-config > > + (list :size (or (bound-and-true-p eglot-events-buffer-size) 2000000) > > + :format 'full) > > + "Configure the Eglot events buffer. > > + > > +Value is a plist accepting the keys `:size', which controls the > > +size in characters of the buffer (0 disables, nil means > > +infinite), and `:format', which controls the shape of each log > > +entry (`full' includes the original JSON, `lisp' uses > > +pretty-printed Lisp). > > + > > +For changes on this variable to take effect, you need to restart > > +the LSP connection. That can be done by `eglot-reconnect'." > > Since changing this defcustom needs some code to be run in order to > make the changes effective, I wonder whether this defcustom could use > :set to run that code automatically? Read above in the same diff: @c FIXME: Shouldn't the defcustom do this by itself using the :set -@c attribute? +@c attribute? Maybe not because reconnecting is a complex task. @xref{Troubleshooting Eglot}, for when this could be useful. IOW Reconnecting to a server may trash useful caches, fail due to numerous reasons, etc... We don't want to initiate it just because a user changed a preference. We could ask for confirmation though, patches welcome. Jo=C3=A3o