unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: JD Smith <jdtsmith@gmail.com>
To: 47603@debbugs.gnu.org
Subject: bug#47603: comint sets '(rear-nonsticky t) on entire prompt, disabling 'cursor-intangible
Date: Mon, 5 Apr 2021 14:07:17 -0400	[thread overview]
Message-ID: <3D036269-3D25-4F05-8B1E-BF9CB1956326@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]


Comint sets ‘(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."

[-- Attachment #2: Type: text/html, Size: 2600 bytes --]

             reply	other threads:[~2021-04-05 18:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 18:07 JD Smith [this message]
2021-04-13  2:49 ` bug#47603: comint sets '(rear-nonsticky t) on entire prompt, disabling 'cursor-intangible Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D036269-3D25-4F05-8B1E-BF9CB1956326@gmail.com \
    --to=jdtsmith@gmail.com \
    --cc=47603@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).