From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ash Newsgroups: gmane.emacs.help Subject: Moving point around empty overlays with 'after-text Date: Fri, 07 Apr 2023 22:46:19 -0700 Message-ID: <9b1654ec-1ac6-4936-860b-2d77dcc4dac7@app.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25479"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.9.0-alpha0-334-g8c072af647-fm-20230330.001-g8c072af6 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 08 10:57:31 2023 Return-path: Envelope-to: geh-help-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 1pl4O1-0006Mz-J9 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 08 Apr 2023 10:57:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pl4NU-0007ON-4B; Sat, 08 Apr 2023 04:56:56 -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 1pl1Q7-0001w6-Ex for help-gnu-emacs@gnu.org; Sat, 08 Apr 2023 01:47:27 -0400 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pl1Q5-0004tj-1R for help-gnu-emacs@gnu.org; Sat, 08 Apr 2023 01:47:27 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 12B37320046E for ; Sat, 8 Apr 2023 01:47:20 -0400 (EDT) Original-Received: from imap42 ([10.202.2.92]) by compute3.internal (MEProxy); Sat, 08 Apr 2023 01:47:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catgirl.ai; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1680932839; x=1681019239; bh=RaAzYMcPYQk6fP7AsVYbZwSE+ iIk+p5S8nIlHKp+ta8=; b=xnG1jR436k7YBPbrtRIv4JY+A7H1/RiFR4NvhX66S CdPpC7igAoCbqiKT63FEcePYGxdZVmxvbDToPdQzb9p96OKk1A4Pfp/uEA6fxQ3g /HmgAvvmlCxkvjBUrfwhnJXI1eDcUlH1H35sAvoi12YpWu+DbvqcK4STY/yU9Goi 8WI04HcN5gTNVqEtd4rNiMrSYewNoOC5dGeyswf+Nmu3YfHihzYf24hv/0Qwk9F0 aTGl7QQk289WurzZr/oqm2alDSjBhfkdlB8ISUZobXJk2NiDxuUgONQOaC6wzJ3S u1DaUI9GJq6uw343KdOzKX8KOAUtuZhdPx4AzNDOyWILQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1680932839; x=1681019239; bh=RaAzYMcPYQk6fP7AsVYbZwSE+iIk+p5S8nI lHKp+ta8=; b=ujwiVtu8HTjks4Gl/aJXTY2VbplCK/bEmP7+3Lvl5SSzxCodCxq zkkY7QJ8i4xStWajfGqsKaAZD9K3jXBHREETAiMUiPcZKM9RTwxVaICgPnu0eXzO tCdYRUkR5WvD2vaKE77hkKARIDghMyCB0m8Gll/VwkGzUC1c2HYFTpFind2CflLA 7T9er6X18MVNsQNpAL4on5bCMCp9wzPdhBueKeL0fosg2s47idkT2ELgWfHVN6R5 AaS4cRAXoNtAZWg6B7HsY+qWhCEFPaXah0lCLmXB9I+YFWCy///TanW+aKQQmqpS 66PrCnP+IgSVvluKTAn1gnlV4A1piNApsaQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejiedgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsegrtderre erredtnecuhfhrohhmpeetshhhuceovgigthdtlhestggrthhgihhrlhdrrghiqeenucgg tffrrghtthgvrhhnpeefjeettdehhfdukeffhfehuedtueeguddtvdfhffehudetffelgf evheekfeetheenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepvgigthdtlhestggrthhgihhrlh drrghi X-ME-Proxy: Feedback-ID: i98e14743:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 53571BC007D; Sat, 8 Apr 2023 01:47:19 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Received-SPF: pass client-ip=64.147.123.19; envelope-from=ext0l@catgirl.ai; helo=wout3-smtp.messagingengine.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, HTML_MESSAGE=0.001, 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-Mailman-Approved-At: Sat, 08 Apr 2023 04:56:41 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143223 Archived-At: https://github.com/emacs-lsp/lsp-mode/issues/3263 is a bug in lsp-mode (emacs's own eglot has the same bug as far as I can tell) that appears to boil down to the behavior of emacs overlays and after-string. That is, if your buffer looks like let my_value{: Vec} = vec![0, 1, 2]; (where the curly braces indicate the after-string property of an overlay), you need to put your cursor *after* the overlay to insert text at the end of the variable name, which comes *before* it, and it's impossible to put your cursor immediately between the overlay and the preceding text. I assume the behavior the user desires is that you can put your cursor either immediately before or immediately after the overlay and insert text, and that pressing the left/right arrow would move you over the overlay but leave the actual position of point unchahnged. My suspicion is that this isn't fixable just by setting the right text/overlay properties, since both the cursor locations immediately before and after the overlay actually correspond to the same location in the underlying string. But I'm not good at text property arcana. Any advice?