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:37:37 +0800 Message-ID: <353c12ab-fddd-c7da-c8bc-065a2c8a26e9@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> <2314d321-040a-4466-afdb-4317df7e6584@app.fastmail.com> <01206f38-741a-b75b-4efe-ecf7c70c6d61@gmail.com> <66d58398-8eb5-4d89-8e7c-4400f180448f@app.fastmail.com> <83lej0l3w5.fsf@gnu.org> 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="22244"; 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 To: Eli Zaretskii , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 10 07:38:04 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 1plkE7-0005hs-Su for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 Apr 2023 07:38:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1plkDq-0006KH-9h; Mon, 10 Apr 2023 01:37:46 -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 1plkDp-0006K8-CY for help-gnu-emacs@gnu.org; Mon, 10 Apr 2023 01:37:45 -0400 Original-Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1plkDn-0004KE-Lx; Mon, 10 Apr 2023 01:37:45 -0400 Original-Received: by mail-pl1-x62c.google.com with SMTP id p8so3872683plk.9; Sun, 09 Apr 2023 22:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681105061; x=1683697061; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4H2205KD0O3lVscH1p3OE2BUikbOA+tUMzrHPw9pmfQ=; b=UnEbXa5I/Xuts4nyPgbiEffLSLo/THZZV8p82VAgSGj+447WVwp++TchsjfY0b+TKM NI2N9fYZGPIE73mNIx1EVDzDP3UaVFMtkJB5ZFAbZ5wHNOotGXjJmqveiFn8JCismeDq wLV6b386aqMoZJm59RJmadzbixLyGIz1a1o7YubnvZNkImjK9e0RdD820Ui6y58fnmf2 +Q0jTm/CpkfzdPP4C1CX72KEGcJLDOd9a4KpKPEY1zvRlc77bqhZM88e6tHGRVDbk9H9 oosMQjaI3E/noQSLyl+fHqf2y2UvXA5VyV1F6Fm/gHvK98WI8ZqFBaStGYx5KVGTRx7/ 3Biw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681105061; x=1683697061; h=content-transfer-encoding:in-reply-to:from:references: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=4H2205KD0O3lVscH1p3OE2BUikbOA+tUMzrHPw9pmfQ=; b=5hYOTtVwKXqSc829M4JtMkgs8SGNGAJLc2MF6jsYs4h1ZF6pgdb3N/r6N013l/GuCb +MffGJ8s7gnaD3N9VHiofd34XwqmiDinpa3M2UAMDo+0iUZEppnMl6Mr6oNRvO0/A0VX A8wTGpHvQ1whjydIcsX5Ipv6ls078Cz+ERbj2LYlD/B+67jNUgIq9ubux2iTvuAJciyw hFaLzXWoCfcaOnGOdITTMG5nHwzfMVSN84QU9i2Y0R0Nu5HJ7rK3ohIOwOcSwgShtuoC V9GFT6DvTFMKBkznZaG0MFhtoFNWY2IHz8S5XJwX0S0zmIVde3Md9iyvrHVp+w2z0X3b jqbQ== X-Gm-Message-State: AAQBX9dypfiAoxoQ0Ty2F6fKEQzkQT/DyniKanzcR53aIAA/yjnw1Mvl aJMswN020lG6Y6ZO/PAdHAGb280s9UMJ1A== X-Google-Smtp-Source: AKy350Zrn+6bh3eVS69TLKP2K0f63jtEv8enR8qLw9/iSoGt8lL20fXeUxnPJMwlyd5di6B3GUzOmQ== X-Received: by 2002:a17:902:b58d:b0:1a1:cc60:73ec with SMTP id a13-20020a170902b58d00b001a1cc6073ecmr10994758pls.38.1681105061167; Sun, 09 Apr 2023 22:37:41 -0700 (PDT) Original-Received: from [192.170.1.133] ([103.24.106.35]) by smtp.gmail.com with ESMTPSA id i2-20020a1709026ac200b001a4fecf79e4sm6591265plt.49.2023.04.09.22.37.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 09 Apr 2023 22:37:40 -0700 (PDT) Content-Language: en-US In-Reply-To: <83lej0l3w5.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=platon7pronko@gmail.com; helo=mail-pl1-x62c.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:143246 Archived-At: On 2023-04-10 13:09, Eli Zaretskii wrote: > How is this different from the front-advance and rear-advance > arguments you can specify when creating the overlay. front-advance and rear-advance control if the typed text should be included in overlay. In case of inline type hints, typed text never needs to be included. As I understand it, no combination of front-advance and rear-advance will allow overlay to stay in-place if something is typed at start point. Example: {hint} => type A => {hint}A > Did you look at how set-minibuffer-message succeeds in setting the > cursor? did you try using the same technique? > > Did you try both before-string and after-string overlays? > > Did you try non-"empty" overlays, i.e. those whose start and end are > not the same buffer position? They can have before-string and > after-string properties as well. I did. All these examples are about consitently positioning cursor before or after overlay at all times, and they of course work. But none of them allow cursor position to move from beginning to the end of overlay without nasty hacks with detecting cursor position and manually changing overlay properties. > And that is even before considering whether overlays are the best > infrastructure for implementing this stuff in Emacs. It definitely feels they are not :) Even the name says "overlay", while they are overlaying nothing in this case. What can be used instead?