From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Donovan via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70193: Acknowledgement (eglot: RFE: recenter buffer upon showDocument request) Date: Thu, 4 Apr 2024 09:32:35 -0400 Message-ID: References: Reply-To: Alan Donovan 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="17788"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at To: 70193@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 04 15:33:31 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 1rsNDe-0004Tk-HI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Apr 2024 15:33:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsNDC-0002bh-Bw; Thu, 04 Apr 2024 09:33: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 1rsND9-0002ZN-VP for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 09:33: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 1rsND9-0000we-Lp for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 09:32:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rsNDE-0006CO-Ii for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 09:33:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Donovan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Apr 2024 13:33:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70193 X-GNU-PR-Package: emacs Original-Received: via spool by 70193-submit@debbugs.gnu.org id=B70193.171223757923780 (code B ref 70193); Thu, 04 Apr 2024 13:33:04 +0000 Original-Received: (at 70193) by debbugs.gnu.org; 4 Apr 2024 13:32:59 +0000 Original-Received: from localhost ([127.0.0.1]:60872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsND9-0006BS-F9 for submit@debbugs.gnu.org; Thu, 04 Apr 2024 09:32:59 -0400 Original-Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:35891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsND8-0006Aa-8i for 70193@debbugs.gnu.org; Thu, 04 Apr 2024 09:32:59 -0400 Original-Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1e28d7b03e9so176555ad.0 for <70193@debbugs.gnu.org>; Thu, 04 Apr 2024 06:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712237567; x=1712842367; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VJ0GRwLBeVFy7VvWrPreoJDWccJlvvMbs3SvA3sL430=; b=p+78xC8H/rZtG4jbdr65Sz3Zn+7RAQfLG5ezddRTV4lF88bWmNDZjEWhHJ46tZ/9Wq ETJjhPWLlgPz2fQ89pXmPghHICejufqqzBFhRojDgiOUZQfze4ZSxnKNbfEwoVyLfmrP gqWeZ5B6I9L3lbnqgBHaNdmVS7ccZuFtWxl3AdT2MPnDP+gQadA0HuHhI/JC+furTCqB dfon+3QZrag7kWYes0Pd9phYeikeMNbeE/k/81skpTucIFNPKQ11UZyEY0zl50nVS9YT obFfwm8MzsS8ythVasLHJ33N1pwU0/5i6gegipuTB4Nd7bOFCGoHfu9rS2pFeZd33Rsp V6ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712237567; x=1712842367; 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=VJ0GRwLBeVFy7VvWrPreoJDWccJlvvMbs3SvA3sL430=; b=UUVNf22AwY57bUc5FYB+V1/idXyVVocphSGpINm8W1qmG0iltxJkugsh7Ehfxv/LoR CG4S6bO6NhXf4Q8RJZ0xshCbrmGFOXG/NYh2yjUGyllLBLPxFSgE8lyDwHdN4s3qOPTb Pwk1D+vZlqzVAHhNMcMGzjtsXNZ4qcx5UEXqpL8s45Azi4J4R5K+FuF7BXlbrYOgqsNh xXeDB/vm6MjBQ/SH7EqVZVqkNS0qyXnBrsWgKLDvBRE4ORqbqNjcDJsLmLCZq1rDMxci PEQ1Cb+p0C5Jvsr8gFzA2ySur9VvdmuaTa7OGHpNkQ8dj/xbtHVYCWYjAk9CWBvdHlcx UuwA== X-Gm-Message-State: AOJu0YwgP4j3qxhPdY/yNJz81USVfF55NUxprHMXe80+7gRVCI3kEaKY f/jZoVIQfu/l+YPR85aCgeE5caEdn2yGKOLrxbm9f5mqnWbt+nhVvNNGELAo+1kbUs0WDAMLvOn BYWSE9PJfuvGAMpi5/PjZAUxPtm2LKpiBXFZ89zxkvqYHFODlJrtD X-Google-Smtp-Source: AGHT+IFEMqxS2qbgI0XDrbGvS7ckkyVJS1ckUY0SPnHr7zLFcb0XGViMp++j+6xpKU3j1Q+Dqj5kHPKTwDHT76KUiTY= X-Received: by 2002:a17:903:32ca:b0:1e0:c571:d652 with SMTP id i10-20020a17090332ca00b001e0c571d652mr86371plr.1.1712237566805; Thu, 04 Apr 2024 06:32:46 -0700 (PDT) In-Reply-To: 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:282649 Archived-At: +cc Martin Rudalics (as suggested by Joao Tavora) On Thu, 4 Apr 2024 at 09:17, Alan Donovan wrote: > > In eglot 1.17, the LSP showDocument downcall opens the designated > file, moves the cursor to the designated position, and raises the > frame. One other thing it could do to make it easier to see where the > cursor is would be to recenter the buffer. > > The patch below is a minimal fix; the discussion at > https://github.com/joaotavora/eglot/discussions/1382 suggests a couple > of possible refinements. > > xtools$ git diff ~/.emacs.d/elpa/eglot-1.17/eglot.el{.bak,} > --- elpa/eglot-1.17/eglot.el.orig > +++ elpa/eglot-1.17/eglot.el > @@ -2460,6 +2460,7 @@ THINGS are either registrations or > unregisterations (sic)." > ;; function, but `xref--goto-char' happens to have > ;; exactly the semantics we want vis-a-vis widening. > (xref--goto-char beg) > + (recenter) > (pulse-momentary-highlight-region beg end 'highlight))))))) > (t (setq success :json-false))) > `(:success ,success)))