From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master 370d403: Explain in the manual how to make `cursor-intangible' work Date: Sun, 14 Nov 2021 13:24:50 -0500 Message-ID: References: <20211114021443.12484.87085@vcs0.savannah.gnu.org> <20211114021444.BD421209C6@vcs0.savannah.gnu.org> <8735ny7m7e.fsf@gnus.org> <87r1bi4ncs.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18270"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 14 19:25:47 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mmKCJ-0004Zd-CQ for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Nov 2021 19:25:47 +0100 Original-Received: from localhost ([::1]:41966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmKCI-0004Ll-0E for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Nov 2021 13:25:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmKBg-0003bJ-Rq for emacs-devel@gnu.org; Sun, 14 Nov 2021 13:25:09 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26493) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmKBX-0007fs-63 for emacs-devel@gnu.org; Sun, 14 Nov 2021 13:25:07 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 340F6805E4; Sun, 14 Nov 2021 13:24:57 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4032980043; Sun, 14 Nov 2021 13:24:51 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1636914291; bh=X/1X2IwPYiCN2rBXvtSt9WCbCaogvhMhLvAXbLDZpKE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=WGgE8pRlLKrUwJuCbjU9pGWAGo7dTAXLrwpKEvcsgeRMY3BccQ1UyrdDN3UuLcNK0 nRVADldzXxvGK5zyrbL8scLVceJSvM7uSMUUUoO2VPBgrfJVC78aqJm9QREK7ySLjj AeVPRrDQHuRuwRK9tdvgk5f9rgTBImGnpXvM22nyQTUCFiBUR5MyJOwzYvChHojw4Y d71mhkHIMIms7OesZFXMJBsJtRa4yx0PwLpqWu+cM63PUaU/PL37Nef6siGtCKndYL EgvMpKTmx7+4jJQQOtjns25QXk5RnO0E/OQhmVmOHgcEvBtwn+8o/fJLhQClLaVzf8 q3tfMvDXp/BLg== Original-Received: from pastel (unknown [45.72.128.33]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1682C12080E; Sun, 14 Nov 2021 13:24:51 -0500 (EST) In-Reply-To: <87r1bi4ncs.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 14 Nov 2021 19:13:23 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -39 X-Spam_score: -4.0 X-Spam_bar: ---- X-Spam_report: (-4.0 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279434 Archived-At: Lars Ingebrigtsen [2021-11-14 19:13:23] wrote: > Stefan Monnier writes: >> I don't have a preference, but I feel like the text should try and >> explain that there are options and that the example is just >> one approach. At the same time, it seems "out of scope". >> >> I guess what I'm getting it is that we should not have to clarify this >> here but should instead point to some other place that explains those >> issues in general. >> >> Maybe we should point out that the effect of the property is only >> relevant on *positions* between chars, as defined by >> `get-pos-property`. > > Have some mercy on the poor, poor programmers. They just want to insert > some characters into the buffer that the cursor skips over, not gain > deep, lasting insights in the Emacs display machinery. > > An example is worth more than three essays on intervals in general. Note that in your example of 5 X where you want the cursor to be able to jump from "just before XXXXX" to "just after XXXXX", your 5 X are not "intangible" since you can jump from before to after (you might call them "atomic" maybe, but "intangible" doesn't seem quite right). That's why the code behaves as it does: If you have " XXXX " and want to make "XXXX" intangible (i.e. make it so the cursor pretends that "XXXX" isn't there, i.e. it takes two `C-f` to move from beginning to end), then you place `cursor-intangible` on those "XXXX" and nothing more. No special "extra char" or stickness involved. Stefan