From unknown Thu Jun 19 14:05:39 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#59149 <59149@debbugs.gnu.org> To: bug#59149 <59149@debbugs.gnu.org> Subject: Status: Feature Request: Report progress of long requests in Eglot Reply-To: bug#59149 <59149@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:05:39 +0000 retitle 59149 Feature Request: Report progress of long requests in Eglot reassign 59149 emacs submitter 59149 Danny Freeman severity 59149 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 09 09:23:18 2022 Received: (at submit) by debbugs.gnu.org; 9 Nov 2022 14:23:18 +0000 Received: from localhost ([127.0.0.1]:39377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oslz3-0004Kw-Vp for submit@debbugs.gnu.org; Wed, 09 Nov 2022 09:23:18 -0500 Received: from lists.gnu.org ([209.51.188.17]:57154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oslz1-0004Ko-WF for submit@debbugs.gnu.org; Wed, 09 Nov 2022 09:23:16 -0500 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 1oslz1-00022u-OT for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2022 09:23:15 -0500 Received: from out0.migadu.com ([94.23.1.103]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oslyw-0002B9-48 for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2022 09:23:14 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668003783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=JLDlbWH5ZDpR2rl3usegdVqQqcFnrEEhT22P11nX7ig=; b=F31ZdK89zs5M4E6pewa1mZB/QFPUyQyQw1l5RFJXuac5QXr+hwlGpd+TnoeIJ26DOZ6JDb qE5mN15uB0YuPXkZp9tJy0+N7/LJcfI+f6mfJ3IwC1vRZz05qj57QGyDsoEBLh5ShtfS4n 9tPMrEV5Db8+PUsR1Sy6/YeMLprpIgg= From: Danny Freeman To: bug-gnu-emacs@gnu.org Subject: Feature Request: Report progress of long requests in Eglot Date: Wed, 09 Nov 2022 09:13:29 -0500 Message-ID: <87educqkar.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=94.23.1.103; envelope-from=danny@dfreeman.email; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Something I think would be nice to have in eglot is some kind of progress indicator for long running requests. Attached is my attempt at implementing these. The patch contains links to relevant LSP specs in the commit message. Here is a link to an old github discussion about progress notifications: https://github.com/joaotavora/eglot/discussions/835 It uses the built in progress-reporter to display progress in the echo area. Something that may be missing is a way for the user to enable/disable this. Not sure what the right facilities are for that. The eglot-stay-out-of pattern maybe? I didn't include that because I'm not sure what to "stay out of". Maybe the symbol `progress-reporter'? Happy to add something like that. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Eglot-Display-progress-notifications-in-minibuffer-a.patch Content-Description: progress notification patch >From b53753f611045bb44ef4d1d30d6f426be889f277 Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Wed, 9 Nov 2022 08:46:45 -0500 Subject: [PATCH] Eglot: Display progress notifications in minibuffer as they arrive The LSP spec describes methods for reporting progress on long running jobs to the client: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#progress https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workDoneProgress This change reports those notifications in the minibuffer as they come in. It shows a percent indicator (if the server provides theme), or a spinner. This change should open the door for writing a "cancel long running request" command, which are identified by these progress notifications. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_workDoneProgress_cancel --- lisp/progmodes/eglot.el | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index ecfede8fa6..b85d9fd445 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -820,6 +820,9 @@ eglot-lsp-server (spinner :documentation "List (ID DOING-WHAT DONE-P) representing server progress." :initform `(nil nil t) :accessor eglot--spinner) + (progress-reporter-alist + :documentation "Alist of (PROGRESS-TOKEN . PROGRESS-REPORTER)." + :accessor eglot--progress-reporter-alist) (inhibit-autoreconnect :initform t :documentation "Generalized boolean inhibiting auto-reconnection if true." @@ -2035,6 +2038,42 @@ eglot-handle-notification (_server (_method (eql telemetry/event)) &rest _any) "Handle notification telemetry/event.") ;; noop, use events buffer +(defun eglot--progress-report-message (title message) + "Format a $/progress report message, given a TITLE and/or MESSAGE string." + (cond + ((and title message) (format "%s %s" title message)) + (title title) + (message message))) + +(defun eglot--progress-reporter (server token) + "Get a prgress-reporter identified by the progress TOKEN from the SERVER ." + (cdr (assoc token (eglot--progress-reporter-alist server)))) + +(defun eglot--progress-reporter-delete (server token) + "Delete progress-reporters identified by the progress TOKEN from the SERVER." + (setf (eglot--progress-reporter-alist server) + (assoc-delete-all token (eglot--progress-reporter-alist server)))) + +(cl-defmethod eglot-handle-notification + (server (_method (eql $/progress)) &key token value) + "Handle a $/progress notification identified by TOKEN from the SERVER." + (cl-destructuring-bind (&key kind title percentage message) value + (pcase kind + ("begin" (let* ((prefix (format (concat "[eglot] %s %s:" (when percentage " ")) + (eglot-project-nickname server) token)) + (pr (if percentage + (make-progress-reporter prefix 0 100 percentage 1 0) + (make-progress-reporter prefix nil nil nil 1 0)))) + (eglot--progress-reporter-delete server token) + (setf (eglot--progress-reporter-alist server) + (cons (cons token pr) (eglot--progress-reporter-alist server))) + (progress-reporter-update pr percentage (eglot--progress-report-message title message)))) + ("report" (when-let ((pr (eglot--progress-reporter server token))) + (progress-reporter-update pr percentage (eglot--progress-report-message title message)))) + ("end" (when-let ((pr (eglot--progress-reporter server token))) + (progress-reporter-done pr) + (eglot--progress-reporter-delete server token)))))) + (cl-defmethod eglot-handle-notification (_server (_method (eql textDocument/publishDiagnostics)) &key uri diagnostics &allow-other-keys) ; FIXME: doesn't respect `eglot-strict-mode' -- 2.38.1 --=-=-= Content-Type: text/plain Thank you, -- Danny Freeman --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 10:49:22 2022 Received: (at submit) by debbugs.gnu.org; 10 Nov 2022 15:49:22 +0000 Received: from localhost ([127.0.0.1]:44033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot9nu-00006J-4j for submit@debbugs.gnu.org; Thu, 10 Nov 2022 10:49:22 -0500 Received: from lists.gnu.org ([209.51.188.17]:37214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot9nq-000069-Ot for submit@debbugs.gnu.org; Thu, 10 Nov 2022 10:49:20 -0500 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 1ot9nq-0005zD-Gz for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 10:49:18 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ot9no-0006WZ-1g for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 10:49:18 -0500 Received: by mail-wm1-x334.google.com with SMTP id t4so1390096wmj.5 for ; Thu, 10 Nov 2022 07:49:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TpSnxzScyKkmKE4pfMsBO8kIqBjJxPoivKM+Uqc+oHI=; b=PHRRnfoBH08IEnouROcvSUINVTaPNAlJp0TillqvPjFmgm89d960omp3PM9jo6t1A1 orNG1hF5V1ITI5pO/FN2T2f14NghJS1rEFvSO3gKHWqQ/qp85LF3yPSdR+5V0usSEBVy zD5ot5jpHdRbwvoDlH8EspvSOJlHwdq15xSzxLb9r7QtDebYsTEmWzB3EtksFH238fFB +Wf5UhHoywCqL12qoKQStAqA2FJaO9o3btnBOBhEkd4FGEc5sXwAUgGmA+zL/RYBf1Kc dRBELLf9LB+YXBIB8pVfsCzK8s9q7QF9FLRcQD3+MO5ELHQv2qVy5mbfxiFgjvgwX5Ye 9H3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=TpSnxzScyKkmKE4pfMsBO8kIqBjJxPoivKM+Uqc+oHI=; b=U+P+0NnLGhCFopiHi7XUZvRy03oirDli4rGSaTytPpiNr640mR9HDxo/2LkcqXTwtQ SnKxADaBO/8afafAoHTqspeEwBNzBd4DY4pT3qf+fF4pAQ7ZBEBV4FfocjU/JZpSl0ta C0g58K451C6zgUSOKWLldFbCUEHnzgnQhDsF3gYmxSDPkifvpNDb3lQcqz0BAzPNDQN3 6CYePdeatttmF89qt/9ndmrVZZ5NFwUqkFJ+zdCSgODw5R8tsJaLoSndwP2qKuQ6NYIY Za4li7cQTxcu7J8zVjRgizPodkMA6Z3pI/lB0QRVIvvyZg35GAoXdDIu3VpXG3EXEfS5 jUhw== X-Gm-Message-State: ACrzQf3Xnk+lrMXvoLt2jp+g0KUZ/sY2FwJaOkA/zjepAgnpCL3quJPv Xq/b9//Dm980snqDnw13JxESkwtPwzg= X-Google-Smtp-Source: AMsMyM647++ckrW3DMOyr1lIhHevjmu55Wwd0bjh+3gMPcWkfgt1WdjooYzn/CuLAClKo4lB37OGPQ== X-Received: by 2002:a05:600c:538b:b0:3c6:b66d:4027 with SMTP id hg11-20020a05600c538b00b003c6b66d4027mr51945215wmb.146.1668095354166; Thu, 10 Nov 2022 07:49:14 -0800 (PST) Received: from krug ([87.196.81.1]) by smtp.gmail.com with ESMTPSA id m189-20020a1c26c6000000b003c6edc05159sm5282747wmm.1.2022.11.10.07.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 07:49:13 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Danny Freeman Subject: Re: Feature Request: Report progress of long requests in Eglot In-Reply-To: <87educqkar.fsf@dfreeman.email> (Danny Freeman's message of "Wed, 09 Nov 2022 09:13:29 -0500") References: <87educqkar.fsf@dfreeman.email> Date: Thu, 10 Nov 2022 15:50:29 +0000 Message-ID: <87zgcy95bu.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x334.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Danny Freeman writes: > Something I think would be nice to have in eglot is some kind of > progress indicator for long running requests. Attached is my attempt at > implementing these. The patch contains links to relevant LSP specs in > the commit message. > > Here is a link to an old github discussion about progress notifications: > https://github.com/joaotavora/eglot/discussions/835=20 > > It uses the built in progress-reporter to display progress in the > echo area. Something that may be missing is a way for the user to > enable/disable this. Not sure what the right facilities are for that. > The eglot-stay-out-of pattern maybe? I didn't include that because I'm > not sure what to "stay out of". Maybe the symbol `progress-reporter'? > Happy to add something like that. Thanks Danny, this doesn't look bad at all, though I have yet to understand how it works. I can half-see why progress status should be a server property, but it would be better if you provided an automated test, or maybe just a step-by-step sequence diagram (which can be in plain text and language) that clarifies this. An animated gif that might also work. Anyway, the way the user opts out of LSP configuration is via the user variable eglot-ignored-server-capabilities. So there should be some point where you check the associated LSP capability of "progress reporting" with eglot--server-capable. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 08:10:20 2022 Received: (at submit) by debbugs.gnu.org; 11 Nov 2022 13:10:20 +0000 Received: from localhost ([127.0.0.1]:45286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otTnY-00007o-2v for submit@debbugs.gnu.org; Fri, 11 Nov 2022 08:10:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:38098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otTnW-00007e-75 for submit@debbugs.gnu.org; Fri, 11 Nov 2022 08:10:18 -0500 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 1otTnV-0007tK-6h for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2022 08:10:18 -0500 Received: from out2.migadu.com ([2001:41d0:2:aacc::]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otTnQ-0002Of-Pv for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2022 08:10:16 -0500 References: <87educqkar.fsf@dfreeman.email> <87zgcy95bu.fsf@gmail.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668172202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lGJg6nuWAdv4OGLDBOoWiKPXAbJh3H2g0I/Rzdd337w=; b=BGz5dJVB/uKxEG+2l68GRJBP2pBFw6m140k4Ar/2JRkBkZu+JUNuUch8UNXEWwl0OT43UC 9nearfp6qHmhdWbhUJBDSnqmG35HZ3UCkdXM+gL6R791EWVIB1AKSs65STgncQeCsrS9g9 Vpz1G+CSU9zhbwFSkWq5XIfEHlf4UCY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: Feature Request: Report progress of long requests in Eglot Date: Fri, 11 Nov 2022 08:07:45 -0500 In-reply-to: <87zgcy95bu.fsf@gmail.com> Message-ID: <87iljlvdqw.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=danny@dfreeman.email; helo=out2.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Jo=C3=A3o T=C3=A1vora writes: > Thanks Danny, this doesn't look bad at all, though I have yet to > understand how it works. I can half-see why progress status should be a > server property, but it would be better if you provided an automated > test, or maybe just a step-by-step sequence diagram (which can be in > plain text and language) that clarifies this. An animated gif that > might also work. I'd love to write some tests, but I can't seem to find any for eglot in the emacs repository. I see they exist in the github project. Is there something I'm overlooking? > Anyway, the way the user opts out of LSP configuration is via the user > variable eglot-ignored-server-capabilities. So there should be some > point where you check the associated LSP capability of "progress > reporting" with eglot--server-capable. That's what I'm looking for, thank you. I'll take a look at the prior art in eglot and work this in. --=20 Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 19 04:43:25 2022 Received: (at 59149) by debbugs.gnu.org; 19 Nov 2022 09:43:25 +0000 Received: from localhost ([127.0.0.1]:39045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owKNh-0003mj-6o for submit@debbugs.gnu.org; Sat, 19 Nov 2022 04:43:25 -0500 Received: from gproxy1-pub.mail.unifiedlayer.com ([69.89.25.95]:33247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owKNb-0003mR-Az for 59149@debbugs.gnu.org; Sat, 19 Nov 2022 04:43:22 -0500 Received: from cmgw11.mail.unifiedlayer.com (unknown [10.0.90.126]) by progateway3.mail.pro1.eigbox.com (Postfix) with ESMTP id 8ACEC10047D84 for <59149@debbugs.gnu.org>; Sat, 19 Nov 2022 09:43:00 +0000 (UTC) Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id wKNHokSnChil5wKNHo2goR; Sat, 19 Nov 2022 09:43:00 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=Qo6bYX+d c=1 sm=1 tr=0 ts=6378a524 a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=9xFQ1JgjjksA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=zWu2VnE8FkdBgLBfsioA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YPDD3kKZ3DBDx/po0/IU8wOVxxFwz79laYFUTDIn3hI=; b=hhK1rxgt0yLKuQykIMuaT88sl5 G4GlXDULXk+d6+h9oImU4Eoqb4WLhQxbWFhrOtnGwHC24moh3uyhXUv3KLBlOwpY0ZgMJP//Uyqs3 336JY+sxZY2iiTNdRog80y3tqwMk7OvoM/4hPIRXBZjS9Zr1bdmUFsMWWq2A1bgADfpludQCOFMHn obOuSEjcOuKfK0d9qRT5kvtIQ9qmgjqdxSaUrR5bl2WvhZz3YFhv2ogAa7zNp5gQxHQTqELUE2DID yzVmsrpiubferAbmdIDbY/Ub6lGYjh/KYfJI7aqGdjZ9mJif5P3jd5Zbk9VtomVtKFdymOMpBDvXl DSWO74Tw==; Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:65329 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1owKNH-002zer-Ck for 59149@debbugs.gnu.org; Sat, 19 Nov 2022 02:42:59 -0700 From: Stephen Leake To: 59149@debbugs.gnu.org Subject: Feature Request: Report progress of long requests in Eglot Date: Sat, 19 Nov 2022 01:42:56 -0800 Message-ID: <86cz9jmg9r.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 135.180.197.170 X-Source-L: No X-Exim-ID: 1owKNH-002zer-Ck X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:65329 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 4 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This works for my needs in ada-mode; + 1. -- -- Stephe Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [135.180.197.170 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [69.89.25.95 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [69.89.25.95 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 59149 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This works for my needs in ada-mode; + 1. -- -- Stephe Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [69.89.25.95 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [69.89.25.95 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [135.180.197.170 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager This works for my needs in ada-mode; + 1. -- -- Stephe From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 19 13:14:08 2022 Received: (at submit) by debbugs.gnu.org; 19 Nov 2022 18:14:08 +0000 Received: from localhost ([127.0.0.1]:41078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owSLv-0004cA-NL for submit@debbugs.gnu.org; Sat, 19 Nov 2022 13:14:08 -0500 Received: from lists.gnu.org ([209.51.188.17]:48992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owSLs-0004c2-JD for submit@debbugs.gnu.org; Sat, 19 Nov 2022 13:14:04 -0500 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 1owSLs-00011o-Ek for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2022 13:14:04 -0500 Received: from out2.migadu.com ([188.165.223.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owSLq-0000f2-25 for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2022 13:14:04 -0500 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668881638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kSInxZgJlRqaPOFwrND6K9dyOBFVpCIlO95zarnCwCE=; b=UtIWyaB8fp5ud4awHH0CNSbp37n9z0uLSmzI+sESU5itO+O21Ig+kOLSc+HYjlJE1+2YH0 8DRYZnV4U+XL4MGp3hOCv2l2Uzeuz6GijaqcXppjDZGJ7f89GxEz5QvptUG9tP3bWdoBZI 8aBmwVGju1eAE3FCTgyPjVw+RELhXQM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Stephen Leake Subject: Re: bug#59149: Feature Request: Report progress of long requests in Eglot Date: Sat, 19 Nov 2022 13:03:24 -0500 In-reply-to: <86cz9jmg9r.fsf@stephe-leake.org> Message-ID: <87k03qvmla.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=188.165.223.204; envelope-from=danny@dfreeman.email; helo=out2.migadu.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Stephen Leake writes: > This works for my needs in ada-mode; + 1. Great to hear! > > Anyway, the way the user opts out of LSP configuration is via the user > > variable eglot-ignored-server-capabilities. So there should be some > > point where you check the associated LSP capability of "progress > > reporting" with eglot--server-capable. I'm trying to work on using the eglot-ignored-server-capabilities functionality with this, and am having some trouble. What exactly is the capability to ignore here? The method used itself is `$/progress`. I don't know how that translates to a "capability". I believe this needs an entry somewhere in the `eglot-client-capabilities` hierarchy. This: ``` (cl-defgeneric eglot-client-capabilities (server) "What the Eglot LSP client supports for SERVER." (:method (s) (list :progress t ;; or maybe :$ (list :progress t) :workspace (list ... ... ))) ``` does not translate into anything when checking `(eglot--capabilities (eglot-current-server))`. Other capabilities are listed but not the new one I've added. nor does `(eglot--server-capable :progress)` ;; returns nil `(eglot--server-capable :progressHandler)` ;; also nil next, the entry for `eglot-ignored-server-capabilities` defcustom. What should it be? something like: ``` (const :tag "Progress notifications" :progressProvider) ``` Any ideas what I'm doing wrong here? -- Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 21 13:04:43 2022 Received: (at submit) by debbugs.gnu.org; 21 Nov 2022 18:04:43 +0000 Received: from localhost ([127.0.0.1]:48769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxB9u-0007dE-RR for submit@debbugs.gnu.org; Mon, 21 Nov 2022 13:04:43 -0500 Received: from lists.gnu.org ([209.51.188.17]:34466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxB9s-0007d4-Pn for submit@debbugs.gnu.org; Mon, 21 Nov 2022 13:04:41 -0500 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 1oxB9j-0000Mp-2P for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:04:36 -0500 Received: from gproxy4-pub.mail.unifiedlayer.com ([69.89.23.142]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxB9f-0003On-07 for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:04:30 -0500 Received: from cmgw15.mail.unifiedlayer.com (unknown [10.0.90.130]) by progateway6.mail.pro1.eigbox.com (Postfix) with ESMTP id D95C81004653F for ; Mon, 21 Nov 2022 18:04:10 +0000 (UTC) Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id xB9OoRxf3jBmMxB9OoGETy; Mon, 21 Nov 2022 18:04:10 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=QMSt+iHL c=1 sm=1 tr=0 ts=637bbd9a a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=9xFQ1JgjjksA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=9i_RQKNPAAAA:8 a=Dy9dXtnXAAAA:8 a=LMXEDB98dIeFliOR3VoA:9 a=hqnlY9SSy_kA:10:uccc_2email_address a=Ev4oQ7kfJBNsvnoXShoW:22 a=7b_YKI4FLZevj963FIVU:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sUH7ZadpYh4kOnJaeF7bOpxROrYsjsBMc3e3HJZ1lUc=; b=I00cfnwfjE+hxioPTbyJVS5YOm 7+6MhhzY4+T/yAS6Bf8eZfSyvOm55DI974HH3L0JV1MM480Pp1k0eSkvalHKmv/FgZWArdzmtWYk6 PIHjjbu+3qusQEYpZUoc+xrQhUF4FWxRmnPr/EQ9cTOTfZAzWJGLQinHPIwTNIVpQXrlLQFptTlCP jqhF/eScAD94u1zyB+9Ms0Yvw7SgE1tG/avAh8r8B3fy+NxjU9dL3grTOdUfb/+lEZVjFJGwo4VX1 4MTKRpLve6Fl8ZfLdi69JQ032B/MoyfiLvq2xa8UzHN6E/Iku/RNSSJdSH3XKBgCCf46Bw2sOPfRU ZiesMUQg==; Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:49613 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oxB9O-001KiO-6z; Mon, 21 Nov 2022 11:04:10 -0700 From: Stephen Leake To: Danny Freeman Subject: Re: bug#59149: Feature Request: Report progress of long requests in Eglot In-Reply-To: <87k03qvmla.fsf@dfreeman.email> (Danny Freeman's message of "Sat, 19 Nov 2022 13:03:24 -0500") References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> Date: Mon, 21 Nov 2022 10:04:08 -0800 Message-ID: <86fseckwvb.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 135.180.197.170 X-Source-L: No X-Exim-ID: 1oxB9O-001KiO-6z X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:49613 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 3 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: pass client-ip=69.89.23.142; envelope-from=stephen_leake@stephe-leake.org; helo=gproxy4-pub.mail.unifiedlayer.com X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Danny Freeman writes: > Stephen Leake writes: > >> This works for my needs in ada-mode; + 1. > > Great to hear! > >> > Anyway, the way the user opts out of LSP configuration is via the user [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [135.180.197.170 listed in zen.spamhaus.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.51.188.17 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) X-Debbugs-Envelope-To: submit Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) Danny Freeman writes: > Stephen Leake writes: > >> This works for my needs in ada-mode; + 1. > > Great to hear! > >> > Anyway, the way the user opts out of LSP configuration is via the user >> > variable eglot-ignored-server-capabilities. So there should be some >> > point where you check the associated LSP capability of "progress >> > reporting" with eglot--server-capable. > > I'm trying to work on using the eglot-ignored-server-capabilities > functionality with this, and am having some trouble. What exactly is the > capability to ignore here? The LSP says progress report is part of the base protocol, not optional: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#progress > I believe this needs an entry somewhere in the > `eglot-client-capabilities` hierarchy. > > This: [2. application/emacs-lisp] ``` (cl-defgeneric eglot-client-capabilities (server) "What the Eglot LSP client supports for SERVER." (:method (s) (list :progress t ;; or maybe :$ (list :progress t) :workspace (list ... ... ))) ``` > > > > does not translate into anything when checking > `(eglot--capabilities (eglot-current-server))`. Other capabilities are > listed but not the new one I've added. Moving :progress into :workspace worked for me: :workspace (list :applyEdit t :executeCommand `(:dynamicRegistration :json-false) :workspaceEdit `(:documentChanges t) :didChangeWatchedFiles `(:dynamicRegistration ,(if (eglot--trampish-p s) :json-false t)) :symbol `(:dynamicRegistration :json-false) :configuration t :semanticTokens `(:refreshSupport :json-false) :workspaceFolders t :progress t) I have no idea why this works when yours does not. > nor does `(eglot--server-capable :progress)` ;; returns nil > `(eglot--server-capable :progressHandler)` ;; also nil > Note that this is checking the _server_ capabilities; since LSP does not define "projess" as a capability, no server will ever advertise that it is supported. So we can't use eglot-ignores-server-capabilities; we could maybe introduce eglot-ignored-client-capabilities. But we already have a mechanism for that; eglot-stay-out-of. So a user can do: (add-to-list 'eglot-stay-out-of 'progress) And in eglot-handle-notification ($/progress) we check for that: (unless (eglot--stay-out-of-p 'progress) ... There's probably a way to fold that check into the cl-defmethod dispatching parameters; I did not look into that. -- -- Stephe From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 13:46:03 2022 Received: (at 59149) by debbugs.gnu.org; 22 Nov 2022 18:46:03 +0000 Received: from localhost ([127.0.0.1]:52547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxYHT-0007T5-EP for submit@debbugs.gnu.org; Tue, 22 Nov 2022 13:46:03 -0500 Received: from gproxy4-pub.mail.unifiedlayer.com ([69.89.23.142]:36072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxYHR-0007SH-1I for 59149@debbugs.gnu.org; Tue, 22 Nov 2022 13:46:02 -0500 Received: from cmgw15.mail.unifiedlayer.com (unknown [10.0.90.130]) by progateway6.mail.pro1.eigbox.com (Postfix) with ESMTP id 2A04D100463DD for <59149@debbugs.gnu.org>; Tue, 22 Nov 2022 18:45:41 +0000 (UTC) Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id xYH6ojZ5PjBmMxYH6oXhIh; Tue, 22 Nov 2022 18:45:41 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=QMSt+iHL c=1 sm=1 tr=0 ts=637d18d5 a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=9xFQ1JgjjksA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=xYyB9bs0plAul7UG4poA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:To:From:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0UtmSZvoEMCAkLJTgJ+2ZbBlQDXP4Nm7+W8EUC9JGo0=; b=jCZcuDFNlcXD33ZeJefE2pYyIm ZgIqy+xtK1v5rJCT2hKfsD+2p2PH4DEY2gaanCZRRSfPNsocNr0nyd7XAs5mT79IW9c17EMfGiQ8W BLsHcAdObRdIqn46VbWZn2T20k6p4WJARiId0TpnRtC8shiAY6jg30W138MEna3CUWm8hcw4orbLY CZx4Ld2XLFfld2+kc8jpClTOahqLk7/r3aSE9Keo+zJDvEjMIGBgkBPDnSHvy56+i75rjnAZEJWCg o+m9djwLV0Btnitx3OMQIMPz/0aYAPIx5RxRsf51ohhuT6IXbQyywjAId66TXJQJOTFWXSdydCPJ6 btP2Umww==; Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:60579 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oxYH6-0017WO-Ih for 59149@debbugs.gnu.org; Tue, 22 Nov 2022 11:45:40 -0700 From: Stephen Leake To: 59149@debbugs.gnu.org Subject: Re: bug#59149: Feature Request: Report progress of long requests in Eglot In-Reply-To: <87k03qvmla.fsf@dfreeman.email> (Danny Freeman's message of "Sat, 19 Nov 2022 13:03:24 -0500") References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> Date: Tue, 22 Nov 2022 10:45:37 -0800 Message-ID: <865yf6ltf2.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 135.180.197.170 X-Source-L: No X-Exim-ID: 1oxYH6-0017WO-Ih X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:60579 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 1 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I just ran into the progress reporter in eglot--apply-text-edits; I'd like to turn that off, but leave other progress-reporters on. So we need something more fine-grained: (setq eglot-progress-reporter-disable '(apply-text-edits)) Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [135.180.197.170 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [69.89.23.142 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [69.89.23.142 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 59149 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I just ran into the progress reporter in eglot--apply-text-edits; I'd like to turn that off, but leave other progress-reporters on. So we need something more fine-grained: (setq eglot-progress-reporter-disable '(apply-text-edits)) Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [69.89.23.142 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [69.89.23.142 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [135.180.197.170 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager I just ran into the progress reporter in eglot--apply-text-edits; I'd like to turn that off, but leave other progress-reporters on. So we need something more fine-grained: (setq eglot-progress-reporter-disable '(apply-text-edits)) -- -- Stephe From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 09:39:58 2022 Received: (at submit) by debbugs.gnu.org; 23 Nov 2022 14:39:58 +0000 Received: from localhost ([127.0.0.1]:54273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxqur-0003Jy-HY for submit@debbugs.gnu.org; Wed, 23 Nov 2022 09:39:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:52304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxquo-0003Jq-N0 for submit@debbugs.gnu.org; Wed, 23 Nov 2022 09:39:55 -0500 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 1oxquo-0002l0-Gl for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 09:39:54 -0500 Received: from out2.migadu.com ([2001:41d0:2:aacc::]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxquf-00025k-Qe for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 09:39:48 -0500 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1669214382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4IafvPNRpVK05lQ898+nI+om/qkHPIvzJuBWBQc0kcU=; b=MSdEDZ9QiftQccekNCbyy/ZgG7wuN+ib4lECE07XQP0orgVeYG/IyJ5rNAxsuZOmVuqbSO FqfnihdXp7bJ/o/4lA+AW4xhiBpLh4f9TFL7r7rUsY2VvZhpvmndzPNGhk18YWTa+Yguob xW98vdX3gyLK+qqbCKO+NCx5R2SCvvA= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Stephen Leake Subject: Re: bug#59149: Feature Request: Report progress of long requests in Eglot Date: Wed, 23 Nov 2022 09:12:12 -0500 In-reply-to: <86fseckwvb.fsf@stephe-leake.org> Message-ID: <87tu2pohub.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=danny@dfreeman.email; helo=out2.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Stephen Leake writes: > Note that this is checking the _server_ capabilities; since LSP does not > define "projess" as a capability, no server will ever advertise that > it is supported. > > So we can't use eglot-ignores-server-capabilities; we could maybe > introduce eglot-ignored-client-capabilities. > > But we already have a mechanism for that; eglot-stay-out-of. > > So a user can do: > > (add-to-list 'eglot-stay-out-of 'progress) > > And in eglot-handle-notification ($/progress) we check for that: > > (unless (eglot--stay-out-of-p 'progress) Yeah, I think this will be the way to go as well. > There's probably a way to fold that check into the cl-defmethod > dispatching parameters; I did not look into that. If there is I do not know how to do it either. I think a boolean check in the body of the function is fine (and probably more clear). > I just ran into the progress reporter in eglot--apply-text-edits; I'd > like to turn that off, but leave other progress-reporters on. >=20 > So we need something more fine-grained: >=20 > (setq eglot-progress-reporter-disable '(apply-text-edits)) I believe that is a different progress reporter, unrelated to the one I would like to introduce. It is not a progress report that come from the lsp server, so I don't think it would be good to conflate them. If the user wants to ignore specific progress indicators from the lsp servers then they could implement an empty version of eglot-handle-notification that matches their progress token. ``` (cl-defmethod eglot-handle-notification (_server (_method (eql $/progress)) &key (token (eql "THE PROGRESS TOKEN"= )) _value)) ``` That would be more targeted. I also suspect it would be a pretty rare occurrence. I personally think the best way to decide on adding more configuration variables to eglot is to release this into the wild and see what kind of feedback we receive. Responding to Jo=C3=A3o from a couple of threads ago: > Thanks Danny, this doesn't look bad at all, though I have yet to > understand how it works. I can half-see why progress status should be a > server property, but it would be better if you provided an automated > test, or maybe just a step-by-step sequence diagram (which can be in > plain text and language) that clarifies this. An animated gif that > might also work. I think I can explain it with a sample of my server logs: The first thing that happens is the lsp server sends a progress BEGIN message, which indicates to the client that it is starting some long running process. ``` [server-notification] Wed Nov 23 08:55:22 2022: (:jsonrpc "2.0" :method "$/progress" :params (:token "clojure-lsp" :value (:kind "begin" :title "clojure-lsp" :percentage 0))) ``` Following that is a series of REPORT type progress messages. These indicate to the client that the work is ongoing. They might have a `percentage` key somewhere between 0 and 100 to show how the work is progressing. ``` [server-notification] Wed Nov 23 08:55:22 2022: (:jsonrpc "2.0" :method "$/progress" :params (:token "clojure-lsp" :value (:kind "report" :title "Finding kondo config" :percentage= 5))) [server-notification] Wed Nov 23 08:55:22 2022: (:jsonrpc "2.0" :method "$/progress" :params (:token "clojure-lsp" :value (:kind "report" :title "Finding cache" :percentage 10))) [server-notification] Wed Nov 23 08:55:22 2022: (:jsonrpc "2.0" :method "$/progress" :params (:token "clojure-lsp" :value (:kind "report" :title "Copying kondo configs" :percentag= e 15))) [server-notification] Wed Nov 23 08:55:22 2022: (:jsonrpc "2.0" :method "$/progress" :params (:token "clojure-lsp" :value (:kind "report" :title "Resolving config paths" :percenta= ge 15))) [server-notification] Wed Nov 23 08:55:22 2022: (:jsonrpc "2.0" :method "$/progress" :params (:token "clojure-lsp" :value (:kind "report" :title "Analyzing project files" :percent= age 20))) ... this goes on for a while [server-notification] Wed Nov 23 08:55:22 2022: (:jsonrpc "2.0" :method "$/progress" :params (:token "clojure-lsp" :value (:kind "report" :title "Analyzing project files" :percent= age 99))) ``` Finally, the server sends an END type progress message, indicating that the work is complete, and the client can stop showing the progress message. ``` [server-notification] Wed Nov 23 08:55:22 2022: (:jsonrpc "2.0" :method "$/progress" :params (:token "clojure-lsp" :value (:kind "end" :title "Project analyzed" :percentage 100))) ``` The result of this patch is a series of messages that display in the minibuffer: ``` [eglot:website] clojure-lsp:=20=20 [eglot:website] clojure-lsp: 5% Finding kondo config [eglot:website] clojure-lsp: 10% Finding cache [eglot:website] clojure-lsp: 15% Copying kondo configs [eglot:website] clojure-lsp: 20% Analyzing project files [eglot:website] clojure-lsp: 26% Analyzing project files [eglot:website] clojure-lsp: 33% Analyzing project files [eglot:website] clojure-lsp: 39% Analyzing project files [eglot:website] clojure-lsp: 46% Analyzing project files [eglot:website] clojure-lsp: 52% Analyzing project files [eglot:website] clojure-lsp: 59% Analyzing project files [eglot:website] clojure-lsp: 66% Analyzing project files [eglot:website] clojure-lsp: 72% Analyzing project files [eglot:website] clojure-lsp: 79% Analyzing project files [eglot:website] clojure-lsp: 85% Analyzing project files [eglot:website] clojure-lsp: 92% Analyzing project files [eglot:website] clojure-lsp: 99% Analyzing project files [eglot:website] clojure-lsp: done ``` Does that help? Attached is an updated patch that uses `eglot-stay-out-of` --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Eglot-Display-progress-notifications-in-minibuffer-a.patch Content-Description: progress reporter patch >From 54bc6b70c8a6da8853db1bcc45ca51796b98b6c2 Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Wed, 9 Nov 2022 08:46:45 -0500 Subject: [PATCH] Eglot: Display progress notifications in minibuffer as they arrive The LSP spec describes methods for reporting progress on long running jobs to the client: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#progress https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workDoneProgress This change reports those notifications in the minibuffer as they come in. It shows a percent indicator (if the server provides theme), or a spinner. This change should open the door for writing a "cancel long running request" command, which are identified by these progress notifications. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_workDoneProgress_cancel --- lisp/progmodes/eglot.el | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index e057b12e0e..3dc71b148c 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -821,6 +821,9 @@ eglot-lsp-server (project :documentation "Project associated with server." :accessor eglot--project) + (progress-reporter-alist + :documentation "Alist of (PROGRESS-TOKEN . PROGRESS-REPORTER)." + :accessor eglot--progress-reporter-alist) (inhibit-autoreconnect :initform t :documentation "Generalized boolean inhibiting auto-reconnection if true." @@ -2037,6 +2040,43 @@ eglot-handle-notification (_server (_method (eql telemetry/event)) &rest _any) "Handle notification telemetry/event.") ;; noop, use events buffer +(defun eglot--progress-report-message (title message) + "Format a $/progress report message, given a TITLE and/or MESSAGE string." + (cond + ((and title message) (format "%s %s" title message)) + (title title) + (message message))) + +(defun eglot--progress-reporter (server token) + "Get a prgress-reporter identified by the progress TOKEN from the SERVER ." + (cdr (assoc token (eglot--progress-reporter-alist server)))) + +(defun eglot--progress-reporter-delete (server token) + "Delete progress-reporters identified by the progress TOKEN from the SERVER." + (setf (eglot--progress-reporter-alist server) + (assoc-delete-all token (eglot--progress-reporter-alist server)))) + +(cl-defmethod eglot-handle-notification + (server (_method (eql $/progress)) &key token value) + "Handle a $/progress notification identified by TOKEN from the SERVER." + (unless (eglot--stay-out-of-p 'progress) + (cl-destructuring-bind (&key kind title percentage message) value + (pcase kind + ("begin" (let* ((prefix (format (concat "[eglot] %s %s:" (when percentage " ")) + (eglot-project-nickname server) token)) + (pr (if percentage + (make-progress-reporter prefix 0 100 percentage 1 0) + (make-progress-reporter prefix nil nil nil 1 0)))) + (eglot--progress-reporter-delete server token) + (setf (eglot--progress-reporter-alist server) + (cons (cons token pr) (eglot--progress-reporter-alist server))) + (progress-reporter-update pr percentage (eglot--progress-report-message title message)))) + ("report" (when-let ((pr (eglot--progress-reporter server token))) + (progress-reporter-update pr percentage (eglot--progress-report-message title message)))) + ("end" (when-let ((pr (eglot--progress-reporter server token))) + (progress-reporter-done pr) + (eglot--progress-reporter-delete server token))))))) + (cl-defmethod eglot-handle-notification (_server (_method (eql textDocument/publishDiagnostics)) &key uri diagnostics &allow-other-keys) ; FIXME: doesn't respect `eglot-strict-mode' -- 2.38.1 --=-=-= Content-Type: text/plain -- Danny Freeman --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 13:01:53 2022 Received: (at submit) by debbugs.gnu.org; 23 Nov 2022 18:01:53 +0000 Received: from localhost ([127.0.0.1]:56131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxu4H-000121-4q for submit@debbugs.gnu.org; Wed, 23 Nov 2022 13:01:53 -0500 Received: from lists.gnu.org ([209.51.188.17]:53744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxu4E-00011m-5N for submit@debbugs.gnu.org; Wed, 23 Nov 2022 13:01:51 -0500 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 1oxu4C-0002j6-Rz for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 13:01:49 -0500 Received: from gproxy3-pub.mail.unifiedlayer.com ([69.89.30.42]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxu49-0000LG-Rr for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 13:01:48 -0500 Received: from cmgw13.mail.unifiedlayer.com (unknown [10.0.90.128]) by progateway5.mail.pro1.eigbox.com (Postfix) with ESMTP id 5475D10045465 for ; Wed, 23 Nov 2022 18:01:31 +0000 (UTC) Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id xu3uoX5Kl0QBNxu3voaetK; Wed, 23 Nov 2022 18:01:31 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=DuqTREz+ c=1 sm=1 tr=0 ts=637e5ffb a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=9xFQ1JgjjksA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=9i_RQKNPAAAA:8 a=4kIBHYGHjJJhGVP9-v4A:9 a=hqnlY9SSy_kA:10:uccc_2email_address a=Ev4oQ7kfJBNsvnoXShoW:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Wm+5/MaqEqwN5n2d5V48pAQAPB8GYcWxkX39kwZx2DA=; b=IynkogwCgCzS8Atc9Gu+7ufEMg 9zk8k5jFhNvtptgxlK4p8YwQErE+D1LyuGxnRWotDkOnpY0qh5LDtpMwA/iQ/r00wbQGbxDH9N1hR HK4iON0ObEIXXf7ay70ao382/vwyb/dAsQNWHFwfFtBl5BiVroQWAWCZuklj7HkS+bsUKeYk++7yG lVVZlB3+Y4D6WytjMQYis0pW0YF2td2didHyAwe1fFJyE9zqO8DBR2hKt8ogOTzbACwt+PoEo0ReF DsFZIYtH3Os+/Unykmr2+0gF8FBGgh7k/MaI1jvFFvtYb+sVAI8LcTrhbRyksMhT+UpQUNCg2wJX3 OjbuiudA==; Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:64038 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oxu3u-001uxC-IL; Wed, 23 Nov 2022 11:01:30 -0700 From: Stephen Leake To: Danny Freeman Subject: Re: bug#59149: Feature Request: Report progress of long requests in Eglot In-Reply-To: <87tu2pohub.fsf@dfreeman.email> (Danny Freeman's message of "Wed, 23 Nov 2022 09:12:12 -0500") References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> Date: Wed, 23 Nov 2022 10:01:28 -0800 Message-ID: <86ilj5k0sn.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 135.180.197.170 X-Source-L: No X-Exim-ID: 1oxu3u-001uxC-IL X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:64038 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 3 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: pass client-ip=69.89.30.42; envelope-from=stephen_leake@stephe-leake.org; helo=gproxy3-pub.mail.unifiedlayer.com X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Danny Freeman writes: > Stephen Leake writes: > >> I just ran into the progress reporter in eglot--apply-text-edits; I'd >> like to turn that off, but leave other progress-reporters on. >> [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [135.180.197.170 listed in zen.spamhaus.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.51.188.17 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) X-Debbugs-Envelope-To: submit Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) Danny Freeman writes: > Stephen Leake writes: > >> I just ran into the progress reporter in eglot--apply-text-edits; I'd >> like to turn that off, but leave other progress-reporters on. >> >> So we need something more fine-grained: >> >> (setq eglot-progress-reporter-disable '(apply-text-edits)) > > I believe that is a different progress reporter, unrelated to the one I > would like to introduce. It is not a progress report that come from the > lsp server, so I don't think it would be good to conflate them. True, but how is the user to know where it comes from? We could provide something like: eglot-server-progress-reporter-disable eglot-client-progress-reporter-disable How does the user know which to set? They'll just set both, so there might as well be only one. > If the user wants to ignore specific progress indicators from the lsp > servers then they could implement an empty version of > eglot-handle-notification that matches their progress token. I guess that's a reasonable starting point, but it doesn't work for apply-text-edits. > The result of this patch is a series of messages that display in the > minibuffer: > > ``` > [eglot:website] clojure-lsp: > [eglot:website] clojure-lsp: 5% Finding kondo config ... And the user can still use the minibuffer for find-file etc; the messages are displayed to the right. Which can be confusing at first, but works nicely. -- -- Stephe From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 14:45:32 2022 Received: (at submit) by debbugs.gnu.org; 23 Nov 2022 19:45:32 +0000 Received: from localhost ([127.0.0.1]:56294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxvgZ-0005zi-Nc for submit@debbugs.gnu.org; Wed, 23 Nov 2022 14:45:32 -0500 Received: from lists.gnu.org ([209.51.188.17]:34270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxvgX-0005za-Ih for submit@debbugs.gnu.org; Wed, 23 Nov 2022 14:45:29 -0500 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 1oxvgV-00038M-3e for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 14:45:27 -0500 Received: from out2.migadu.com ([188.165.223.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxvgK-0001rQ-G9 for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 14:45:26 -0500 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1669232709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MG7NP7BpVXZ86sFpYLNqZoELGZMSpH34CJ/wC/4hkGI=; b=H7ctA22w182WsJwgsw/HPoT4ufGzO0uqNlWwBXGAF4ih1wVoc2gjI6v3hhG1/HAAavFW/J RqSFN7ueW8lNORDygaMty0vsDjdCesTHOIrR5RxLc0rrBuv530c6HMPFAIp/SJqEM+z8ri Hcx44HZOcFnMNBXBMlPY6ufLZeZwgDM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Stephen Leake Subject: Re: bug#59149: Feature Request: Report progress of long requests in Eglot Date: Wed, 23 Nov 2022 14:36:11 -0500 In-reply-to: <86ilj5k0sn.fsf@stephe-leake.org> Message-ID: <87wn7l316m.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=188.165.223.204; envelope-from=danny@dfreeman.email; helo=out2.migadu.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org, =?utf-8?B?Sm/Do28gVMOh?= =?utf-8?B?dm9yYQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Stephen Leake writes: >> I believe that is a different progress reporter, unrelated to the one I >> would like to introduce. It is not a progress report that come from the >> lsp server, so I don't think it would be good to conflate them. > > True, but how is the user to know where it comes from? We could provide > something like: > > eglot-server-progress-reporter-disable > eglot-client-progress-reporter-disable > > How does the user know which to set? They'll just set both, so there > might as well be only one. I see your point here. I'm not quite sure what the right thing to do is. Maybe it is a new "stay-out-of-progress" var. Maybe it we keep using "stay-out-of" and have one symbol for general "progress" notifications, and another distinct one for the "apply-text-edits-progress" one you don't like.=20 Probably should get Jo=C3=A3o's opinion on this, he would have some good ideas about this. P.S. I am copying him on this email, as I realize he wasn't on this branch of the email chain. Jo=C3=A3o, please see the previous emails in the thread for more context! Here is a link for convenience: https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-11/msg01619.html --=20 Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 14:55:28 2022 Received: (at submit) by debbugs.gnu.org; 23 Nov 2022 19:55:28 +0000 Received: from localhost ([127.0.0.1]:56321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxvqB-0006FS-K6 for submit@debbugs.gnu.org; Wed, 23 Nov 2022 14:55:27 -0500 Received: from lists.gnu.org ([209.51.188.17]:49378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxvq9-0006FF-8y for submit@debbugs.gnu.org; Wed, 23 Nov 2022 14:55:26 -0500 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 1oxvq8-0004ZH-Re for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 14:55:24 -0500 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxvq6-0004Tm-Sx for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 14:55:24 -0500 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-14263779059so21228090fac.1 for ; Wed, 23 Nov 2022 11:55:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=COF2U/aVkaDWos8/cLwM7bmtN5qluvKKTEGcvfaL2xE=; b=owmL6WlESvG4UTz4uw8IcphKMpg3KUXhzG3yWhQL4faZ//a+7HuEDJMd4jwULbibSM 0aRUGyNKBySCrezxbVrxSfqs82Fs8/s4NMys7TBmS38ekUWJXgBrhTXpHFRq5sgELB0D dI8Nr/YrQgV8x8zKFvuViYggBOvx9X0LYxaj5fSUT5b2NGOYqKFzjES5P4RAuaZOBSk8 SWVvCzb6oEDMITKTjZOrFQH9N5KjrOCVfYFIC1Zeg/xqtoakmHCysourkqHO8AVYypJP D8sfMuqmU6XlSBpYLPZ3/VSZiQCaHY5eeVKAw4oi617qvm3FicO1qQ3b3FtVln9cQGny RxRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=COF2U/aVkaDWos8/cLwM7bmtN5qluvKKTEGcvfaL2xE=; b=b0cBCALKJjLbDhv16VnZw2Q0TBRd0n9LyDGe9gviCF/0eSlNn2IwMgVJkP0fJT6UcM g2eAULwWf9QaR83QlfbPscOQEDrXnnnrpHwKU5shZgBBvOAaP7J7285HGf4h3PSENNvP jKtLgMKJhsdVkukG6jlBtulGQI8TVxIbcC+Kw5y9jlI3ZWIwY7mCF46z85SAPM+PuFQ+ cmCdyAXO/RYvmVq43ua5BRZtI5YjWwd4z6+pDNNNF3EwFr6EZdTq+wkYt+DscVUVC+bD Q/hzVECNLZGYPoLt9H1ZbgVu09Snk0EcXUgFPbm19aLzDSltlImZ+tgRev+5KNPo6kRi 05+A== X-Gm-Message-State: ANoB5pkLFdtIiHLO9syL4ohadMa+leRXEZlv/Xe+/XTbPnmViOYg6ug9 XnlRzB/BnXqIC64XEs6HWJ10A0e534kGhAxF+d/9hBOt12c= X-Google-Smtp-Source: AA0mqf5NnZLcbFcBa15RgGH56GZiBWT7j57tn8fY0ZlPLk7LB0aGKzMkoNeBWBi2XxSp4/LsSIf465iCb3ZYWS2JFhY= X-Received: by 2002:a05:6870:6688:b0:13b:5ffe:ff70 with SMTP id ge8-20020a056870668800b0013b5ffeff70mr18770723oab.171.1669233321006; Wed, 23 Nov 2022 11:55:21 -0800 (PST) MIME-Version: 1.0 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> In-Reply-To: <87wn7l316m.fsf@dfreeman.email> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 23 Nov 2022 19:56:27 +0000 Message-ID: Subject: Re: bug#59149: Feature Request: Report progress of long requests in Eglot To: Danny Freeman Content-Type: multipart/alternative; boundary="0000000000002559d105ee28ab3b" Received-SPF: pass client-ip=2001:4860:4864:20::29; envelope-from=joaotavora@gmail.com; helo=mail-oa1-x29.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org, Stephen Leake X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --0000000000002559d105ee28ab3b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 23, 2022 at 7:45 PM Danny Freeman wrote: > > > Stephen Leake writes: > > I am copying him on this email, as I realize he wasn't on this branch of > the email chain. Jo=C3=A3o, please see the previous emails in the thread = for > more context! Here is a link for convenience: > https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-11/msg01619.html Yep this is all news to me, but no problem, I just read through the chain. If, like Stephen says, $progress is part of the base protocol, then there's no capability associated indeed, but I think we should just make up one like `:$progress`, and use change eglot--server-capable-p to be able to respond unequivocally 't' to those special built in capabilities, but only after checking if they're not in the eglot-ignored-server-capabilities list. I think this is more consistent with the other kinds of feature checks we have elsewhere. Jo=C3=A3o --0000000000002559d105ee28ab3b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Nov 23, 2022 at 7:45 PM Danny Freeman <danny@df= reeman.email> wrote:
>
>
> Stephen Leake <stephen_leake@stephe-leake.org> writes:
>
> I am copying him on this email, as I realize= he wasn't on this branch of
> the email chain. Jo=C3=A3o, please= see the previous emails in the thread for
> more context! Here is a = link for convenience:
>
https://lists.gnu.org/archive/html/bu= g-gnu-emacs/2022-11/msg01619.html

Yep this is all news to me, bu= t no problem, I just read through the chain.

If, like Stephen says, = $progress is part of the base protocol, then there's
no capability a= ssociated indeed, but I think we should just make up one
like `:$progres= s`, and use change eglot--server-capable-p to be able
to respond unequiv= ocally 't' to those special built in capabilities, but
only afte= r checking if they're not in the eglot-ignored-server-capabilities
l= ist.

I think this is more consistent with the other kinds of feature= checks we
have elsewhere.

Jo=C3=A3o
--0000000000002559d105ee28ab3b-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 24 06:06:25 2022 Received: (at submit) by debbugs.gnu.org; 24 Nov 2022 11:06:25 +0000 Received: from localhost ([127.0.0.1]:57496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyA3l-0007Ky-7G for submit@debbugs.gnu.org; Thu, 24 Nov 2022 06:06:25 -0500 Received: from lists.gnu.org ([209.51.188.17]:54920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyA3h-0007Ko-9o for submit@debbugs.gnu.org; Thu, 24 Nov 2022 06:06:23 -0500 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 1oyA3g-0008ID-Ve for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 06:06:21 -0500 Received: from outbound-ss-820.bluehost.com ([69.89.24.241]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyA3e-0006uE-J8 for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 06:06:20 -0500 Received: from cmgw15.mail.unifiedlayer.com (unknown [10.0.90.130]) by progateway2.mail.pro1.eigbox.com (Postfix) with ESMTP id 4713D100490F5 for ; Thu, 24 Nov 2022 11:06:05 +0000 (UTC) Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id yA3RosrgbjGBLyA3RoYt6s; Thu, 24 Nov 2022 11:06:05 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=WePJ12tX c=1 sm=1 tr=0 ts=637f501d a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=9xFQ1JgjjksA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=pGLkceISAAAA:8 a=9i_RQKNPAAAA:8 a=mDV3o1hIAAAA:8 a=-DT5V8tOZ-5R5dM_jc8A:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=hqnlY9SSy_kA:10:uccc_2email_address a=rBogvggfiPsA:10:demote_hacked_domain_1 a=Ev4oQ7kfJBNsvnoXShoW:22 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=T/UAFkSw1Clo3RuySrGC8eRBYCE6B8wPWjkS68OT5DQ=; b=ioQSZQ8J762qcsduSNrQKqV1T9 73FdlNFTRCSVXWUtRgXNQvG4FLTJX9ahT02qFtqNN4kxStQIG5bJxqSONFB2QKCLTo/tuRv0khH8j znaDwhZMTi7wKDegKUbPy5kBUgwFyje+EYYEJixtKHzyZcsOKPRVaMaE+2764DbfZ9phnAmTVRikn CViJz7Tb9vNhAF1P8AM9ax2MsGxye8Z8HqpJ+u4/Xkn4K4z5l7pADFWbP3mf3zCUOsSi8LyJscPkj Aa9rxCJAlR23tQba7Jf0JX7COJpP69tNED9/jiX6ILCxMnmWMzRT32UoToeyTKy8y86DldT332HWh GPE9BfZQ==; Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:57788 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oyA3Q-004A6N-Kf; Thu, 24 Nov 2022 04:06:04 -0700 From: Stephen Leake To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Wed, 23 Nov 2022 19:56:27 +0000") References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> Date: Thu, 24 Nov 2022 03:06:01 -0800 Message-ID: <86edtsk3xi.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 135.180.197.170 X-Source-L: No X-Exim-ID: 1oyA3Q-004A6N-Kf X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:57788 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 4 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: pass client-ip=69.89.24.241; envelope-from=stephen_leake@stephe-leake.org; helo=outbound-ss-820.bluehost.com X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: João Távora writes: > On Wed, Nov 23, 2022 at 7:45 PM Danny Freeman wrote: >> >> >> Stephen Leake writes: >> >> I am copying him on this email, as I realize he wasn [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.51.188.17 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [135.180.197.170 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) X-Debbugs-Envelope-To: submit Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org, Danny Freeman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) Jo=C3=A3o T=C3=A1vora writes: > On Wed, Nov 23, 2022 at 7:45 PM Danny Freeman wrot= e: >> >> >> Stephen Leake writes: >> >> I am copying him on this email, as I realize he wasn't on this branch of >> the email chain. Jo=C3=A3o, please see the previous emails in the thread= for >> more context! Here is a link for convenience: >> https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-11/msg01619.html > > Yep this is all news to me, but no problem, I just read through the chain. > > If, like Stephen says, $progress is part of the base protocol, then there= 's > no capability associated indeed, but I think we should just make up one > like `:$progress`, and use change eglot--server-capable-p to be able > to respond unequivocally 't' to those special built in capabilities, but > only after checking if they're not in the eglot-ignored-server-capabiliti= es > list. One way to do that is to simply add (:$progresss t) in eglot--connect where eglot--capabilities is set. But apply-text-edits creates a progress reporter that is not driven by messages from the lsp server; it's just processing a local list of edits. And I would like to be able to turn that off, but keep (at least some of) the lsp progress messages. LSP capabilities handle this by adding items in categories, so we could add (:$progress (:apply-edit t)) to eglot--capabilities, and then I could add :apply-edit to eglot-ignored-server-capabilities. We'd have to do the same for any other progress message somebody wants to turn off. Except that would also turn off apply-edit itself, not just the progress messages for it; it seems we need to allow eglot-ignored-server-capabilities to contain (:$progress :apply-edit). Or use :apply-edit-progress instead. --=20 -- Stephe From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 24 09:15:11 2022 Received: (at submit) by debbugs.gnu.org; 24 Nov 2022 14:15:11 +0000 Received: from localhost ([127.0.0.1]:57772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyD0R-00060m-44 for submit@debbugs.gnu.org; Thu, 24 Nov 2022 09:15:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:44430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyD0O-00060V-1J for submit@debbugs.gnu.org; Thu, 24 Nov 2022 09:15:10 -0500 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 1oyD0N-0000X0-Ra for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 09:15:07 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyD0L-00060r-NX for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 09:15:07 -0500 Received: by mail-wr1-x42f.google.com with SMTP id g12so2634122wrs.10 for ; Thu, 24 Nov 2022 06:15:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+Vc4gycU16jeMoKRqlKXHoBluA7lhkKyt5FtZpFjFSI=; b=dt/kUOsWhgl3Eduzt9I0Wzvj426drNbIOnOsQOJd09HuVpRuhtJghcA7byZu9YmbIf ubwe5P4mbc3efpKceD9ZgoM0IgX+1nrbKDRjob2NVRziBxfkmizfl19ZfBmBd5ZUY0Au uwlQd5PFElaiSEMTJFsmqZwopkML6FxQzo0Ha/ojkBnoe6XpQnUZ+jjquBLeWP9Dg7eM lmgLPwdMwAYDqZIrbCuNVeFY/WYsmWrQhvPMEuhyCpns7jJHDYdpNuag7sEiXMQvt7XC AcNBflZWu4TWqfToRa8TAokt1FFVrxK5gwKd9jZNczW8NHQxqFwwZRle50Cj3aBDkFRM dmaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+Vc4gycU16jeMoKRqlKXHoBluA7lhkKyt5FtZpFjFSI=; b=ElKN1Z5eHZ3iNSjCJCHanAARURBGm+eQTBfljjwP7ph40mX6Z6ynXNiz9PggvVh6X0 bIElrjXVzznB5E9Z9gvly2GYFR+TFXJdeARoHQvisr/+CCNlAFztxiYQS/aHS35OFv+E dh9K/ueJB3pYUE0IHv9grHkXKYzlvebwyRFm6ZofjSmvFLx1v47TbRt5UjF6g75AJe/d GaLUDE9OxkP9lJKNY/lhRxqfL/SBNvDsvGW3eUm6ZC25mWtDhBijWTMhJkGR6UjaSKFX 9Nbi/M6TTgT/plkgLFYaVQabOjQIPcdN46XvkANS03CcpB6dxAgu0rungsyWiBAJtMq0 5ztA== X-Gm-Message-State: ANoB5pkBOjJaXZ0w3iTy+PwSf8tXXJiu2LHZjkIcbRDlewv949JMlRHt 7242SM30SdyUh14k31EPtM2+hlUofPntAQ== X-Google-Smtp-Source: AA0mqf6d23iu3Dwpq71k+25xmBN9AOK/FQLd0A9Zy65UgGdKEbN955SJObQmcCe2BIuLpEniS47k6g== X-Received: by 2002:a5d:46c2:0:b0:242:145:3b7a with SMTP id g2-20020a5d46c2000000b0024201453b7amr1041350wrs.331.1669299303803; Thu, 24 Nov 2022 06:15:03 -0800 (PST) Received: from krug ([87.196.72.177]) by smtp.gmail.com with ESMTPSA id p1-20020a1c5441000000b003b4cba4ef71sm5637709wmi.41.2022.11.24.06.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 06:15:03 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Stephen Leake Subject: Re: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot In-Reply-To: <86edtsk3xi.fsf@stephe-leake.org> (Stephen Leake's message of "Thu, 24 Nov 2022 03:06:01 -0800") References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> Date: Thu, 24 Nov 2022 14:16:18 +0000 Message-ID: <87o7swv3nx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x42f.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org, Danny Freeman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Stephen Leake writes: > Jo=C3=A3o T=C3=A1vora writes: > >> On Wed, Nov 23, 2022 at 7:45 PM Danny Freeman wro= te: >>> >>> >>> Stephen Leake writes: >>> >>> I am copying him on this email, as I realize he wasn't on this branch of >>> the email chain. Jo=C3=A3o, please see the previous emails in the threa= d for >>> more context! Here is a link for convenience: >>> https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-11/msg01619.html >> >> Yep this is all news to me, but no problem, I just read through the chai= n. >> >> If, like Stephen says, $progress is part of the base protocol, then ther= e's >> no capability associated indeed, but I think we should just make up one >> like `:$progress`, and use change eglot--server-capable-p to be able >> to respond unequivocally 't' to those special built in capabilities, but >> only after checking if they're not in the eglot-ignored-server-capabilit= ies >> list. > > One way to do that is to simply add (:$progresss t) in eglot--connect > where eglot--capabilities is set. Yes that would probably do it as an implementation trick. > But apply-text-edits creates a progress reporter that is not driven by > messages from the lsp server; it's just processing a local list of > edits. And I would like to be able to turn that off, but keep (at least > some of) the lsp progress messages. > > LSP capabilities handle this by adding items in categories, so we could > add (:$progress (:apply-edit t)) to eglot--capabilities, and then I > could add :apply-edit to eglot-ignored-server-capabilities. We'd have to > do the same for any other progress message somebody wants to turn off. > > Except that would also turn off apply-edit itself, not just the progress > messages for it; it seems we need to allow > eglot-ignored-server-capabilities to contain (:$progress :apply-edit). > Or use :apply-edit-progress instead. At this point, I'm not sure the eglot-ignored-server-capabilities is the right tool for the job. In fact, even my original suggestion is a bit sketchy, because it is creating these pseudo-capabilities that don't really exist. Abusing it even further is probably not good. So, here three possible things we can do: 1. Get rid of the :apply-edit progress reporter entirely. To be honest, I don't think it's doing much. We could just as well have a call to message there, or nothing at all. 2. Do my original "sketchy" suggestion, where :$progress is considered a built-in ignorable capability (and checked with eglot--server-capable in the new code that Danny is proposing). Stephen's eglot-connect trick is an acceptable technique. 3. Add a boolean user varible eglot-report-progress. I don't like to add user variables unless they represent things directly related to the fundamental LSP logic, and not its customization or evolution. Since this seems to be of those fundamental things, I think it's acceptable. The alternatives are: a: 1+2 b: 1+3 c: 2 d: 3 Stephen, you request to shoosh that particular apply-edits progress reporter is another separate request, we shouldn't let it block Danny's effort to support $progress messages. So I think we should do either 'c' or 'd' for now, and we can always address your request later. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 24 16:26:27 2022 Received: (at submit) by debbugs.gnu.org; 24 Nov 2022 21:26:27 +0000 Received: from localhost ([127.0.0.1]:60428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyJjn-0008CU-6Z for submit@debbugs.gnu.org; Thu, 24 Nov 2022 16:26:27 -0500 Received: from lists.gnu.org ([209.51.188.17]:40718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyJjg-0008C8-Oc for submit@debbugs.gnu.org; Thu, 24 Nov 2022 16:26:21 -0500 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 1oyJjg-0005xX-Jn for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 16:26:20 -0500 Received: from gproxy4-pub.mail.unifiedlayer.com ([69.89.23.142]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyJje-0000wt-Jc for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 16:26:20 -0500 Received: from cmgw12.mail.unifiedlayer.com (unknown [10.0.90.127]) by progateway6.mail.pro1.eigbox.com (Postfix) with ESMTP id 6717F10049312 for ; Thu, 24 Nov 2022 21:26:01 +0000 (UTC) Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id yJjIoLgnwmSzkyJjIofamz; Thu, 24 Nov 2022 21:26:01 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=PKDKRdmC c=1 sm=1 tr=0 ts=637fe169 a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=9xFQ1JgjjksA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=pGLkceISAAAA:8 a=9i_RQKNPAAAA:8 a=AsM5nZkiPfba1MwH8ecA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=hqnlY9SSy_kA:10:uccc_2email_address a=6nYNOB5prDIA:10:uccc_2email_address a=hTmfk0G8CIYA:10:hookup_email_user_1 a=6dtDWsVvRhGLEA8dw3uH:22 a=Ev4oQ7kfJBNsvnoXShoW:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mdKS1/AfT9FyzZfZh2dC/97WSu2O0rN4ZlQuzW7/S80=; b=KWARqbUx6u/NBAUUwhOtoJrroe d40bmc5q9La/8GA082c8xZWuEZwpXRkvjNcwUyM8lDFwszMgXJfGxqgTbcTQwWnPnLQR/+r/gkHF9 mR6mZNZq1LTL9c2r4FqDypH0YIyP5EUnji5IkYd5juvirDXKaIKn0muj56EaGPhrFgbjdWu5wlYFO htEIVyBzy/Llc9lqcuYJjWWpPsEWiDk4K/WqrmRdM4gAyjHftlMVgwGG08jEP1OQbcCJQcTtoCH9i NBxu+9zo6tvsVe3jG0qIoJ99tFjBR5sTHYJ37/OX/n48d+oN06Z1bB/go1zq7+SAKeS0CiWVB2BG8 kXOaAKNQ==; Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:63437 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oyJjI-0014DH-Dm; Thu, 24 Nov 2022 14:25:56 -0700 From: Stephen Leake To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot In-Reply-To: <87o7swv3nx.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Thu, 24 Nov 2022 14:16:18 +0000") References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> Date: Thu, 24 Nov 2022 13:25:53 -0800 Message-ID: <8635a8jb8e.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 135.180.197.170 X-Source-L: No X-Exim-ID: 1oyJjI-0014DH-Dm X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:63437 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 4 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: pass client-ip=69.89.23.142; envelope-from=stephen_leake@stephe-leake.org; helo=gproxy4-pub.mail.unifiedlayer.com X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: João Távora writes: > Stephen Leake writes: > >> João Távora writes: >> > 1. Get rid of the :apply-edit progress reporter entirely. To be honest, > I don't think [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [135.180.197.170 listed in zen.spamhaus.org] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.51.188.17 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) X-Debbugs-Envelope-To: submit Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org, Danny Freeman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) Jo=C3=A3o T=C3=A1vora writes: > Stephen Leake writes: > >> Jo=C3=A3o T=C3=A1vora writes: >> > 1. Get rid of the :apply-edit progress reporter entirely. To be honest, > I don't think it's doing much. We could just as well have a call to > message there, or nothing at all. It might be worth keeping a "debug message" there, gated by a new variable eglot--debug (boolean or integer). So we can turn on messages when we need to debug something. Or just keep it commented out; it's easy enough to run eval-defun after uncommenting. > 2. Do my original "sketchy" suggestion, where :$progress is considered a > built-in ignorable capability (and checked with eglot--server-capable > in the new code that Danny is proposing). Stephen's eglot-connect > trick is an acceptable technique. > > 3. Add a boolean user varible eglot-report-progress. I don't like to > add user variables unless they represent things directly related to > the fundamental LSP logic, and not its customization or evolution. > Since this seems to be of those fundamental things, I think it's > acceptable. > > The alternatives are: > > a: 1+2 > b: 1+3 > c: 2 > d: 3 > > Stephen, you request to shoosh that particular apply-edits progress > reporter is another separate request, we shouldn't let it block Danny's > effort to support $progress messages.=20=20 > So I think we should do either 'c' or 'd' for now, and we can always > address your request later. Ok. Since that rules out b, I vote for d. =20 --=20 -- Stephe From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 11:10:54 2022 Received: (at submit) by debbugs.gnu.org; 25 Nov 2022 16:10:54 +0000 Received: from localhost ([127.0.0.1]:36984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oybHy-0006EM-AF for submit@debbugs.gnu.org; Fri, 25 Nov 2022 11:10:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:44696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oybHu-0006E7-I0 for submit@debbugs.gnu.org; Fri, 25 Nov 2022 11:10:52 -0500 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 1oybHu-0001kv-Cm for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 11:10:50 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oybHs-0000N5-Sk for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 11:10:50 -0500 Received: by mail-wm1-x330.google.com with SMTP id o7-20020a05600c510700b003cffc0b3374so3756753wms.0 for ; Fri, 25 Nov 2022 08:10:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=rtLvx+pS8GZTCVrNmJ0m/pR6kfX3+H4ssJg2Sww/ADA=; b=iw5P1qLwz6+8PIzltEUHHlCmk8Gf3LhyRcXNHz+leXmZq0aN+LD6lj5yFZ63m5FMt7 A3Ylcv/W9W/rgLiMXMQwf2HiV+q7hh+H+DOBmMZ0QutUnHADLBNObiWGQyjtbdmFR9C2 vhIdn/gs8kAPBpnc3OK6qPkWWu7U+r+rU4oZyxww8m0sr5qw6fZldBlLJfrmylmCf/i0 T9w9nljCt6YNd1Y+UV/Fh7vq+TdlSWlJ/fy9Ev/eCxdzbvffL2+wiSwwzydGaAsGKm7D jLgUn+lqHvGTSr7MZZVmIi7BgtawVLEt9SgFrvbXuHx6FmylB1nePZnGAHZByZkhbgfx K9CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rtLvx+pS8GZTCVrNmJ0m/pR6kfX3+H4ssJg2Sww/ADA=; b=CnEbTvoGjysboeJKjIn5UkkFG3FcgnCmFarUxtPFc/zW20vBI9JK8N0BqFsoFz44Rp iveOQ0ETp+m80bnkSX74NuvGp5/1+gIQdoAg4h2SSG9wRwc8QOlALbmHppoRhuUvr8a/ 9WbrOHaYZrNuHuGkGUbtPMyc5ZnE+spKmHxx/prM51riL+XC6DMeb+52iVH0x+TL7Zav Buvk2sv0MU80CJ6hlOTTKLPeefA+BlMVeELfiyjHsrOHrek8yhiPdHPLVqo0hZJvCPHT U8eh3Qns/rfBIQ0YsgQ3RRGDKlzhqTStwdDlRshSTT/w5LJ8p1rwVbmT+wreobn4bPkE 2MXw== X-Gm-Message-State: ANoB5pmz3baqHZ6FOs3vbEDfnI6FBJdta616zE1SQyEQPZwJ7kWVu7f9 9BVKHS+j+zsA57MRGTJPX6I8pKnx7KY= X-Google-Smtp-Source: AA0mqf4BovL/6Qd93EFPg155QiRPs9ss4TJ/RJ7a0p1GLLvf7x9Rr29XQPwdekJDhg60Pa8B9e2JFQ== X-Received: by 2002:a05:600c:35c8:b0:3cf:cf89:2f02 with SMTP id r8-20020a05600c35c800b003cfcf892f02mr17883274wmq.2.1669392647030; Fri, 25 Nov 2022 08:10:47 -0800 (PST) Received: from krug ([87.196.72.177]) by smtp.gmail.com with ESMTPSA id he6-20020a05600c540600b003cf4ec90938sm5547372wmb.21.2022.11.25.08.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 08:10:46 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Stephen Leake Subject: Re: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot In-Reply-To: <8635a8jb8e.fsf@stephe-leake.org> (Stephen Leake's message of "Thu, 24 Nov 2022 13:25:53 -0800") References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> Date: Fri, 25 Nov 2022 16:11:58 +0000 Message-ID: <87edtrui7l.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x330.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org, Danny Freeman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Stephen Leake writes: > Or just keep it commented out; it's easy enough to run eval-defun after > uncommenting. Both approaches make sense. >> So I think we should do either 'c' or 'd' for now, and we can always >> address your request later. > > Ok. Since that rules out b, I vote for d. OK. Let's have Danny's opinion on it, especially on the name 'eglot-report-progress'. In the simplest case, this variable is a boolean, but I am curious if other types of progress reporting can be envisioned. If they are, they should be controlled by the least amount of user variables possible. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 11:19:27 2022 Received: (at submit) by debbugs.gnu.org; 25 Nov 2022 16:19:27 +0000 Received: from localhost ([127.0.0.1]:37010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oybQE-0006RK-GK for submit@debbugs.gnu.org; Fri, 25 Nov 2022 11:19:27 -0500 Received: from lists.gnu.org ([209.51.188.17]:54120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oybQC-0006RC-Oc for submit@debbugs.gnu.org; Fri, 25 Nov 2022 11:19:25 -0500 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 1oybQB-000652-2F for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 11:19:23 -0500 Received: from out-51.mta0.migadu.com ([91.218.175.51]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oybQ8-0004ZC-9e for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2022 11:19:22 -0500 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1669393154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uEXBL/qFIDwmhECJgbQImS8R21oGHcriyEyMg7PxzHg=; b=IEcxwGNheaTa096m5mmpwdbHeG8/Q9fM2pFtnCyeApWo0xCSSobOxHcMDI3OMiyl0DNqGB iqxAWdt65VPrc7qx36Hxgtdkak0N/CB4qiG08BVY9OISnQ7/UcaA26FIOHdwEvXehfllOS 6J+mjVffZdO+KfVbLDlCOSSsfibCerw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Stephen Leake Subject: Re: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot Date: Fri, 25 Nov 2022 11:15:33 -0500 In-reply-to: <8635a8jb8e.fsf@stephe-leake.org> Message-ID: <87r0xrxb0i.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=91.218.175.51; envelope-from=danny@dfreeman.email; helo=out-51.mta0.migadu.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Stephen Leake writes: > Jo=C3=A3o T=C3=A1vora writes: > >> 1. Get rid of the :apply-edit progress reporter entirely. To be honest, >> I don't think it's doing much. We could just as well have a call to >> message there, or nothing at all. >> 2. Do my original "sketchy" suggestion, where :$progress is considered a >> built-in ignorable capability (and checked with eglot--server-capable >> in the new code that Danny is proposing). Stephen's eglot-connect >> trick is an acceptable technique. >> >> 3. Add a boolean user varible eglot-report-progress. I don't like to >> add user variables unless they represent things directly related to >> the fundamental LSP logic, and not its customization or evolution. >> Since this seems to be of those fundamental things, I think it's >> acceptable. >> >> The alternatives are: >> >> a: 1+2 >> b: 1+3 >> c: 2 >> d: 3 >> >> Stephen, you request to shoosh that particular apply-edits progress >> reporter is another separate request, we shouldn't let it block Danny's >> effort to support $progress messages.=20=20 >> So I think we should do either 'c' or 'd' for now, and we can always >> address your request later. > > Ok. Since that rules out b, I vote for d. I am more partial to option d as well. From a user's perspective it seems more straight forward than having to figure out the pseudo server capability. I've attached an updated patch --=20 Danny Freeman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Eglot-Display-progress-notifications-in-minibuffer-a.patch Content-Description: eglot progress report patch >From 2787503eda061f934eebd23e7ee661d3f5ea547d Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Wed, 9 Nov 2022 08:46:45 -0500 Subject: [PATCH] Eglot: Display progress notifications in minibuffer as they arrive * lisp/progmodes/eglot.el (eglot-report-progress): New custom variable. (eglot-lsp-server): New slot for tracking active progress reporters. (eglot-handle-notification): New impl for $/progress server responses. (eglot--format-markup): replace tab with spaces. (eglot--TextDocumentItem): replace tab with spaces. The LSP spec describes methods for reporting progress on long running jobs to the client: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#progress https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workDoneProgress This change reports those notifications in the minibuffer as they come in. It shows a percent indicator (if the server provides theme), or a spinner. This change should open the door for writing a "cancel long running request" command, which are identified by these progress notifications. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_workDoneProgress_cancel --- lisp/progmodes/eglot.el | 48 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index a0fb253e10..f01e6542af 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -386,6 +386,10 @@ eglot-menu-string "String displayed in mode line when Eglot is active." :type 'string) +(defcustom eglot-report-progress t + "If non-nil, show progress of long running server work in the minibuffer." + :type 'boolean) + (defvar eglot-withhold-process-id nil "If non-nil, Eglot will not send the Emacs process id to the language server. This can be useful when using docker to run a language server.") @@ -831,6 +835,9 @@ eglot-lsp-server (project :documentation "Project associated with server." :accessor eglot--project) + (progress-reporter-alist + :documentation "Alist of (PROGRESS-TOKEN . PROGRESS-REPORTER)." + :accessor eglot--progress-reporter-alist) (inhibit-autoreconnect :initform t :documentation "Generalized boolean inhibiting auto-reconnection if true." @@ -1569,7 +1576,7 @@ eglot--format-markup (setq-local markdown-fontify-code-blocks-natively t) (insert string) (let ((inhibit-message t) - (message-log-max nil)) + (message-log-max nil)) (ignore-errors (delay-mode-hooks (funcall mode)))) (font-lock-ensure) (string-trim (buffer-string))))) @@ -2049,6 +2056,43 @@ eglot-handle-notification (_server (_method (eql telemetry/event)) &rest _any) "Handle notification telemetry/event.") ;; noop, use events buffer +(defun eglot--progress-report-message (title message) + "Format a $/progress report message, given a TITLE and/or MESSAGE string." + (cond + ((and title message) (format "%s %s" title message)) + (title title) + (message message))) + +(defun eglot--progress-reporter (server token) + "Get a prgress-reporter identified by the progress TOKEN from the SERVER ." + (cdr (assoc token (eglot--progress-reporter-alist server)))) + +(defun eglot--progress-reporter-delete (server token) + "Delete progress-reporters identified by the progress TOKEN from the SERVER." + (setf (eglot--progress-reporter-alist server) + (assoc-delete-all token (eglot--progress-reporter-alist server)))) + +(cl-defmethod eglot-handle-notification + (server (_method (eql $/progress)) &key token value) + "Handle a $/progress notification identified by TOKEN from the SERVER." + (when eglot-report-progress + (cl-destructuring-bind (&key kind title percentage message) value + (pcase kind + ("begin" (let* ((prefix (format (concat "[eglot] %s %s:" (when percentage " ")) + (eglot-project-nickname server) token)) + (pr (if percentage + (make-progress-reporter prefix 0 100 percentage 1 0) + (make-progress-reporter prefix nil nil nil 1 0)))) + (eglot--progress-reporter-delete server token) + (setf (eglot--progress-reporter-alist server) + (cons (cons token pr) (eglot--progress-reporter-alist server))) + (progress-reporter-update pr percentage (eglot--progress-report-message title message)))) + ("report" (when-let ((pr (eglot--progress-reporter server token))) + (progress-reporter-update pr percentage (eglot--progress-report-message title message)))) + ("end" (when-let ((pr (eglot--progress-reporter server token))) + (progress-reporter-done pr) + (eglot--progress-reporter-delete server token))))))) + (cl-defmethod eglot-handle-notification (_server (_method (eql textDocument/publishDiagnostics)) &key uri diagnostics &allow-other-keys) ; FIXME: doesn't respect `eglot-strict-mode' @@ -2172,7 +2216,7 @@ eglot--TextDocumentItem (append (eglot--VersionedTextDocumentIdentifier) (list :languageId - (eglot--language-id (eglot--current-server-or-lose)) + (eglot--language-id (eglot--current-server-or-lose)) :text (eglot--widening (buffer-substring-no-properties (point-min) (point-max)))))) -- 2.38.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 11:31:47 2022 Received: (at 59149) by debbugs.gnu.org; 25 Nov 2022 16:31:47 +0000 Received: from localhost ([127.0.0.1]:37027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oybcA-0006kx-Sr for submit@debbugs.gnu.org; Fri, 25 Nov 2022 11:31:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oybc7-0006kg-Gj for 59149@debbugs.gnu.org; Fri, 25 Nov 2022 11:31:45 -0500 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 1oybbz-0007el-LO; Fri, 25 Nov 2022 11:31:35 -0500 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=tjTsMQczQljg859F5wbcO1YazlYvx8Urbmt1H4TZHs0=; b=iXTeX79TKMkT iBIEYcB8OPMaG/RNuBUDXy36QKFFutyi0q3wjNUsRco2+jQwxrZ8d7qKsX4erCyUaIkbVp3SvtcRf R50Wpm93yYye2ExnKcX3jsdeXW+9DPkBOlkijWV4+9IyNN0FvdfCNuSvRt7KjLCZLAAz/OqclMW9c MwGPj591d3KNAwQTbC/89dYLyNNJeXVvv2cSahNmgU4rBUT4Se49jYRIywVGnzfXMf8gHKP+S6Hfx KXufGhZg1RysqXNOSc2ElCSO1eOwfKMtflq2GXus2kI4UeM5BN6bxxPFdnoJVqkuci7PEoovuho2R dpTZ4KY9oGa3/OQ34f7oag==; 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 1oybbw-0004Il-84; Fri, 25 Nov 2022 11:31:35 -0500 Date: Fri, 25 Nov 2022 18:31:53 +0200 Message-Id: <834junuhae.fsf@gnu.org> From: Eli Zaretskii To: Danny Freeman In-Reply-To: <87r0xrxb0i.fsf@dfreeman.email> (bug-gnu-emacs@gnu.org) Subject: Re: bug#59149: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> <87r0xrxb0i.fsf@dfreeman.email> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59149 Cc: 59149@debbugs.gnu.org, stephen_leake@stephe-leake.org, joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 59149@debbugs.gnu.org, joaotavora@gmail.com > Date: Fri, 25 Nov 2022 11:15:33 -0500 > From: Danny Freeman via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > +(defcustom eglot-report-progress t > + "If non-nil, show progress of long running server work in the minibuffer." > + :type 'boolean) Please add a :version tag. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 11:43:22 2022 Received: (at 59149) by debbugs.gnu.org; 25 Nov 2022 16:43:22 +0000 Received: from localhost ([127.0.0.1]:37031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oybnO-000716-4l for submit@debbugs.gnu.org; Fri, 25 Nov 2022 11:43:22 -0500 Received: from out-74.mta0.migadu.com ([91.218.175.74]:25281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oybnK-00070w-5o for 59149@debbugs.gnu.org; Fri, 25 Nov 2022 11:43:20 -0500 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> <87r0xrxb0i.fsf@dfreeman.email> <834junuhae.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1669394596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UgR0p56vUTXUDUNDkIA0594f9MXNkZ+EptmfOvBUoG8=; b=QUE+FP4tuBsA1fc95UJ9o92XvOXq3A3w0AzYsqJM/ahH5OYGnwsjYbQxbwar3ic5oAp4f0 88MCiF4bDpIuUYgYl3tHVE0e9qAcc2oT5TTHbJWTv/XC3UhYYQJ9zf2jJKwqkDl2JfKC9c lfvd76qqcfsVsorqWLXz5JTikFy5ybI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Eli Zaretskii Subject: Re: bug#59149: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot Date: Fri, 25 Nov 2022 11:41:46 -0500 In-reply-to: <834junuhae.fsf@gnu.org> Message-ID: <87ilj3x9we.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59149 Cc: 59149@debbugs.gnu.org, stephen_leake@stephe-leake.org, joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> Cc: 59149@debbugs.gnu.org, joaotavora@gmail.com >> Date: Fri, 25 Nov 2022 11:15:33 -0500 >> From: Danny Freeman via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> +(defcustom eglot-report-progress t >> + "If non-nil, show progress of long running server work in the minibuffer." >> + :type 'boolean) > > Please add a :version tag. > > Thanks. My bad, attached is a revised patch. -- Danny Freeman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Eglot-Display-progress-notifications-in-minibuffer-a.patch Content-Description: Eglot progress report, now with version number! >From 95a7ca04d1c3b573cbc1cba3378f50450f090ab4 Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Wed, 9 Nov 2022 08:46:45 -0500 Subject: [PATCH] Eglot: Display progress notifications in minibuffer as they arrive * lisp/progmodes/eglot.el (eglot-report-progress): New custom variable. (eglot-lsp-server): New slot for tracking active progress reporters. (eglot-handle-notification): New impl for $/progress server responses. (eglot--format-markup): replace tab with spaces. (eglot--TextDocumentItem): replace tab with spaces. The LSP spec describes methods for reporting progress on long running jobs to the client: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#progress https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workDoneProgress This change reports those notifications in the minibuffer as they come in. It shows a percent indicator (if the server provides theme), or a spinner. This change should open the door for writing a "cancel long running request" command, which are identified by these progress notifications. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_workDoneProgress_cancel --- lisp/progmodes/eglot.el | 49 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index a0fb253e10..1c991e5c35 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -386,6 +386,11 @@ eglot-menu-string "String displayed in mode line when Eglot is active." :type 'string) +(defcustom eglot-report-progress t + "If non-nil, show progress of long running server work in the minibuffer." + :type 'boolean + :version "29.1") + (defvar eglot-withhold-process-id nil "If non-nil, Eglot will not send the Emacs process id to the language server. This can be useful when using docker to run a language server.") @@ -831,6 +836,9 @@ eglot-lsp-server (project :documentation "Project associated with server." :accessor eglot--project) + (progress-reporter-alist + :documentation "Alist of (PROGRESS-TOKEN . PROGRESS-REPORTER)." + :accessor eglot--progress-reporter-alist) (inhibit-autoreconnect :initform t :documentation "Generalized boolean inhibiting auto-reconnection if true." @@ -1569,7 +1577,7 @@ eglot--format-markup (setq-local markdown-fontify-code-blocks-natively t) (insert string) (let ((inhibit-message t) - (message-log-max nil)) + (message-log-max nil)) (ignore-errors (delay-mode-hooks (funcall mode)))) (font-lock-ensure) (string-trim (buffer-string))))) @@ -2049,6 +2057,43 @@ eglot-handle-notification (_server (_method (eql telemetry/event)) &rest _any) "Handle notification telemetry/event.") ;; noop, use events buffer +(defun eglot--progress-report-message (title message) + "Format a $/progress report message, given a TITLE and/or MESSAGE string." + (cond + ((and title message) (format "%s %s" title message)) + (title title) + (message message))) + +(defun eglot--progress-reporter (server token) + "Get a prgress-reporter identified by the progress TOKEN from the SERVER ." + (cdr (assoc token (eglot--progress-reporter-alist server)))) + +(defun eglot--progress-reporter-delete (server token) + "Delete progress-reporters identified by the progress TOKEN from the SERVER." + (setf (eglot--progress-reporter-alist server) + (assoc-delete-all token (eglot--progress-reporter-alist server)))) + +(cl-defmethod eglot-handle-notification + (server (_method (eql $/progress)) &key token value) + "Handle a $/progress notification identified by TOKEN from the SERVER." + (when eglot-report-progress + (cl-destructuring-bind (&key kind title percentage message) value + (pcase kind + ("begin" (let* ((prefix (format (concat "[eglot] %s %s:" (when percentage " ")) + (eglot-project-nickname server) token)) + (pr (if percentage + (make-progress-reporter prefix 0 100 percentage 1 0) + (make-progress-reporter prefix nil nil nil 1 0)))) + (eglot--progress-reporter-delete server token) + (setf (eglot--progress-reporter-alist server) + (cons (cons token pr) (eglot--progress-reporter-alist server))) + (progress-reporter-update pr percentage (eglot--progress-report-message title message)))) + ("report" (when-let ((pr (eglot--progress-reporter server token))) + (progress-reporter-update pr percentage (eglot--progress-report-message title message)))) + ("end" (when-let ((pr (eglot--progress-reporter server token))) + (progress-reporter-done pr) + (eglot--progress-reporter-delete server token))))))) + (cl-defmethod eglot-handle-notification (_server (_method (eql textDocument/publishDiagnostics)) &key uri diagnostics &allow-other-keys) ; FIXME: doesn't respect `eglot-strict-mode' @@ -2172,7 +2217,7 @@ eglot--TextDocumentItem (append (eglot--VersionedTextDocumentIdentifier) (list :languageId - (eglot--language-id (eglot--current-server-or-lose)) + (eglot--language-id (eglot--current-server-or-lose)) :text (eglot--widening (buffer-substring-no-properties (point-min) (point-max)))))) -- 2.38.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 11:56:31 2022 Received: (at 59149) by debbugs.gnu.org; 25 Nov 2022 16:56:31 +0000 Received: from localhost ([127.0.0.1]:37050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyc07-0007OS-Ew for submit@debbugs.gnu.org; Fri, 25 Nov 2022 11:56:31 -0500 Received: from out-36.mta0.migadu.com ([91.218.175.36]:34405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyc04-0007OJ-MX for 59149@debbugs.gnu.org; Fri, 25 Nov 2022 11:56:30 -0500 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> <87r0xrxb0i.fsf@dfreeman.email> <834junuhae.fsf@gnu.org> <87ilj3x9we.fsf@dfreeman.email> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1669395387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dEqS/Iv3uZS09lV5TzydkEkGzgV7Hl8sJ/3EliKZgbQ=; b=WS+xz6mqD4iTK0w7bILvC0UYnpeBOagvB61uh89ae4EBqtUI42sYtBuz4rdLHezKWMpQ7W ZfXzA3Srw9SmCGnnKg0gHfCCbVPGCJre/NTBfF9O4dhJ+MHhy9cYGF8u4tA2IiQl6wxERF 6yY015fHp9BtGNmIq1s5zbt+cXzCkPQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Eli Zaretskii Subject: Re: bug#59149: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot Date: Fri, 25 Nov 2022 11:44:03 -0500 In-reply-to: <87ilj3x9we.fsf@dfreeman.email> Message-ID: <87edtrx9ag.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59149 Cc: 59149@debbugs.gnu.org, stephen_leake@stephe-leake.org, joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I meant to reply to this and Eli's feedback in one email. > OK. Let's have Danny's opinion on it, especially on the name > 'eglot-report-progress'. In the simplest case, this variable is a > boolean, but I am curious if other types of progress reporting can be > envisioned. If they are, they should be controlled by the least amount > of user variables possible. I think a boolean will be sufficient, but I'm not sure how this will evolve in the future. >From the perspective of the LSP specification, there is only ONE type of progress message defined in the spec, and that is "Work Done Progress", which is what my patch supports. The spec does leave room for other usage of the progress message, including for "streaming of results", which I have never seen used in practice. >From the spec: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#progress """ The base protocol offers also support to report progress in a generic fashion. This mechanism can be used to report any kind of progress including work done progress (usually used to report progress in the user interface using a progress bar) and partial result progress to support streaming of results. """ What kind of variable might allow Eglot to naturally evolve with this part of the spec? Maybe a list similar to `eglot-stay-out-of`? It may also help to keep in mind that some of these "Work Done Progress" requests can be canceled by the user. Later I think it would be nice to expose a command that would send the server a cancel request while one of these "progress" things is in flight. I'm not sure how that might affect a custom var here, but thought I would mention it. -- Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 20:02:36 2022 Received: (at 59149) by debbugs.gnu.org; 26 Nov 2022 01:02:36 +0000 Received: from localhost ([127.0.0.1]:37461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyjaW-0000dv-Cw for submit@debbugs.gnu.org; Fri, 25 Nov 2022 20:02:36 -0500 Received: from mail-wr1-f42.google.com ([209.85.221.42]:46933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyjaT-0000dg-47 for 59149@debbugs.gnu.org; Fri, 25 Nov 2022 20:02:34 -0500 Received: by mail-wr1-f42.google.com with SMTP id h11so1637821wrw.13 for <59149@debbugs.gnu.org>; Fri, 25 Nov 2022 17:02:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BfssvVdkbmuS80eI3QvwwXhQA69ESmKPMuoHzKm+oZg=; b=DGAVngcq0NEKXWSwcpOVsG4FTUrzCbktaPEFLPtTgG9NZrEjmdLRDVVgta88k8oce4 ozvHrG8zrBu8A5Vi+C4M/mhzmakHKOb0dttN4gRW0ebGMBjVyPWKP0Lun5A6t5TgLkwi S5t4ozhkfuXeMQN8PsPCCNHEWEI4r0DVP9/fuLdLz9q7oDLZQOTcxwl/TkU8aqfWqIu2 u4H2W6d1ATKbylN58ekW7iUbcH63udTYMv9A/bftQCaF5lHrGbAXjn2I05JtSC6R9S5/ yBjNKrX/xrgqNfeCETf2Xdc1a56GUSeHIw4IOVxar73Ddgc13FrKTa3dQ5xoOeJnXiQS XtEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BfssvVdkbmuS80eI3QvwwXhQA69ESmKPMuoHzKm+oZg=; b=vm2979WAN5n8c9NY6rwq7DNTkKRaY83w1/2zPgSZumJuwG35fmWYOWuJ9mt0YJ89/E dLzbtKYOTfzbiFy2ZQyiga6e59PI6Fuyvbs7Ywbim+f8QjFJBLrar+vW8KAIgYDxhWSR HuRVYr+KrlAZVwDRYbvFgVoVodO3VK3FVggoLV75BtY5fLjtslZKR9AyCql2xgU1xxey YjoKFThhKSk+0Eg9z2iFtLN94ao/bRhjTCPy23GtewPDZaLuwJL6MuoXAyjNSh7V540w OkPsJ+r0sVhBtkOeghOzfHgdtR5h5vpJ/PWpCvCB/Jf0JGOQdmdfHDBxg3q3v1Fkk7dv FpbA== X-Gm-Message-State: ANoB5pnp/XYI8QSIOwMl9GYD+YGkAOikRTG+CgV7xXtUoIUMB5Piu0Kx WRGb7U/7HGVildY/4yjw+/M= X-Google-Smtp-Source: AA0mqf7QsABi5wRgliiJOAA/gIJnPS1duzNiDjDxGf7cqGkqqzatmP75nIo2AAgBRdfSg19XHcDdeg== X-Received: by 2002:a5d:50d0:0:b0:241:753d:6018 with SMTP id f16-20020a5d50d0000000b00241753d6018mr19096037wrt.67.1669424545709; Fri, 25 Nov 2022 17:02:25 -0800 (PST) Received: from krug (87-196-72-177.net.novis.pt. [87.196.72.177]) by smtp.gmail.com with ESMTPSA id n14-20020a5d660e000000b00241bee11825sm4717931wru.103.2022.11.25.17.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 17:02:25 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Danny Freeman Subject: Re: bug#59149: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot In-Reply-To: <87ilj3x9we.fsf@dfreeman.email> (Danny Freeman's message of "Fri, 25 Nov 2022 11:41:46 -0500") References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> <87r0xrxb0i.fsf@dfreeman.email> <834junuhae.fsf@gnu.org> <87ilj3x9we.fsf@dfreeman.email> Date: Sat, 26 Nov 2022 01:03:41 +0000 Message-ID: <87r0xqsf0y.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59149 Cc: 59149@debbugs.gnu.org, Eli Zaretskii , stephen_leake@stephe-leake.org, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Danny Freeman writes: > +(defcustom eglot-report-progress t > + "If non-nil, show progress of long running server work in the minibuff= er." > + :type 'boolean > + :version "29.1") The usual question: is the version number here Eglot, the ELPA package's upcoming version number, or is it Emacs's upcoming version number. I think Stefan Kangas had something to say about that. > + > + (message-log-max nil)) I know that indentation was off here, and you fixed it. But please revert this, and feel free to offer a separate cosmetic patch fixing this and other violations. > (ignore-errors (delay-mode-hooks (funcall mode)))) > (font-lock-ensure) > (string-trim (buffer-string))))) > @@ -2049,6 +2057,43 @@ eglot-handle-notification > (_server (_method (eql telemetry/event)) &rest _any) > "Handle notification telemetry/event.") ;; noop, use events buffer >=20=20 > +(defun eglot--progress-report-message (title message) > + "Format a $/progress report message, given a TITLE and/or MESSAGE stri= ng." > + (cond > + ((and title message) (format "%s %s" title message)) > + (title title) > + (message message))) > + > +(defun eglot--progress-reporter (server token) > + "Get a prgress-reporter identified by the progress TOKEN from the SERV= ER ." > + (cdr (assoc token (eglot--progress-reporter-alist server)))) > + > +(defun eglot--progress-reporter-delete (server token) > + "Delete progress-reporters identified by the progress TOKEN from the S= ERVER." > + (setf (eglot--progress-reporter-alist server) > + (assoc-delete-all token (eglot--progress-reporter-alist > server= )))) This is just a stylistic suggestion, but these functions could all be local inside the following eglot-handle-notification. Then you could give them less mouthfully names. The whole progress stuff could be examined by looking only at one function. > + > +(cl-defmethod eglot-handle-notification > + (server (_method (eql $/progress)) &key token value) > + "Handle a $/progress notification identified by TOKEN from the SERVER." > + (when eglot-report-progress > + (cl-destructuring-bind (&key kind title percentage message) value I think eglot-dbind is more appropriate here. See the file for how it's used. > + (pcase kind > + ("begin" (let* ((prefix (format (concat "[eglot] %s %s:" (when p= ercentage " ")) > + (eglot-project-nickname server) = token)) > + (pr (if percentage > + (make-progress-reporter prefix 0 100 per= centage 1 0) > + (make-progress-reporter prefix nil nil nil= 1 0)))) > + (eglot--progress-reporter-delete server token) > + (setf (eglot--progress-reporter-alist server) > + (cons (cons token pr) (eglot--progress-reporter= -alist server))) > + (progress-reporter-update pr percentage (eglot--progr= ess-report-message title message)))) > + ("report" (when-let ((pr (eglot--progress-reporter server token)= )) > + (progress-reporter-update pr percentage (eglot--prog= ress-report-message title message)))) > + ("end" (when-let ((pr (eglot--progress-reporter server token))) > + (progress-reporter-done pr) > + (eglot--progress-reporter-delete server token))))))) This lines are a bit too long, I think. Try to stick to 80 columns. M-x whitespace-mode helps in seeing that. I also think this could probably be simplified a bit or jumbled around to feel less repetitive. But it's not really bad as it stands, so feel free to disregard. > + > (cl-defmethod eglot-handle-notification > (_server (_method (eql textDocument/publishDiagnostics)) &key uri diag= nostics > &allow-other-keys) ; FIXME: doesn't respect `eglot-strict-mod= e' > @@ -2172,7 +2217,7 @@ eglot--TextDocumentItem > (append > (eglot--VersionedTextDocumentIdentifier) > (list :languageId > - (eglot--language-id (eglot--current-server-or-lose)) > + (eglot--language-id (eglot--current-server-or-lose)) Same here re: indentation. > :text > (eglot--widening > (buffer-substring-no-properties (point-min) (point-max)))))) The patch looks generally good: thanks! If you want to do the fixes I suggested, go ahead. Else give me some days to test it and I will push it. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 26 13:47:46 2022 Received: (at 59149) by debbugs.gnu.org; 26 Nov 2022 18:47:46 +0000 Received: from localhost ([127.0.0.1]:41421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz0DJ-0003f5-1w for submit@debbugs.gnu.org; Sat, 26 Nov 2022 13:47:46 -0500 Received: from out2.migadu.com ([188.165.223.204]:43647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz0DG-0003ee-42 for 59149@debbugs.gnu.org; Sat, 26 Nov 2022 13:47:43 -0500 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> <87r0xrxb0i.fsf@dfreeman.email> <834junuhae.fsf@gnu.org> <87ilj3x9we.fsf@dfreeman.email> <87r0xqsf0y.fsf@gmail.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1669488460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=v755Wi8zsBMrr5yp+sqYs7PJ4p1e2jsh9l+egRdKupA=; b=mhbW+x7q4U7o4Q41BRAqJE91frD3xbxrEqQ1gDGAhyMSuIdJwRucHoK+JJ4eG/5vogy+DD FZUJ0bNPzvRnLKHnLc1c8pYoul21iOh2H2K64K5M/ytOAqx03pZwBI/FQZh57g9d6tDX4m kDk2QiLPJ1mnU8kY703wVPyQW2Souw8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#59149: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot Date: Sat, 26 Nov 2022 13:37:20 -0500 In-reply-to: <87r0xqsf0y.fsf@gmail.com> Message-ID: <87v8n18sdz.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59149 Cc: 59149@debbugs.gnu.org, Eli Zaretskii , stephen_leake@stephe-leake.org, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jo=C3=A3o T=C3=A1vora writes: > Danny Freeman writes: > > >> +(defcustom eglot-report-progress t >> + "If non-nil, show progress of long running server work in the minibuf= fer." >> + :type 'boolean >> + :version "29.1") > > The usual question: is the version number here Eglot, the ELPA package's > upcoming version number, or is it Emacs's upcoming version number. I > think Stefan Kangas had something to say about that. Yeah, I've left this as in my updated patch. The answer is beyond my qualifications :) > >> + >> + (message-log-max nil)) > > I know that indentation was off here, and you fixed it. But please > revert this, and feel free to offer a separate cosmetic patch fixing > this and other violations. No problem. I have attached a second patch with only whitespace changes. Feel free to take it or leave it.=20 > >> (ignore-errors (delay-mode-hooks (funcall mode)))) >> (font-lock-ensure) >> (string-trim (buffer-string))))) >> @@ -2049,6 +2057,43 @@ eglot-handle-notification >> (_server (_method (eql telemetry/event)) &rest _any) >> "Handle notification telemetry/event.") ;; noop, use events buffer >>=20=20 >> +(defun eglot--progress-report-message (title message) >> + "Format a $/progress report message, given a TITLE and/or MESSAGE str= ing." >> + (cond >> + ((and title message) (format "%s %s" title message)) >> + (title title) >> + (message message))) >> + >> +(defun eglot--progress-reporter (server token) >> + "Get a prgress-reporter identified by the progress TOKEN from the SER= VER ." >> + (cdr (assoc token (eglot--progress-reporter-alist server)))) >> + >> +(defun eglot--progress-reporter-delete (server token) >> + "Delete progress-reporters identified by the progress TOKEN from the = SERVER." >> + (setf (eglot--progress-reporter-alist server) >> + (assoc-delete-all token (eglot--progress-reporter-alist > serve= r)))) > > This is just a stylistic suggestion, but these functions could all be > local inside the following eglot-handle-notification. Then you could > give them less mouthfully names. The whole progress stuff could be > examined by looking only at one function. I have inlined them with cl-flet. >> + >> +(cl-defmethod eglot-handle-notification >> + (server (_method (eql $/progress)) &key token value) >> + "Handle a $/progress notification identified by TOKEN from the SERVER= ." >> + (when eglot-report-progress >> + (cl-destructuring-bind (&key kind title percentage message) value > > I think eglot-dbind is more appropriate here. See the file for how it's > used. Done, that's a pretty neat macro. >> + (pcase kind >> + ("begin" (let* ((prefix (format (concat "[eglot] %s %s:" (when = percentage " ")) >> + (eglot-project-nickname server)= token)) >> + (pr (if percentage >> + (make-progress-reporter prefix 0 100 pe= rcentage 1 0) >> + (make-progress-reporter prefix nil nil ni= l 1 0)))) >> + (eglot--progress-reporter-delete server token) >> + (setf (eglot--progress-reporter-alist server) >> + (cons (cons token pr) (eglot--progress-reporte= r-alist server))) >> + (progress-reporter-update pr percentage (eglot--prog= ress-report-message title message)))) >> + ("report" (when-let ((pr (eglot--progress-reporter server token= ))) >> + (progress-reporter-update pr percentage (eglot--pro= gress-report-message title message)))) >> + ("end" (when-let ((pr (eglot--progress-reporter server token))) >> + (progress-reporter-done pr) >> + (eglot--progress-reporter-delete server token))))))) > > This lines are a bit too long, I think. Try to stick to 80 columns. > M-x whitespace-mode helps in seeing that. I've scaled back the width of the function a good bit. Some of the parens still spill over in some places, happy to take a second stab at it. > I also think this could probably be simplified a bit or jumbled around > to feel less repetitive. But it's not really bad as it stands, so feel > free to disregard. I'm not sure what I could do to scale this back beyond what is there now. If there is anything specific let me know. >> + >> (cl-defmethod eglot-handle-notification >> (_server (_method (eql textDocument/publishDiagnostics)) &key uri dia= gnostics >> &allow-other-keys) ; FIXME: doesn't respect `eglot-strict-mo= de' >> @@ -2172,7 +2217,7 @@ eglot--TextDocumentItem >> (append >> (eglot--VersionedTextDocumentIdentifier) >> (list :languageId >> - (eglot--language-id (eglot--current-server-or-lose)) >> + (eglot--language-id (eglot--current-server-or-lose)) > > Same here re: indentation. This was one of the lines that had a tab, I was more intentional with the indentation in the whitespace patch. >> :text >> (eglot--widening >> (buffer-substring-no-properties (point-min) (point-max)))))) > > > The patch looks generally good: thanks! If you want to do the fixes I > suggested, go ahead. Else give me some days to test it and I will > push it. > > Jo=C3=A3o Thank you! Let me know if you have any other questions or feedback and I will be happy to address it. --=20 Danny Freeman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-eglot-whitespace-cleanup.patch Content-Description: whitespace only patch >From 7227f9fdf53a1af7c3793c94904e153d49527372 Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Sat, 26 Nov 2022 13:31:50 -0500 Subject: [PATCH 1/2] ; eglot whitespace cleanup * lisp/progmodes/eglot (eglot--check-object): trailing whitespace. (eglot--format-markup): replace tab with spaces. (eglot--make-diag): trailing whitespace. (eglot--TextDocumentItem): replace tab with spaces. (eglot--lsp-xrefs-for-method): trailing whitespace. --- lisp/progmodes/eglot.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 120d4feb95..e6e97fd8c8 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -540,7 +540,7 @@ eglot--check-object for type = (or (cdr (assoc k types)) t) ;; FIXME: enforce nil type? unless (cl-typep v type) do (eglot--error "A `%s' must have a %s as %s, but has %s" - interface-name ))) + interface-name))) t)) (eval-and-compile @@ -1569,7 +1569,7 @@ eglot--format-markup (setq-local markdown-fontify-code-blocks-natively t) (insert string) (let ((inhibit-message t) - (message-log-max nil)) + (message-log-max nil)) (ignore-errors (delay-mode-hooks (funcall mode)))) (font-lock-ensure) (string-trim (buffer-string))))) @@ -1987,7 +1987,7 @@ 'eglot--make-diag (defalias 'eglot--diag-data 'flymake-diagnostic-data) (cl-loop for i from 1 - for type in '(eglot-note eglot-warning eglot-error ) + for type in '(eglot-note eglot-warning eglot-error) do (put type 'flymake-overlay-control `((mouse-face . highlight) (priority . ,(+ 50 i)) @@ -2172,7 +2172,7 @@ eglot--TextDocumentItem (append (eglot--VersionedTextDocumentIdentifier) (list :languageId - (eglot--language-id (eglot--current-server-or-lose)) + (eglot--language-id (eglot--current-server-or-lose)) :text (eglot--widening (buffer-substring-no-properties (point-min) (point-max)))))) @@ -2641,7 +2641,7 @@ eglot--lsp-xrefs-for-method uri range)))))) (if (vectorp response) response (and response (list response))))))) -(cl-defun eglot--lsp-xref-helper (method &key extra-params capability ) +(cl-defun eglot--lsp-xref-helper (method &key extra-params capability) "Helper for `eglot-find-declaration' & friends." (let ((eglot--lsp-xref-refs (eglot--lsp-xrefs-for-method method -- 2.38.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Eglot-Display-progress-notifications-in-minibuffer-a.patch Content-Description: updated progress reporter patch >From a4d7c5028d49cd5fd6d5599e91d2bcfb250851dc Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Wed, 9 Nov 2022 08:46:45 -0500 Subject: [PATCH 2/2] Eglot: Display progress notifications in minibuffer as they arrive * lisp/progmodes/eglot.el (eglot-report-progress): New custom variable. (eglot-lsp-server): New slot for tracking active progress reporters. (eglot-handle-notification): New impl for $/progress server responses. The LSP spec describes methods for reporting progress on long running jobs to the client: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#progress https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workDoneProgress This change reports those notifications in the minibuffer as they come in. It shows a percent indicator (if the server provides theme), or a spinner. This change should open the door for writing a "cancel long running request" command, which are identified by these progress notifications. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_workDoneProgress_cancel --- lisp/progmodes/eglot.el | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index e6e97fd8c8..e6673c37a1 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -386,6 +386,11 @@ eglot-menu-string "String displayed in mode line when Eglot is active." :type 'string) +(defcustom eglot-report-progress t + "If non-nil, show progress of long running server work in the minibuffer." + :type 'boolean + :version "29.1") + (defvar eglot-withhold-process-id nil "If non-nil, Eglot will not send the Emacs process id to the language server. This can be useful when using docker to run a language server.") @@ -470,6 +475,7 @@ eglot--executable-find (TextDocumentEdit (:textDocument :edits) ()) (TextEdit (:range :newText)) (VersionedTextDocumentIdentifier (:uri :version) ()) + (WorkDoneProgress (:kind) (:title :message :percentage :cancellable)) (WorkspaceEdit () (:changes :documentChanges)) (WorkspaceSymbol (:name :kind) (:containerName :location :data))) "Alist (INTERFACE-NAME . INTERFACE) of known external LSP interfaces. @@ -831,6 +837,9 @@ eglot-lsp-server (project :documentation "Project associated with server." :accessor eglot--project) + (progress-reporter-alist + :documentation "Alist of (PROGRESS-TOKEN . PROGRESS-REPORTER)." + :accessor eglot--progress-reporter-alist) (inhibit-autoreconnect :initform t :documentation "Generalized boolean inhibiting auto-reconnection if true." @@ -2049,6 +2058,47 @@ eglot-handle-notification (_server (_method (eql telemetry/event)) &rest _any) "Handle notification telemetry/event.") ;; noop, use events buffer +(cl-defmethod eglot-handle-notification + (server (_method (eql $/progress)) &key token value) + "Handle a $/progress notification identified by TOKEN from the SERVER." + (when eglot-report-progress + (cl-flet ((eglot--pr-message (title message) + (cond + ((and title message) (format "%s %s" title message)) + (title title) + (message message))) + (eglot--get-pr (server token) + (cdr (assoc token (eglot--progress-reporter-alist server)))) + (eglot--delete-pr (server token) + (setf (eglot--progress-reporter-alist server) + (assoc-delete-all + token (eglot--progress-reporter-alist server))))) + (eglot--dbind ((WorkDoneProgress) kind title percentage message) value + (pcase kind + ("begin" + (let* ((prefix (format (concat "[eglot] %s %s:" + (when percentage " ")) + (eglot-project-nickname server) + token)) + (pr (if percentage + (make-progress-reporter + prefix 0 100 percentage 1 0) + (make-progress-reporter + prefix nil nil nil 1 0)))) + (eglot--delete-pr server token) + (setf (eglot--progress-reporter-alist server) + (cons (cons token pr) (eglot--progress-reporter-alist server))) + (progress-reporter-update + pr percentage (eglot--pr-message title message)))) + ("report" + (when-let ((pr (eglot--get-pr server token))) + (progress-reporter-update + pr percentage (eglot--pr-message title message)))) + ("end" + (when-let ((pr (eglot--get-pr server token))) + (progress-reporter-done pr) + (eglot--delete-pr server token)))))))) + (cl-defmethod eglot-handle-notification (_server (_method (eql textDocument/publishDiagnostics)) &key uri diagnostics &allow-other-keys) ; FIXME: doesn't respect `eglot-strict-mode' -- 2.38.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 26 14:46:28 2022 Received: (at 59149) by debbugs.gnu.org; 26 Nov 2022 19:46:28 +0000 Received: from localhost ([127.0.0.1]:41498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz188-0006Tt-4L for submit@debbugs.gnu.org; Sat, 26 Nov 2022 14:46:28 -0500 Received: from mail-oi1-f172.google.com ([209.85.167.172]:46026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz186-0006Tm-Hs for 59149@debbugs.gnu.org; Sat, 26 Nov 2022 14:46:26 -0500 Received: by mail-oi1-f172.google.com with SMTP id t62so7673069oib.12 for <59149@debbugs.gnu.org>; Sat, 26 Nov 2022 11:46:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=Oo2O30jzZR86GjbHXquMEXq0WO5cOtUCgj4axS/bx9E=; b=TOZo/q42b4gHoH0fuc6eN8SmSEDIWsVcZD+dvjUbtGX4K4ZhenzX2FoFiVQ8XoOZnn FFGZv0GHtyYFp0SqVRFQZ65D4+9CWxf864LFojRttHpUqszrhB5kwFuHP3j7nQPeRkbB MiLSitzZbfxlHshaISrM0qQGxJ2uYvX9339NIH+UGqdk3EqN5nCoicMIIOF/0sE7iWgq l1fnRhZdA/3H8qf9Zx4RSu2qg3+ETMgm+vb3nHGoZbIanjg+dDE1SysaL0VNkFUYLaSc lSjeCrBn7CXpNlnn17BtcfygaaFqFHSfeDT+ab06mAzyHFQOANxCLQuO9ez5cNxUipFU /zaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Oo2O30jzZR86GjbHXquMEXq0WO5cOtUCgj4axS/bx9E=; b=7v/d5HdbsFMsJLNfb40N02CPQ//m80cF00VVMUFeB2ShmofdZDG9MolMEDpfnr/hjW ACQPwOMSIv6ORhQ4s4YJPsZ7Cjl2iYOy5e7ECB1WA1FgHOSki7POwqEmzOROHu3fZrfM keC0cgiDjydjU6KRaofz7pAS0LhyIftl9D9R2PYX7kFVTRKMONTmqmW01ZHakmffhYO1 meOhHCKWP6kEjYesxtWp7gI01ugSInR2JhjNMWXDG1yiYv2yts2TyH9kjV2IetUcY3Mp kt3TRVY8tNQZyddHYNvY1iZY3I39nqxTjxoqfSCwUfTKZ6Q+Ws96C7oe/y9c5PW0D/B3 6oDw== X-Gm-Message-State: ANoB5pk0VPPbTCxMpmCydCvZh451vGrZtXfWGdUJofXUYr2m1+N/9vh7 1F1ulDMS5toGT27D/cuJMmoy8rZIC/WExqsp56g= X-Google-Smtp-Source: AA0mqf5CSF/TLdZYDyquqx1tSD7AfuTmheDs5yU5avD6xQJYTeT6HLMRgkdiHx6mPm2R1h3UpnYCRzxTysubqI+rkCM= X-Received: by 2002:a05:6808:2229:b0:35b:2b17:af81 with SMTP id bd41-20020a056808222900b0035b2b17af81mr12135934oib.199.1669491980928; Sat, 26 Nov 2022 11:46:20 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 26 Nov 2022 11:46:20 -0800 From: Stefan Kangas In-Reply-To: <87r0xqsf0y.fsf@gmail.com> References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> <87r0xrxb0i.fsf@dfreeman.email> <834junuhae.fsf@gnu.org> <87ilj3x9we.fsf@dfreeman.email> <87r0xqsf0y.fsf@gmail.com> X-Hashcash: 1:20:221126:59149@debbugs.gnu.org::eLnLWheLBAFQm1Dd:GYZO MIME-Version: 1.0 Date: Sat, 26 Nov 2022 11:46:20 -0800 Message-ID: Subject: Re: bug#59149: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Danny Freeman Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59149 Cc: 59149@debbugs.gnu.org, Eli Zaretskii , stephen_leake@stephe-leake.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: >> +(defcustom eglot-report-progress t >> + "If non-nil, show progress of long running server work in the minibuf= fer." >> + :type 'boolean >> + :version "29.1") > > The usual question: is the version number here Eglot, the ELPA package's > upcoming version number, or is it Emacs's upcoming version number. I > think Stefan Kangas had something to say about that. AFAIU, there are two correct ways to do it: 1. Use :version and the upcoming Emacs version number. Most :core packages do it this way, for example flymake.el. 2. Use :package-version and the upcoming Eglot version number. This requires adding Eglot to `customize-package-emacs-version-alist', and then keeping that variable up-to-date as new versions are released. See the docstring of the `defcustom' :package-version keyword, and `customize-package-emacs-version-alist'. I think whichever one we pick, we should use it consistently. Arguably #1 is a bit easier, but #2 is a bit more correct. So I think it's ultimately your decision which way to go for Eglot, Jo=C3=A3o. Background: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D13824#27 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 08:31:31 2022 Received: (at 59149) by debbugs.gnu.org; 1 Dec 2022 13:31:31 +0000 Received: from localhost ([127.0.0.1]:39734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0jf0-0005Mw-QU for submit@debbugs.gnu.org; Thu, 01 Dec 2022 08:31:31 -0500 Received: from out2.migadu.com ([188.165.223.204]:41262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0jew-0005Mq-76 for 59149@debbugs.gnu.org; Thu, 01 Dec 2022 08:31:29 -0500 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> <87r0xrxb0i.fsf@dfreeman.email> <834junuhae.fsf@gnu.org> <87ilj3x9we.fsf@dfreeman.email> <87r0xqsf0y.fsf@gmail.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1669901482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=30H5qKFpoDzttY+fviGWDJca14FBZybT0XwBLEXTW88=; b=SSE+FcDmYoH52xZsgrFGLLtY74XdxukZyaQjUo98DUetFZ4JK2kghb9/QscRoghHSaBiuu iyg1tSSisfymH80n0QWnA+57bDYdpN6XY44BvMzkwucS1030FSIpU++Alularsj80FrzfL IhzkYpAhWVrGu+JnHfAYMI2uNvHRQmI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#59149: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot Date: Thu, 01 Dec 2022 08:29:22 -0500 In-reply-to: Message-ID: <878rjrz1wa.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59149 Cc: 59149@debbugs.gnu.org, Eli Zaretskii , stephen_leake@stephe-leake.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Sending a friendly reminder in case this patch has fallen off your radar. -- Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 03 08:24:13 2022 Received: (at 59149) by debbugs.gnu.org; 3 Dec 2022 13:24:13 +0000 Received: from localhost ([127.0.0.1]:51681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1SV3-0003IZ-8b for submit@debbugs.gnu.org; Sat, 03 Dec 2022 08:24:13 -0500 Received: from mail-ot1-f50.google.com ([209.85.210.50]:45725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1SV0-0003IT-UN for 59149@debbugs.gnu.org; Sat, 03 Dec 2022 08:24:11 -0500 Received: by mail-ot1-f50.google.com with SMTP id s9-20020a05683004c900b0066e7414466bso4543348otd.12 for <59149@debbugs.gnu.org>; Sat, 03 Dec 2022 05:24:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=StPmqHQIoTluEmK8HQJETZ7NnGfOVDtXYPMQqxQ/DzA=; b=h+1p9bATCh4xpEb/AI1+aZIRU3jNuv5ihUeyz3db2ea7vLzfiAJpDobOZghCNPM2SU T+HLa/2brfECfr4k0n2p+scNsTD8V71mseUQE/IAqFcH3oNWYYENSatzYSZZ8EQ0j5AK 4wPSQ5xw1/H/MKujzXS+Ty1Hemit5SKlc48XxCZdyAk9lBG4o2C7V4Iad8UfrmYOALpP /TdiU1h+Oo8xG1NsJaAacJN//8HCJkNEWZtFzfjPo3PEAtU7DpMTiIUjpmup07QRQylP 7enX3nfrUCua7/kV2bnX/nuU+QOTA6A78fR9bxF+hW9TA395aGuD88x9ld9Cq83Hirlq hcfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=StPmqHQIoTluEmK8HQJETZ7NnGfOVDtXYPMQqxQ/DzA=; b=uvhdk/5H6RMGCmMl4OmP1zfmckU019vBmlr+goZ1Z1wnP6Spl8ntZ5uQTQYYDM0Z1J tdmBC0U7liz1YRBsUQ4wWa7KQHHhWkj5sdkolPLbASqUj60LBXhuny6XNvBOlHWVicBX dwVK+v3rf/sAps8RYHlc1PNjzintiTeLPAsXbB56BU/nNCAUEEOH5iIKPf7iQrNbza6I 04dBDC6fgnCEq7Gy/iTlNNIyJphkiz4t13nmF2K6w4E92B+SOFAEBEXNScbpVQWwDUPh QBzYwZzv6IpssDlgEwaPZmPjx6uSwbNj/mZkS/cykzIInXn8kRxxeFkd5ip5JTve5A27 T5YQ== X-Gm-Message-State: ANoB5pl7E2jB4NKDmdb4twecbON6LoHDxeOoDlOKWR0n5SFhhVb30wdD vAytp24Mqph+SbEvP1V4ttfA3BzPws201AeoJik= X-Google-Smtp-Source: AA0mqf4rcIYQsOnHGvBl4WIZqP5TuOgqX1nmtNi/gGSC3TO50nsXYXOsffpsYt2NA8PJzCaOZFndtOXBnRmwIsPeSf0= X-Received: by 2002:a05:6830:6019:b0:661:cac2:79ca with SMTP id bx25-20020a056830601900b00661cac279camr32461547otb.93.1670073845263; Sat, 03 Dec 2022 05:24:05 -0800 (PST) MIME-Version: 1.0 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> <87r0xrxb0i.fsf@dfreeman.email> <834junuhae.fsf@gnu.org> <87ilj3x9we.fsf@dfreeman.email> <87r0xqsf0y.fsf@gmail.com> <878rjrz1wa.fsf@dfreeman.email> In-Reply-To: <878rjrz1wa.fsf@dfreeman.email> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Sat, 3 Dec 2022 13:23:53 +0000 Message-ID: Subject: Re: bug#59149: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot To: Danny Freeman Content-Type: multipart/alternative; boundary="0000000000004bb0f505eeec5ef0" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59149 Cc: 59149@debbugs.gnu.org, Eli Zaretskii , stephen_leake@stephe-leake.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000004bb0f505eeec5ef0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Danny, Thanks, no it hasn't. But I have a lot of little things to do and limited free time. Your patch should be next in the queue, though. Jo=C3=A3o --0000000000004bb0f505eeec5ef0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Danny,

Thanks, no i= t hasn't.=C2=A0 But I have a lot of little things to do and=C2=A0
=
limited free time. Your patch should be next in the queue,
t= hough.

Jo=C3=A3o
--0000000000004bb0f505eeec5ef0-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 09 08:07:07 2022 Received: (at 59149-done) by debbugs.gnu.org; 9 Dec 2022 13:07:07 +0000 Received: from localhost ([127.0.0.1]:36007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3d5m-0001Rh-SM for submit@debbugs.gnu.org; Fri, 09 Dec 2022 08:07:07 -0500 Received: from mail-oa1-f43.google.com ([209.85.160.43]:44894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3d5k-0001RH-1T for 59149-done@debbugs.gnu.org; Fri, 09 Dec 2022 08:07:05 -0500 Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-1447c7aa004so5538701fac.11 for <59149-done@debbugs.gnu.org>; Fri, 09 Dec 2022 05:07:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9rzLrsOREA1QNSIhFUUauD7qsOFpKRoWOAUhjH66Cec=; b=nDUDnvrHLfqiBGjYywtwIsWnJZQmJCutk93ikXAn2a6+Y9DAqQMZEbtbK4J8ZplcD9 2fjz3bv4qS/3U0jxo7dJXakLcWw/dBJx682uxZ7ehhCNAjjAfRry/3aAqleByLaaHPzV qFuU4ECFjLwgfHDCA4oGPti6LEzLcGph4ZE0aWYlVJHxVOqEEXHYC5P6Xg+q4/Gvir1h b9HkvKsvsZ+QTFyrKiNgM/eGhEn4dI0LN/4sXxVa1hce8+WruVHLUWuuSRJLQx6seYZA M/XThR7PvB5OVkT2QtSSWqmwjzzIHPH8WB/Q9e3r0oLqlUbGVs0cI5xY64VY7PhKXUc0 C8eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=9rzLrsOREA1QNSIhFUUauD7qsOFpKRoWOAUhjH66Cec=; b=KOkMqAseTwt60TkfkaKiv6Nq/mBCVTUsPRSnoyORcEk4u0f2ZKZnzrhJn+szUZqwsc FX+2r99zp5Z2aEa14BlCNX7jN7Cp9fdzc+QijnxyxKV5l6ltZRgwdgIn+lMOZG5Mx6TX YM9iZqRN1jet7kEg2zYwAM7+Jw2B86gDEXfUBbPXXYvihEZq4AGRATK37YDqMn7Csp4q hRJfzsiwYqbMUyoqDqzspFQ0LIdnOKr/AnNf5zUUCTYzX2L7T3F/BcLPr877cQ/Kz3l6 1AlRMtwMhWxZ1gZkV9l441XAO05J0hgmFeI9nrRbCU5B2pKMCoZxSAlW4nAvHwCktQIl shLw== X-Gm-Message-State: ANoB5pkV5EDki1nLj/H43Sf+S7Ea5yl0AjN9Gxrj94F9zovWOdlvD/Yv O9l/11RKrRDG/QP9vGTI20/b8WuRIK57Sw39UYg= X-Google-Smtp-Source: AA0mqf453q9XBdR3pQqtU4xAqo2XyZH1VVP2+w1qie9lkisASHnTtFwDMI4eI7EY4xn1ZYctNExViyt7jF59KPKKX4w= X-Received: by 2002:a05:6870:aa0e:b0:144:9e0c:d475 with SMTP id gv14-20020a056870aa0e00b001449e0cd475mr9667291oab.215.1670591218424; Fri, 09 Dec 2022 05:06:58 -0800 (PST) MIME-Version: 1.0 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> <87r0xrxb0i.fsf@dfreeman.email> <834junuhae.fsf@gnu.org> <87ilj3x9we.fsf@dfreeman.email> <87r0xqsf0y.fsf@gmail.com> <878rjrz1wa.fsf@dfreeman.email> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Fri, 9 Dec 2022 13:06:47 +0000 Message-ID: Subject: Re: bug#59149: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot To: Danny Freeman , 59149-done@debbugs.gnu.org Content-Type: multipart/alternative; boundary="00000000000023a01805ef64d492" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59149-done Cc: Eli Zaretskii , stephen_leake@stephe-leake.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000023a01805ef64d492 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I just pushed this to the emacs-29 branch, as it's a feature within a new feature for that branch already. Danny, I also tweaked the implementation slightly to use a hash table instead of an alist. I didn't actually test this, as I have no server hand= y that supplies these $/progress notifications, but it should be functionally equivalent. let me know if it's not, it's easy to tweak. Also, I added a missing entry in the eglot.texi manual. Jo=C3=A3o On Sat, Dec 3, 2022 at 1:23 PM Jo=C3=A3o T=C3=A1vora = wrote: > Hi Danny, > > Thanks, no it hasn't. But I have a lot of little things to do and > limited free time. Your patch should be next in the queue, > though. > > Jo=C3=A3o > --=20 Jo=C3=A3o T=C3=A1vora --00000000000023a01805ef64d492 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I just pushed this to the emacs-29 branch, as it's a f= eature within=C2=A0
a new feature for that branch already.
Danny, I also tweaked the implementation slightly to use a has= h table
instead of an alist.=C2=A0 I didn't actually test thi= s, as I have no server handy
that supplies these $/progress notif= ications, but it should be functionally
equivalent.=C2=A0 let me = know if it's not, it's easy to tweak.

Also= , I added a missing entry in the eglot.texi manual.

Jo=C3=A3o

On Sat, Dec 3, 2022 at 1:23 PM Jo=C3=A3o T=C3=A1vora <<= a href=3D"mailto:joaotavora@gmail.com">joaotavora@gmail.com> wrote:<= br>
Hi Danny,

Thanks, no it hasn't.=C2= =A0 But I have a lot of little things to do and=C2=A0
limited fre= e time. Your patch should be next in the queue,
though.

Jo=C3=A3o


--
Jo=C3=A3o T=C3=A1vora
--00000000000023a01805ef64d492-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 09 08:44:47 2022 Received: (at 59149-done) by debbugs.gnu.org; 9 Dec 2022 13:44:47 +0000 Received: from localhost ([127.0.0.1]:36187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3dgF-00022Z-2Y for submit@debbugs.gnu.org; Fri, 09 Dec 2022 08:44:47 -0500 Received: from out-178.mta0.migadu.com ([91.218.175.178]:63405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3dgC-00022N-Oq for 59149-done@debbugs.gnu.org; Fri, 09 Dec 2022 08:44:45 -0500 References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> <86fseckwvb.fsf@stephe-leake.org> <87tu2pohub.fsf@dfreeman.email> <86ilj5k0sn.fsf@stephe-leake.org> <87wn7l316m.fsf@dfreeman.email> <86edtsk3xi.fsf@stephe-leake.org> <87o7swv3nx.fsf@gmail.com> <8635a8jb8e.fsf@stephe-leake.org> <87r0xrxb0i.fsf@dfreeman.email> <834junuhae.fsf@gnu.org> <87ilj3x9we.fsf@dfreeman.email> <87r0xqsf0y.fsf@gmail.com> <878rjrz1wa.fsf@dfreeman.email> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1670593482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MVqo8NM7GhELiYnCFN/IDn7PFOxJr4fFcvLGjaZLeHA=; b=M6ve0f7zxR3EItzu5uaseNvZWbTSqVzzy3sPcPLyiu7PjS1R3GUPVHNJ0rcWvtk6swyeRH Zz4bIjNv1RTzms/sLU/Saemin0MooVQUHGMn5VB06dJ58Le9Qa+EzJP+sDKE7w5XonjldE x0QnbX9dR+XyfMdb9VVmrgm5jTqVhmc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#59149: [SPAM UNSURE] Re: bug#59149: Feature Request: Report progress of long requests in Eglot Date: Fri, 09 Dec 2022 08:38:22 -0500 In-reply-to: Message-ID: <87359ovghk.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59149-done Cc: Eli Zaretskii , 59149-done@debbugs.gnu.org, stephen_leake@stephe-leake.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > I just pushed this to the emacs-29 branch, as it's a feature within > a new feature for that branch already. That is very exciting to hear, thank you! > Danny, I also tweaked the implementation slightly to use a hash table > instead of an alist. I didn't actually test this, as I have no server ha= ndy > that supplies these $/progress notifications, but it should be functional= ly > equivalent. let me know if it's not, it's easy to tweak. > > Also, I added a missing entry in the eglot.texi manual. I just pulled the changes down and tested it. It works great. Thank you for cleaning it up. I'm very excited to see this make it in to 29. As always, I appreciate your help and patience with me. --=20 Danny Freeman From unknown Thu Jun 19 14:05:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 07 Jan 2023 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator