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#70929: 30.0.50; eglot--apply-text-edits prevents point adjustment Date: Mon, 13 May 2024 22:15:07 -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="9049"; mail-complaints-to="usenet@ciao.gmane.io" To: 70929@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 14 04:16: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 1s6hiM-00029y-Uv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 May 2024 04:16:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6hhz-0005On-Om; Mon, 13 May 2024 22:16:03 -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 1s6hhx-0005OM-T2 for bug-gnu-emacs@gnu.org; Mon, 13 May 2024 22:16:01 -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 1s6hhx-00079R-KA for bug-gnu-emacs@gnu.org; Mon, 13 May 2024 22:16:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s6hhy-00054k-0m for bug-gnu-emacs@gnu.org; Mon, 13 May 2024 22:16: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: Tue, 14 May 2024 02:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70929 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.171565293119502 (code B ref -1); Tue, 14 May 2024 02:16:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 May 2024 02:15:31 +0000 Original-Received: from localhost ([127.0.0.1]:36216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6hhS-00054U-Mt for submit@debbugs.gnu.org; Mon, 13 May 2024 22:15:30 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:59770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6hhN-00054M-If for submit@debbugs.gnu.org; Mon, 13 May 2024 22:15:29 -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 1s6hhM-0005Ju-AV for bug-gnu-emacs@gnu.org; Mon, 13 May 2024 22:15:24 -0400 Original-Received: from mail-ed1-f54.google.com ([209.85.208.54]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s6hhK-00073X-I2 for bug-gnu-emacs@gnu.org; Mon, 13 May 2024 22:15:24 -0400 Original-Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-572c65cea55so558258a12.0 for ; Mon, 13 May 2024 19:15:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715652920; x=1716257720; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/BwXpUWWoqNWnwz8iwgA1Dx0iCWfEZMCJAUWkvfyCMc=; b=CizzJAFYq6aomBAd81RVD5EpYtdp0LwFlJhgTVCQkadwknXfveAuB/y7Cy/FwylqTd YNfZkkM0YDN5cOHXRICRw7HRwztXzkgW1erfj2MM+wQ8nhosiYW64H9n4va4i3F7OLQ8 AtXb05efDVYa2+IfAnvrxSkAMFV/KfUGa56xm4B8QCDj3vuW+C2jWxQKEv0OsCGDOMUF apnNjhImssyfggWYkRMG1XuqKJK5lD3WJKP5sWYL0XofCgY91DQsrDgC0tDUYOU4GRz6 EmhFPwcMxuBD8uJ6rItte3AxkIHRG89xrNOjYjvBrvkriYNUBlY9qw1l983v7ury2fMp 9P2w== X-Gm-Message-State: AOJu0YxyfgkdsER8x0MCcsXtsuYs+srE/pdi8C9Zd9VkJGsnS3bOLlTN NU2X5S8eOdVmqz1guAfU/E4u9J4lqEf/3J1J0TFPh+7LFJL6tH2ZnZlvIAKG X-Google-Smtp-Source: AGHT+IGEz2+s8cI+JI66sHSUl74lAsLH7kmxbJfwmH+E5uAR3fJokyYlzfYWZWEwv+MlQnL9TBQaqQ== X-Received: by 2002:aa7:c992:0:b0:572:b0a8:65fd with SMTP id 4fb4d7f45d1cf-573326eddfemr10907873a12.6.1715652919969; Mon, 13 May 2024 19:15:19 -0700 (PDT) Original-Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com. [209.85.218.44]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733c323887sm6982155a12.89.2024.05.13.19.15.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 May 2024 19:15:19 -0700 (PDT) Original-Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a59a609dd3fso863321166b.0 for ; Mon, 13 May 2024 19:15:19 -0700 (PDT) X-Received: by 2002:a17:906:6a10:b0:a59:9636:f3e with SMTP id a640c23a62f3a-a5a118c520bmr1428335666b.33.1715652919177; Mon, 13 May 2024 19:15:19 -0700 (PDT) X-Gmail-Original-Message-ID: Received-SPF: pass client-ip=209.85.208.54; envelope-from=troy.s.brown@gmail.com; helo=mail-ed1-f54.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 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 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:284988 Archived-At: Language Servers may use onTypeFormatting to provide indentation for a buffer. When this happens, the language server will indicate a newline trigger character (in the DocumentOnTypeFormattingOptions). In the Emacs buffer, after hitting RET, point is moved to the next line and a textDocument/onTypeFormatting request is sent from Eglot to the server. The server responds back with the corresponding spacing prefix for the line in newText of the TextEdit response. However, when Eglot applies the text edit to insert this spacing, via eglot--apply-text-edits, it uses save-excursion, and this prevents the point from being pushed to the end of the inserted spacing. It would seem that save-excursion should be avoided when applying text edits. This issue has been observed with the Ada Language Server.