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 10:00:52 +0800 Message-ID: <01206f38-741a-b75b-4efe-ecf7c70c6d61@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> 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="37714"; 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: Ash , 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 04:01:18 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 1plgqM-0009i9-6O for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 Apr 2023 04:01:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1plgq5-0004sV-Jj; Sun, 09 Apr 2023 22:01:01 -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 1plgq3-0004sD-4R for help-gnu-emacs@gnu.org; Sun, 09 Apr 2023 22:00:59 -0400 Original-Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1plgq1-000647-D6 for help-gnu-emacs@gnu.org; Sun, 09 Apr 2023 22:00:58 -0400 Original-Received: by mail-pj1-x102b.google.com with SMTP id px4so715450pjb.3 for ; Sun, 09 Apr 2023 19:00:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681092056; x=1683684056; 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=5GREkfefXS4KWP0YcsPoPp5N9qpeLuLOYZiDIcPsYNc=; b=Prewl1QX1JhZ9Iwjg5D8Y6rBtHG32coSXIWc7qIjCMTDG9RJ9ShJpzTjPsrsVDxjcm XZ1WXAussOMoERwm4c0ko3czHz05MfopytiumerZEwgfzXy1sw0PXeGa1AogjANJwPQr DeY/hP8ufcn8s7co0KvSxz5X7QFlvmqf6bddtQk1tJudg0+zOYinLFmDBd6X8pE5m8kl LkJD1X63GhclkihDG0GYhANwykHhO6+yNMz93+OXqjnGEK+YbR5ATBFWzlYi2Z4PuSA1 JjgTjiuasFHZV3BnlhvJOPS/GEk5WAx+bPVGvbTpPsjeZkoOiXskIxOfc+Pd69Vbn7xn pKfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681092056; x=1683684056; 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=5GREkfefXS4KWP0YcsPoPp5N9qpeLuLOYZiDIcPsYNc=; b=tdOQkGiJnMSUCGtvZHfKRO3Wu+4Jamcljxj+fXntKj51Tt0F80kUFNfwhIkRNMpOUC y5S72yRo5VlvZFOjB4qXbrJ0OmRRCzAYKiYgtCa48Mb04HzVtC9xy3BHyI1LiUWRPLrE 0ZN+RBIuSi7sLQzGYWX1XtU9f9lWiQMCZQu0KcSuAAgqt8vunFqcET5hmITVKNWtSAHs CCbnct8eohNGoPE5KEaxRjTeVRBm67E3LGpMbRJInMfTcVidndniqDjoNyEGCYqJ0Ged HnqD6NtT6RS2GJw2f/UePRHoK4Yn9dvZWJ/DV0nQ0XZP0Jw3we764htIDk004rBYsVGG 0ebg== X-Gm-Message-State: AAQBX9drq9f70EEYvtVU6Mkl9N7rvdQb9ID4SuIrCESs5QuE2FGoebM8 WDirys6Jm/voLYP9MIMkF6oCr+AVR/xytQ== X-Google-Smtp-Source: AKy350Y9n41hdbhpeAJjZ0aY+kvSfEIysrOc0/IFukgeK/v4UlY0PxpWupOI/DKXHGQDH1VvqPAYmw== X-Received: by 2002:a17:902:da89:b0:1a3:c8c2:c322 with SMTP id j9-20020a170902da8900b001a3c8c2c322mr13218592plx.29.1681092055685; Sun, 09 Apr 2023 19:00:55 -0700 (PDT) Original-Received: from [192.170.1.133] ([103.24.106.35]) by smtp.gmail.com with ESMTPSA id 10-20020a170902c10a00b001a2130e2cc0sm6534424pli.160.2023.04.09.19.00.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 09 Apr 2023 19:00:55 -0700 (PDT) Content-Language: en-US In-Reply-To: <2314d321-040a-4466-afdb-4317df7e6584@app.fastmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=platon7pronko@gmail.com; helo=mail-pj1-x102b.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:143237 Archived-At: On 2023-04-10 04:44, Ash wrote: > Yeah, I think doing this "right" might require adding a new property to overlays/strings (or giving an existing property a new value) to enable this behavior and modifying C code. Not sure how viable that is or if it's something the devs would want. I think it's even worse than adding a property to the overlay. You need common point manipulation functions to account for possibility of inlays, i.e. (point) for position before and after inlay will be returning different values, (forward-char) will correctly advance the point from the left side to the right side of the inlay, etc. (on second thought, making (point) return different values for positions around overlays sounds horrifying, because this will break about half of all Elisp code written) But inlay hints seem to be a common functionality for any modern IDE nowdays, so it might make sense to support them natively, without making major-mode developers resort to horrible hacks like described before. -- Best regards, Platon Pronko PGP 2A62D77A7A2CB94E