From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Troy Brown Newsgroups: gmane.emacs.bugs Subject: bug#71642: 30.0.50; eglot-execute doesn't support ExecuteCommandParams Date: Tue, 18 Jun 2024 23:24:04 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1550"; mail-complaints-to="usenet@ciao.gmane.io" To: 71642@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 19 05:25:29 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sJlwv-0000IV-7R for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Jun 2024 05:25:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJlwU-0004k1-Bq; Tue, 18 Jun 2024 23:25:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJlwS-0004ja-Fv for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 23:25:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJlwS-0003ON-7E for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 23:25:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJlwU-00048A-Qy for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 23:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Troy Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Jun 2024 03:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71642 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171876746615808 (code B ref -1); Wed, 19 Jun 2024 03:25:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Jun 2024 03:24:26 +0000 Original-Received: from localhost ([127.0.0.1]:59603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJlvt-00046u-Px for submit@debbugs.gnu.org; Tue, 18 Jun 2024 23:24:26 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJlvs-00046m-3P for submit@debbugs.gnu.org; Tue, 18 Jun 2024 23:24:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJlvo-0004eh-Ps for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 23:24:20 -0400 Original-Received: from mail-ej1-f48.google.com ([209.85.218.48]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJlvn-0003M9-1Z for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 23:24:20 -0400 Original-Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a6f958a3a45so176337266b.3 for ; Tue, 18 Jun 2024 20:24:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718767457; x=1719372257; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HHp0wCKUufg2DFfEyYQfujF6rMmFAQGm9DJElx4t0Tw=; b=l65OcBIvIQi3L/+sHtAjmmVUBk/Q1ArE9VCsAKDnKTbAS0J3rvhlaz3HStj0XDUjJv fBPG3mgQwtqkEB21rUJPR/VtfsrvzzitcY6Mj6vhpYCusE2yEmTbN3iAqyKpf7MKK/tm E2/BQtJVdpgfVAsa9K1HxJDq5ZdYl3Wd38r3vGFdr8EuhCzmwlyNB9bEZril1zi6/zW6 J9bSCEOj1+DL+d1ZczHbdtf3CEDNwFQyV280P9eh5HTPINkBTNeyKFVdBGCIa3Xl+qNa QdbTYWX3X/A0SUi96n74URiC5Vra/QeJt5E0hBADOK40+ywuYYUlavZ8gT+6Ik0okD/U Lzsg== X-Gm-Message-State: AOJu0Yy06Rn/A0TNblfOqN+FMa40rM2xFjsKXBusYWzqYDSqCCzI4uYn mL1SzVTljmgEd8k1JfMKntrKcvt1XHVBKTKWOVBY2/jh+6sPhsIWjWJ6mtp4 X-Google-Smtp-Source: AGHT+IEZt8p5r9KhBjjfQi642usfOUg8vLof8LZRQuB7oDQgTs+Bk+ew9sV529l3M8bPpZUCtheHGw== X-Received: by 2002:a17:906:d8a:b0:a6f:4c90:7951 with SMTP id a640c23a62f3a-a6fab60bcc3mr51527366b.8.1718767456692; Tue, 18 Jun 2024 20:24:16 -0700 (PDT) Original-Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com. [209.85.208.51]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db5c3dsm646027966b.55.2024.06.18.20.24.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jun 2024 20:24:16 -0700 (PDT) Original-Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-57cfe600cbeso1616937a12.2 for ; Tue, 18 Jun 2024 20:24:16 -0700 (PDT) X-Received: by 2002:a50:c192:0:b0:57c:9c5d:d195 with SMTP id 4fb4d7f45d1cf-57d07ed94d3mr537026a12.27.1718767455957; Tue, 18 Jun 2024 20:24:15 -0700 (PDT) X-Gmail-Original-Message-ID: Received-SPF: pass client-ip=209.85.218.48; envelope-from=troy.s.brown@gmail.com; helo=mail-ej1-f48.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287463 Archived-At: With the deprecation of eglot-execute-command and its referral to eglot-execute, it would seem that eglot-execute should support the same command and arguments to send the workspace/executeCommand request to the server. Unfortunately, this doesn't seem to work as expected. I would have expected the following to work: (eglot-execute (eglot-current-server) '(:command "my-command")) The reason this doesn't work is because within eglot-execute, the use of eglot--dcase is configured to only match Command or CodeAction. Command requires that there be a "title" parameter, but this doesn't exist in the workspace/executeCommand request. In fact, if the above "eglot-execute" example is changed to add a ":title" parameter, it will erroneously send a workspace/executeCommand with a title parameter. The following example can be used to illustrate that the Command interface (which is intended for code actions, not for sending an executeCommand) doesn't match for this simple case: (condition-case err (eglot--dcase '(:command "my-command") (((Command)) (message "Matched command"))) (error (message "%s" (cdr err)))) It appears that an ExecuteCommandParams interface should be added to eglot--lsp-interface-alist and that a matcher for ExecuteCommandParams should be added to the eglot--dcase in eglot-execute. Additionally, the Command matcher should be changed to not send the "title" parameter in the subsequent workspace/executeCommand request.