From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Platon Pronko Newsgroups: gmane.emacs.help Subject: Re: Moving point around empty overlays with 'after-text Date: Mon, 10 Apr 2023 13:48:55 +0800 Message-ID: <441f52ef-10e5-1b3b-c2c9-e1c79dd09190@gmail.com> References: <9b1654ec-1ac6-4936-860b-2d77dcc4dac7@app.fastmail.com> <28954f0d-205d-b322-4a43-cf4481d1266e@gmail.com> <3a1bb709-d00f-49b8-a2c5-d0ac5b6a82c4@app.fastmail.com> <22b315db-39eb-80b6-1a7c-127f5e703dc1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34371"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 10 07:49:52 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 1plkPY-0008nM-RE for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 Apr 2023 07:49:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1plkP8-0008BM-AM; Mon, 10 Apr 2023 01:49:26 -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 1plkP3-0008B3-Ux for help-gnu-emacs@gnu.org; Mon, 10 Apr 2023 01:49:23 -0400 Original-Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1plkOz-0006XL-QR for help-gnu-emacs@gnu.org; Mon, 10 Apr 2023 01:49:20 -0400 Original-Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-632614f573aso590513b3a.2 for ; Sun, 09 Apr 2023 22:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681105740; x=1683697740; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=BoH2oZTgvJ/m7Sc5CaE5eIkSuyAE2lL5I3uxDBzr3ak=; b=U85S/2JIt5IZupNFHDHX0RV97gjx42504Seob1U//aEPaYrk8nvUSXzwPUY5apM5xq HFif0aAXXxqzWLwwgU/Gpj+3Tcgr2M8XRCbPyQQ2BBcevD4vsXG+JQJBlqb4aUJiHW8L hM2c/1fKlbpLaFO7qF9yShyvSHiVgLOjXeKu3wAhel7GdGxXnk6HA0PGlvR8HTEbrcWS F7MDJFhh/jKS6k0Y5QMBzrPG8XDra5QIRYZClNnd6ckOBR0dHNIHm7/f24FmKjAyahu6 Ja/SXnWVCyWVtD7DBV13Kx4Xzz/iqepNiVUmwdX7nGwDA7sv9FsaNjNjDyYNp+wLMGVW Px7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681105740; x=1683697740; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BoH2oZTgvJ/m7Sc5CaE5eIkSuyAE2lL5I3uxDBzr3ak=; b=1gy5z/2jXajRHKTUjqCyAc44qxf9b1x5g9V44GMDGcGr/gGgqHN5TfFbkROz0vYR97 sbPLKnBe7ybyLDRkta7+VTpoeDUj1bMNFhSHDSh9opRA5NfC0GqmC5mtEJxMTgGYOyIY tgr8Gz+TIwn0Bq0CYi5B89uii0kVMDrFcIna96YcFGZ0or5Eh+UQM9451U5fjlDZd7mb wzTXk/kTOM+elzMSGPo60mSQBGrU3Rh+xUr7dr2/Qu+ofEp9fLOcv14uZ+7WiLXu+eem EMbHqo5BzsEvchsA2Yc3lTYoy/vg5KQtiVQX70Clg4at8wGstzyaExNSsXnY5juuqiwa 74dw== X-Gm-Message-State: AAQBX9eJgYTO8ukc2tnsde9jO0mjRzv7FwsHYGKjv5kp/6E2bN2QIZzC RzNW0mRhRCZNsyPWC4R/JWnrBhL1qzgWAQ== X-Google-Smtp-Source: AKy350amvELtFcPzTITZJzlqQGDZkdchL76ng1FjcpQLKMxrJjl+BNBbQHjUIVjNpTqbvVJgrYmQIA== X-Received: by 2002:a62:1784:0:b0:62d:df1a:167c with SMTP id 126-20020a621784000000b0062ddf1a167cmr9617019pfx.1.1681105740075; Sun, 09 Apr 2023 22:49:00 -0700 (PDT) Original-Received: from [192.170.1.133] ([103.24.106.35]) by smtp.gmail.com with ESMTPSA id h4-20020a056a00170400b0062e032b61a6sm7089559pfc.91.2023.04.09.22.48.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 09 Apr 2023 22:48:59 -0700 (PDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=platon7pronko@gmail.com; helo=mail-pf1-x42c.google.com X-Spam_score_int: -49 X-Spam_score: -5.0 X-Spam_bar: ----- X-Spam_report: (-5.0 / 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, NICE_REPLY_A=-2.888, 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-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:143247 Archived-At: On 2023-04-10 13:35, tomas@tuxteam.de wrote: > For non-zero width overlays, it is quite easy to have > point to each side of the overlay's "border": it depends > on which side you are coming from. For me, at least, it > is intuitive. Does it work that way for you? For me the default non-propertized overlay always shows the cursor at the end, regardless of which direction I arrived from. Here's the test file I used: ``` ABEF (defun test-overlay-cursor (completion pt) (remove-overlays) (save-excursion (let* ((p-completion (propertize completion 'face 'error)) (ov (make-overlay pt pt nil t t))) (overlay-put ov 'display "") (overlay-put ov 'after-string p-completion))) (goto-char 0)) (test-overlay-cursor "CD" 3) ``` I can navigate so I see "AB{CD}EF" or "AB{CD}EF", but I can't get the cursor to be before the overlay: "AB{CD}EF". Of course one can add properties to the overlay to get the cursor be positioned always in front, but then you can't get to show it at end. The main point of the discussion is that it would be nice if it would be possible use usual navigation commands to get from "AB{CD}EF" to "AB{CD}EF". -- Best regards, Platon Pronko PGP 2A62D77A7A2CB94E