From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.bugs Subject: bug#47603: comint sets '(rear-nonsticky t) on entire prompt, disabling 'cursor-intangible Date: Mon, 5 Apr 2021 14:07:17 -0400 Message-ID: <3D036269-3D25-4F05-8B1E-BF9CB1956326@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_ECFA42AF-E0B1-49A9-8B48-64FF7D552473" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22964"; mail-complaints-to="usenet@ciao.gmane.io" To: 47603@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 05 20:08:10 2021 Return-path: Envelope-to: geb-bug-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 1lTTdx-0005tD-VL for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Apr 2021 20:08:10 +0200 Original-Received: from localhost ([::1]:54904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTTdw-0000PH-Qc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Apr 2021 14:08:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTTdq-0000Oc-6m for bug-gnu-emacs@gnu.org; Mon, 05 Apr 2021 14:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55224) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTTdp-0005ka-VX for bug-gnu-emacs@gnu.org; Mon, 05 Apr 2021 14:08:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lTTdp-0000wt-Pu for bug-gnu-emacs@gnu.org; Mon, 05 Apr 2021 14:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: JD Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Apr 2021 18:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47603 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16176460443588 (code B ref -1); Mon, 05 Apr 2021 18:08:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Apr 2021 18:07:24 +0000 Original-Received: from localhost ([127.0.0.1]:38537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTTdE-0000vo-3Z for submit@debbugs.gnu.org; Mon, 05 Apr 2021 14:07:24 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTTdC-0000vh-LV for submit@debbugs.gnu.org; Mon, 05 Apr 2021 14:07:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTTdC-00006x-HA for bug-gnu-emacs@gnu.org; Mon, 05 Apr 2021 14:07:22 -0400 Original-Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]:41701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTTdA-0005SC-JW for bug-gnu-emacs@gnu.org; Mon, 05 Apr 2021 14:07:22 -0400 Original-Received: by mail-qt1-x82c.google.com with SMTP id x9so9157739qto.8 for ; Mon, 05 Apr 2021 11:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=TT15VXCUSkWQN6DlXMEZCdyBSRmeIUJsXfaFgz2vUKk=; b=oOJWoA3HAZ9FWafezNbmtAukOGrR+LrbM4rD3A80h7WD4+nzmuHPths4Dm0hZktmCa 7ovTjl2OE9gWR+CGOYn3vlYmTubT2O7kH6nu3xofRmzuPViueMekx/GpNKrMwcTxwSZ3 aJGJVbtMypiqXqOOny5OPp9aIt/ByUqBkYF8sjr+Ha3obrmCEgGWevz5ijGjHe1jiupG 903GLAz70gP0ZAg3MycmfcTjE010syYq7/+GN2Af8Hrlrz5AmTm9vUzpL/OdoSgvga0l 7gm7hI/NRqFIEbGyXQOrtEfzr791LiZGASjJDf2DsRtc/2Gr/o7wSZ7ubAf8vmie/Oa1 ilRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=TT15VXCUSkWQN6DlXMEZCdyBSRmeIUJsXfaFgz2vUKk=; b=XXIekf8PWGXN05kMhRMKQ/YHqLMVVOlUrRzIg/FBL5gwgK7Uru4bi8zh0ViuzRVbyJ EkrU31iAzwHlvayaMAkHJcz67yqra8StpsTphwa912i3UjUaBR1M/8bMahAyZTIu9Dpf uZox4seEc/LVyLVZZA54zt+DhvKrU121tqp1rTwkGJikpNGGOhPm1/DaLmAa062XP2Gr fj30NM/77SZ7rJQ6C/ycdae7AYw4sbbt5JiktmVUEZOsj5HuX0xzP1DCR4DK9WbZJ2Te RGY0WWgZ3s7wSQkg/uVGK9+lWD89BRapHYg0Kvk9H212Opipv8azDty+aNDCz91Jk8do WD+w== X-Gm-Message-State: AOAM530do1v1tcAIHDE2dKRUcaPZXjEmskCwiKOxcm1MAr62HYHheO3V oKTgos2tPdsEupbHcXuvJV6nw93weMZhUg== X-Google-Smtp-Source: ABdhPJzjGS/NFcieMPk2i/kI69y8xkRvugsGikj7UDvDBY35IsawwStCd0CkpMPF9P5ipDQFdV6wIA== X-Received: by 2002:ac8:5347:: with SMTP id d7mr23374038qto.259.1617646038914; Mon, 05 Apr 2021 11:07:18 -0700 (PDT) Original-Received: from [192.168.0.116] (cm-134-228-54-223.buckeyecom.net. [134.228.54.223]) by smtp.gmail.com with ESMTPSA id 77sm14382673qko.48.2021.04.05.11.07.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Apr 2021 11:07:18 -0700 (PDT) X-Mailer: Apple Mail (2.3608.120.23.2.4) Received-SPF: pass client-ip=2607:f8b0:4864:20::82c; envelope-from=jdtsmith@gmail.com; helo=mail-qt1-x82c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, 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: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203603 Archived-At: --Apple-Mail=_ECFA42AF-E0B1-49A9-8B48-64FF7D552473 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Comint sets =E2=80=98(rear-nonsticky t) on the entire detected prompt = text, which prevents `cursor-intangible from functioning correctly when = applied to the prompt. As Stefan put it: I suspect the issue comes from the difference between `get-pos-property` = and `get-char-property`: positions (like `point`) are not placed on a = character but between two characters. But text properties only apply to = characters. So the properties that are "on a position" are based on = what properties would a character inherit if it where inserted at that = position. By default text properties are front-nonstick and rear-sticky, so = basically a position gets its properties from the char right before it. = But if you set (rear-nonsticky t), then you get no properties at all at = that position. This causes issues when "applying (rear-nonsticky t) a bit too = generously, e.g. to all the chars in the prompt rather than only to the = last one." --Apple-Mail=_ECFA42AF-E0B1-49A9-8B48-64FF7D552473 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

Comint sets = =E2=80=98(rear-nonsticky t) on the entire detected prompt text, which = prevents `cursor-intangible from functioning correctly when applied to = the prompt.  As Stefan put it:

I suspect the issue = comes from the difference between `get-pos-property` = and `get-char-property`: positions (like `point`) are not = placed on a character but between two characters.  But text properties only apply to = characters.  So the properties that are "on a = position" are based on what properties would a = character inherit if it where inserted at that = position.

By = default text properties are front-nonstick and rear-sticky, = so basically a position gets its properties from the = char right before it. But if you set (rear-nonsticky t), = then you get no properties at all at that = position.

This causes issues when "applying (rear-nonsticky t) a bit too generously, e.g. to all the chars in the prompt rather than = only to the last one."
= --Apple-Mail=_ECFA42AF-E0B1-49A9-8B48-64FF7D552473--