From unknown Sun Jun 22 08:10:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51095: 28.0.50; Counter-intuitive `cursor-intangible-mode' behavior Resent-From: Brahimi Saifullah Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Oct 2021 14:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51095 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 51095@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163370510425277 (code B ref -1); Fri, 08 Oct 2021 14:59:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Oct 2021 14:58:24 +0000 Received: from localhost ([127.0.0.1]:51707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYrKK-0006Zc-8z for submit@debbugs.gnu.org; Fri, 08 Oct 2021 10:58:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:52758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYqzS-00062m-0R for submit@debbugs.gnu.org; Fri, 08 Oct 2021 10:36:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYqzR-0004oK-QC for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2021 10:36:49 -0400 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:34400) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYqzP-000461-VU for bug-gnu-emacs@gnu.org; Fri, 08 Oct 2021 10:36:49 -0400 Received: by mail-qk1-x731.google.com with SMTP id t63so4862588qkf.1 for ; Fri, 08 Oct 2021 07:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=Wr8Z7tR9ZTjdYaKTyken8cAmKlwlKmdl1BDLQifsefo=; b=V3iAABAbeySfArg/VGuXJ2NR4COhjW1j7eW7jfZmJUAQ85my0Czx1KBoXO5QxTmBcc FTPE3ReJ7pxERC8YWIMq6y6tzYaYoNqFqgUPs9F1AmR7Knpc5qQQ7ECBg0fWxG9w0Ddk wi0+nQif2W+qsgJCK+/dH6ITMd6Nm3P9LXv+wNgSoO4go+gjqThlf2NXk0T6yjQGQoJw F6NTH9dvxjJp3tFR2h6dM/OTIL71wJWuHx+NrPR/yutf2tKT965WY5Lfk8sUITmRSzCF bGsrYsfKU9vMyGrAehxMU2J9bl9FQNGcH3brSqNQyBYXEh//6+m7eOGgz5s74neWD16L 4D+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=Wr8Z7tR9ZTjdYaKTyken8cAmKlwlKmdl1BDLQifsefo=; b=uOWMjWegTbfAQQ54/OxMKjDVEoHsdQgFrEGgCrAu4jMShHuQylUAid5L+fpq4GVofM kCNN6ZFzARiOGNh63GjkA0hh1Hn4dJDX1tTgRjmFopMu9QARgLzVLLhiyLYmF2LMj8+D w2kzMggcGre9yFMe//lNtKOsDPZexNzLn5LJ6hsFUPaHd/ftyeZKY7GpAv5JRjMUBwHO yIpAavRS/HiwNuuGzR9g+zpn5aV7IEobGgSBkobk9FJWKnW1bU+/k9CZc0W4yutUMhdC JNbyW6VzvFgO2YtnELqxplcM1DLl16wd5n3tgxIa8U9VffUWmdT+zIvWry/Kj9Vklw3A f/tQ== X-Gm-Message-State: AOAM5336hLYhxv5OfCOnqHf3EAdJl/h1lG9D3nyVJp05wquGGbXO7Gnr WRGfoH3GCfie5PMht8pGRgN2ByeWWVM= X-Google-Smtp-Source: ABdhPJwJ3HaSI9+0ZrluPFU8W6c7UflfA/xB9GFutAFMqBVO3Mgr0sCHvLVoutUWqGXdgm0bJ86o6w== X-Received: by 2002:ae9:de02:: with SMTP id s2mr3235018qkf.215.1633703806165; Fri, 08 Oct 2021 07:36:46 -0700 (PDT) Received: from COMPUTADOR ([2804:14d:90bc:8726:1da9:2155:f519:6465]) by smtp.googlemail.com with ESMTPSA id o13sm2196369qkl.102.2021.10.08.07.36.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 07:36:45 -0700 (PDT) From: Brahimi Saifullah Date: Fri, 08 Oct 2021 11:35:11 -0300 Message-ID: <84y273mvog.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::731; envelope-from=brahimi.saifullah@gmail.com; helo=mail-qk1-x731.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, 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-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Fri, 08 Oct 2021 10:58:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Let's start with the following example: emacs -Q M-: (insert "|" (propertize "xxxxx" 'cursor-intangible t) "|") M-x cursor-intangible-mode Result: |xxxxx| ^^^^^ You can't move the cursor here What I expected: |xxxxx| ^^^^^ You can't move the cursor here To clarify, although all the `X's are set to be intangible, you can still move your cursor to the first one. Furthermore, even though neither `|' has a text property, you cannot move your cursor to the last one. I tracked this behavior to the following function: (from cursor-sensor.el, attached for convenience) (defun cursor-sensor--intangible-p (pos) (let ((p (get-pos-property pos 'cursor-intangible))) (if p (let (a b) (if (and (setq a (get-char-property pos 'cursor-intangible)) (setq b (if (> pos (point-min)) (get-char-property (1- pos) 'cursor-intangible))) (not (eq a b))) ;; If we're right between two different intangible thingies, ;; we can stop here. This is not quite consistent with the ;; interpretation of "if it's sticky, then this boundary is ;; itself intangible", but it's convenient (and it better matches ;; the behavior of `intangible', making it easier to port code). nil p)) p))) This is the result of using `get-pos-property' instead of `get-char-property'. If my understanding is correct, the difference in the former is its handling of stickiness. Thus I came up with the following: (insert "|" (propertize (concat (propertize "x" 'front-sticky t) "xxx" (propertize "x" 'rear-nonsticky t)) 'cursor-intangible t) "|") Basically, make the first character front-sticky, and the last character rear-nonsticky. Now it works as expected. The question is: Is this behavior intuitive? Is a Lisp program supposed to know that the portion of the text it has set to be intangible is not actually accurate and must be manually adjusted? To me it sounds not only unintuitive, but also like a bug. In GNU Emacs 28.0.50 (build 1, x86_64-w64-mingw32) of 2021-09-21 built on COMPUTADOR Repository revision: e4a9aa940beb032e97de6d4e4a23c2c9d94fdeb6 Repository branch: master Windowing system distributor 'Microsoft Corp.', version 10.0.19041 System Description: Microsoft Windows 10 Enterprise (v10.0.2004.19041.1237) Configured using: 'configure --with-native-compilation --with-json --with-imagemagick --without-pop' Configured features: ACL DBUS GIF GMP GNUTLS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XPM ZLIB Important settings: value of $LC_CTYPE: pt_BR.UTF-8 value of $LANG: PTB locale-coding-system: cp1252 Major mode: Lisp Interaction Minor modes in effect: cursor-intangible-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cursor-sensor pp cl-extra seq byte-opt gv bytecomp byte-compile cconv cl-print time-date subr-x thingatpt help-fns radix-tree help-mode cl-loaddefs cl-lib iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify dbusbind w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 79446 8863) (symbols 48 7032 0) (strings 32 23818 1385) (string-bytes 1 730132) (vectors 16 14529) (vector-slots 8 305875 14414) (floats 8 30 40) (intervals 56 288 1) (buffers 992 13)) From unknown Sun Jun 22 08:10:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51095: 28.0.50; Counter-intuitive `cursor-intangible-mode' behavior Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Oct 2021 13:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51095 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Brahimi Saifullah Cc: 51095@debbugs.gnu.org Received: via spool by 51095-submit@debbugs.gnu.org id=B51095.163378548011442 (code B ref 51095); Sat, 09 Oct 2021 13:18:02 +0000 Received: (at 51095) by debbugs.gnu.org; 9 Oct 2021 13:18:00 +0000 Received: from localhost ([127.0.0.1]:52482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZCEh-0002yT-Nz for submit@debbugs.gnu.org; Sat, 09 Oct 2021 09:18:00 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZCEb-0002y2-V2 for 51095@debbugs.gnu.org; Sat, 09 Oct 2021 09:17:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZXnJ0zU6gJcqPVN/b+uN86hhbHyH5bAylB4wCuDqcUA=; b=rvGBu8YXd8NMTLsBEjT1r1rRNN TONWgLpbk7N/VFtGwD94WvOm2ZwpMtn5tEM3rVrLPhHqmeI6GJc22Vg9cyEnqYpy/1cW5lijMAcmb Uqzun7UPTg40Ys7f+7MlTZ7TafOlnaGcQnqPev7+0favtQWSjDO3Xcz421pQ4hT+K51E=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZCET-0005iv-Bx; Sat, 09 Oct 2021 15:17:47 +0200 From: Lars Ingebrigtsen References: <84y273mvog.fsf@gmail.com> X-Now-Playing: Tom Robinson's _North by Northwest_: "Atmospherics" Date: Sat, 09 Oct 2021 15:17:44 +0200 In-Reply-To: <84y273mvog.fsf@gmail.com> (Brahimi Saifullah's message of "Fri, 08 Oct 2021 11:35:11 -0300") Message-ID: <8735panxqf.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Brahimi Saifullah writes: > Let's start with the following example: > emacs -Q > M-: (insert "|" (propertize "xxxxx" 'cursor-intangible t) "|") > M-x cursor-intangible-mode > > Result: > |xxxxx| > ^^^^^ You can't move the curs [...] Content analysis details: (-2.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.6 FUZZY_AMBIEN BODY: Attempt to obfuscate words in spam -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Brahimi Saifullah writes: > Let's start with the following example: > emacs -Q > M-: (insert "|" (propertize "xxxxx" 'cursor-intangible t) "|") > M-x cursor-intangible-mode > > Result: > |xxxxx| > ^^^^^ You can't move the cursor here > > What I expected: > |xxxxx| > ^^^^^ You can't move the cursor here I can reproduce the behaviour, but unless I misunderstand something, this seems like it's working as designed. The cursor is really "between" two characters conceptually -- this is easier to understand if you use a "bar" cursor. So if you put the point here: |xxxxx| ^ then it's before the first x and after the first |. (You can confirm by entering a character when it's at that point.) The behaviour at the end is more puzzling, but as you've found out, it's because the properties don't have rear-nonsticky, so you can't put point right after the final x. So I think everything here is working as designed. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 09 09:18:06 2021 Received: (at control) by debbugs.gnu.org; 9 Oct 2021 13:18:06 +0000 Received: from localhost ([127.0.0.1]:52486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZCEo-0002zG-3X for submit@debbugs.gnu.org; Sat, 09 Oct 2021 09:18:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZCEl-0002yF-TS for control@debbugs.gnu.org; Sat, 09 Oct 2021 09:18:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+MZs2+QMMEWpj/3f8wujhkXgYBuGZziUMlbNVmWx18o=; b=ac7wDOaDq8mvvE+loSIfBOXYqf yQzvhjxDXDUsh7JoWozFk4/vmGSIHZdEjZVOmLMLUTYTrUnJ7wfbDK0Gp4DMiHtgc2hhtE8BRuGxL BFMiatWlZr75kcziqkkKqjJwYrIobe4qYS2IJGe+MLOd1cdaDSpXKNUPtV2dng/pQB5Y=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZCEd-0005j3-6n for control@debbugs.gnu.org; Sat, 09 Oct 2021 15:17:57 +0200 Date: Sat, 09 Oct 2021 15:17:54 +0200 Message-Id: <871r4unxq5.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #51095 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 51095 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 51095 + moreinfo quit From unknown Sun Jun 22 08:10:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51095: 28.0.50; Counter-intuitive `cursor-intangible-mode' behavior References: <84y273mvog.fsf@gmail.com> In-Reply-To: <84y273mvog.fsf@gmail.com> Resent-From: Brahimi Saifullah Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Oct 2021 18:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51095 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: 51095@debbugs.gnu.org Received: via spool by 51095-submit@debbugs.gnu.org id=B51095.163380467927756 (code B ref 51095); Sat, 09 Oct 2021 18:38:01 +0000 Received: (at 51095) by debbugs.gnu.org; 9 Oct 2021 18:37:59 +0000 Received: from localhost ([127.0.0.1]:54138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZHEN-0007Dc-9f for submit@debbugs.gnu.org; Sat, 09 Oct 2021 14:37:59 -0400 Received: from mail-vs1-f47.google.com ([209.85.217.47]:37409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZHEI-0007DJ-0S for 51095@debbugs.gnu.org; Sat, 09 Oct 2021 14:37:58 -0400 Received: by mail-vs1-f47.google.com with SMTP id f2so14226166vsj.4 for <51095@debbugs.gnu.org>; Sat, 09 Oct 2021 11:37:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=qhS84IUK0018I+R7ult2ifegzH7l1D7CAXjF0lx8Iv4=; b=JkatPJ88dXOv5hjgL9IiAMqLZ+FRlVKUzDMQD1bkS+78vBBDoRp/Wo2rcfPIT4dUsj uZFhSFOM7DUTeme3SB6cGM4a8qAucFN8DJC2heA1xQ5bXaAv4GVxtZlS7YnWnZG0FzHT Q6MdeXLBstu7vIViviCYAawcD/FdbNyR4d8LlmQ038DkiowlGeM67I8avZzbq/x7DxGD tnghT8iYkVrpwrC1m1tJMYJfOe841NKcD44mUZG9Hy6tbgTxrr2yyoq4vvwzfqoGI6cw hdnLh6Pq8lsizbSsCY3IYNP/OEfAqhFk/SzCStF1FmzbViQFy/KoKicmJR880Frgyw/r s6PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=qhS84IUK0018I+R7ult2ifegzH7l1D7CAXjF0lx8Iv4=; b=AeW0cVwhtmpGKmnHzdx8vog3+wIq6cW5lu8jqXyxgYcGX5j+anE24v3obHbSM/D7ha SgqjLCMpWn2ApryhbX8fToNvdbc+h/+9/KySMprlo4zDf/KAX0kMisPfKqOp+6F6Pb6x LIdpufPKqpxN4k+Jeq1mC4jq+77TRObw7to+mA+Fl8Lf7vekxUn0S6jCb1eR5oqFq7E6 5ay8JzwAdIokPVnheV58ksaAs+b/CD0R7gWbFnXVWsr3daufOzx1jug8Zp8thD8Uiz1X T/gKob6ZnqYO+oaNKwgiOZrqrvSbYXWGz3+HVfXI8E+8CzY6H0Ty/mQs43qDA2rHfpwY Olhg== X-Gm-Message-State: AOAM531kJq2sHu/PGexdBaAsW8WLF8qux9ikhXz49krAXZ3fRPoZl4HH Am7HVtnxsYtjoTbwd64ZLRpTVrR2JQ4= X-Google-Smtp-Source: ABdhPJw9EGEMhw/5xiPJOt3OUOkKnFErK8oMI0Nue7Sj7NP57sz5thmTjKDaGSNwOLOOUrC2yo8Asw== X-Received: by 2002:a05:6102:192:: with SMTP id r18mr17565366vsq.0.1633804668220; Sat, 09 Oct 2021 11:37:48 -0700 (PDT) Received: from COMPUTADOR ([2804:14d:90bc:8726:dd71:f387:43ba:48cd]) by smtp.googlemail.com with ESMTPSA id m184sm1004149vsc.6.2021.10.09.11.37.47 for <51095@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Oct 2021 11:37:47 -0700 (PDT) From: Brahimi Saifullah Date: Sat, 09 Oct 2021 15:36:38 -0300 Message-ID: <84czoeniyx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I see, thanks for the clarification. What really had me confused was that, when your cursor is in that position (the first X), `describe-char' claims: >There are text properties here: > cursor-intangible t Perhaps the manual entry explaining this property should clarify the nuances of the usual character after point v. this concept of point being between the characters. Still, I find this behavior odd from an usability standpoint. I did some grep'ing in the core and ELPA packages to see how often the workaround of front/rear-nonsticky is used. >From a glance I could only find a couple of packages explicitly doing that, but then again you can count the amount of packages extensively using `cursor-intangible' on the fingers of one hand. All in all, not a very conclusive search besides confirming the current behavior is indeed desirable in some situations. From unknown Sun Jun 22 08:10:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51095: 28.0.50; Counter-intuitive `cursor-intangible-mode' behavior References: <84y273mvog.fsf@gmail.com> In-Reply-To: <84y273mvog.fsf@gmail.com> Resent-From: Brahimi Saifullah Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Oct 2021 22:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51095 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Lars Ingebrigtsen Cc: 51095@debbugs.gnu.org Received: via spool by 51095-submit@debbugs.gnu.org id=B51095.163433861631964 (code B ref 51095); Fri, 15 Oct 2021 22:57:01 +0000 Received: (at 51095) by debbugs.gnu.org; 15 Oct 2021 22:56:56 +0000 Received: from localhost ([127.0.0.1]:40571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbW8G-0008JU-LY for submit@debbugs.gnu.org; Fri, 15 Oct 2021 18:56:56 -0400 Received: from mail-ua1-f41.google.com ([209.85.222.41]:37869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbW8A-0008JB-PO for 51095@debbugs.gnu.org; Fri, 15 Oct 2021 18:56:55 -0400 Received: by mail-ua1-f41.google.com with SMTP id f4so133217uad.4 for <51095@debbugs.gnu.org>; Fri, 15 Oct 2021 15:56:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version; bh=fP3+udsjP07+2kDPwjnlzXOEtAxTrqBi4Z3H+ClkHbM=; b=iG4RjNrB3jx3OrAoYvzy37PSCzJyNvTT0crn3dPrnNUM6PYNzsUkXvs1WwQW3uVnzW XT63sSyAJvdkmJ34+cbprK/fD+qUe1pEWlD1IojNK8QiEQM6N+lwSShFRb300o2GTuZr ZI8iJgPYimEy7PuylDnRRDwcaDJVNWEhEswUSQtPg0NZwsKa7IfYXMum2w27xJfYB81m sVPn6qqbA5Bk0XQzz0OigYIe5a1QEu9Uo//Aq4ZgsuCd7//4kkVSJRallO0Xby2wDgIT 3kF8IfNURyGHkRSqXa9a8zKGmQRMOPne6JcQOxZ1bvMu5/egDX8RUV1LRcdYuZuGfn6d 7U7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=fP3+udsjP07+2kDPwjnlzXOEtAxTrqBi4Z3H+ClkHbM=; b=UwqNfauKLLe47aGoiSohEV5DJtgY0RMGxhdjOkOe8/E90Vm+fZ6e9G1DbplFqCpqoe Zv3gTa2K82ArRctP20Dk7/5yHZmLw+hhGZSlYTIqA507Zdm5Pmo7CH6UGPMGVGY1wwip L+KsIgTrg+GGzJoZwmPRq/q2uBlTavD9cBLGRJepPSW25437fH0rdZbr9nmH4KMjXGOy Wj9D/DjViquW/Ft5N67EB2FJs9HzNQtWzoRg2y2nmlpFYmxI3+seR3KlQEx0c8vkXl4u qKuavxOGT4LI/uqPoLfFSj2OE7RrY08wR8SQh8ddA1i8NKHX6f4FVsgCHZJG+P+UIIG6 h4Dg== X-Gm-Message-State: AOAM531rfmSrQ12637rhXL1S5JjIJqKU5ECDXY45xJDS0stLfy12Z5zq yOY61kZ+ecTlPgOG2l3kyQZcTiZe0cE= X-Google-Smtp-Source: ABdhPJzzcuzeT1Ok1MdnrX6Y9eQHMuoW/gU0dAgJ00ARZurUz4HimnqeDawfSXV1NwyuKdEbkENLYg== X-Received: by 2002:ab0:48ea:: with SMTP id y39mr15881950uac.34.1634338605019; Fri, 15 Oct 2021 15:56:45 -0700 (PDT) Received: from COMPUTADOR ([2804:14d:90bc:8726:25dc:9edf:a077:e79a]) by smtp.googlemail.com with ESMTPSA id w27sm4693825vsi.25.2021.10.15.15.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 15:56:44 -0700 (PDT) From: Brahimi Saifullah Date: Fri, 15 Oct 2021 19:56:39 -0300 Message-ID: <84ee8l99so.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ( I realize now I've probably failed to reply properly. I'm resending my previous message, apologies if you've gotten it already ) --------------------------------------------------------------------- I see, thanks for the clarification. What really had me confused was that, when your cursor is in that position (the first X), `describe-char' claims: >There are text properties here: > cursor-intangible t Perhaps the manual entry explaining this property should clarify the nuances of the usual character after point v. this concept of point being between the characters. Still, I find this behavior odd from an usability standpoint. I did some grep'ing in the core and ELPA packages to see how often the workaround of front/rear-nonsticky is used. >From a glance I could only find a couple of packages explicitly doing that, but then again you can count the amount of packages extensively using `cursor-intangible' on the fingers of one hand. All in all, not a very conclusive search besides confirming the current behavior is indeed desirable in some situations. --------------------------------------------------------------------- Addendum: If you disagree, or otherwise can't think of any further improvements to that section (I can't think of any tangible suggestion myself), feel free to close this. From unknown Sun Jun 22 08:10:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51095: 28.0.50; Counter-intuitive `cursor-intangible-mode' behavior Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 02:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51095 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Brahimi Saifullah Cc: 51095@debbugs.gnu.org Received: via spool by 51095-submit@debbugs.gnu.org id=B51095.163685612120417 (code B ref 51095); Sun, 14 Nov 2021 02:16:01 +0000 Received: (at 51095) by debbugs.gnu.org; 14 Nov 2021 02:15:21 +0000 Received: from localhost ([127.0.0.1]:48652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mm53B-0005JF-2Y for submit@debbugs.gnu.org; Sat, 13 Nov 2021 21:15:21 -0500 Received: from quimby.gnus.org ([95.216.78.240]:53534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mm539-0005J0-EE for 51095@debbugs.gnu.org; Sat, 13 Nov 2021 21:15:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jx2Ggfc2GjyFz1t83yVI6FrQMWw5yOq24Ub2Qfmkdyc=; b=qOCh0yN5axONxlY7SrvQxU/aF/ oc7s1VxIfwnTG+LAM+XLNK9yj29bhcicPkDafKll0sK0URdY0mZIMEs5WhyRWMSrA4Z9Uo3JqjDF6 An0lBvNcSR3ldKOGDX1SSKtjbK5Z0eZ0Z8OIYR3qk46L7z+1ABUIX8bUD9ICNcp0e7C0=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mm530-0006F8-BJ; Sun, 14 Nov 2021 03:15:13 +0100 From: Lars Ingebrigtsen References: <84y273mvog.fsf@gmail.com> <84ee8l99so.fsf@gmail.com> X-Now-Playing: Django Django's _Glowing In The Dark_: "The Ark" Date: Sun, 14 Nov 2021 03:15:08 +0100 In-Reply-To: <84ee8l99so.fsf@gmail.com> (Brahimi Saifullah's message of "Fri, 15 Oct 2021 19:56:39 -0300") Message-ID: <87k0hbeb4j.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Brahimi Saifullah writes: > Perhaps the manual entry explaining this property should > clarify the nuances of the usual character after point v. > this concept of point being between the characters. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Brahimi Saifullah writes: > Perhaps the manual entry explaining this property should > clarify the nuances of the usual character after point v. > this concept of point being between the characters. Yup. I've now added an explanation (and a code example) to the entry in the manual in Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 21:15:25 2021 Received: (at control) by debbugs.gnu.org; 14 Nov 2021 02:15:25 +0000 Received: from localhost ([127.0.0.1]:48655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mm53F-0005JW-AC for submit@debbugs.gnu.org; Sat, 13 Nov 2021 21:15:25 -0500 Received: from quimby.gnus.org ([95.216.78.240]:53548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mm53D-0005J5-SE for control@debbugs.gnu.org; Sat, 13 Nov 2021 21:15:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4E6km5wF/UVscQ0O6SnOyQCxTd8C5bU7KActQ1swQ+Q=; b=BVqa+7g6YK8VtsUPFtCx+AGMb3 P2G5/JN3YelRtqh0CrGfwAWctJkKibANqaRor9plXsKatTaS9ixWEoPFst1N//J5app2TumdLKAZU R7Clwo/3SH6ARQEBJu/2D8MC8ltbUosykRsNz2ZHRyIuZ7Etk+AUe20F+WtEBtaK1Xzg=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mm536-0006FG-8L for control@debbugs.gnu.org; Sun, 14 Nov 2021 03:15:18 +0100 Date: Sun, 14 Nov 2021 03:15:15 +0100 Message-Id: <87ilwveb4c.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #51095 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 51095 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 51095 29.1 quit From unknown Sun Jun 22 08:10:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51095: 28.0.50; Counter-intuitive `cursor-intangible-mode' behavior Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 22:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51095 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Brahimi Saifullah Cc: 51095@debbugs.gnu.org Received: via spool by 51095-submit@debbugs.gnu.org id=B51095.163692875615251 (code B ref 51095); Sun, 14 Nov 2021 22:26:02 +0000 Received: (at 51095) by debbugs.gnu.org; 14 Nov 2021 22:25:56 +0000 Received: from localhost ([127.0.0.1]:51938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmNwi-0003xu-51 for submit@debbugs.gnu.org; Sun, 14 Nov 2021 17:25:56 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:5134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmNwb-0003xZ-Nc for 51095@debbugs.gnu.org; Sun, 14 Nov 2021 17:25:55 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8DAD61001C2; Sun, 14 Nov 2021 17:25:43 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A13DB100163; Sun, 14 Nov 2021 17:25:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1636928741; bh=HCDAZV/WCrfZ80PACPxufU/gNRgKYhET5Q1dmnSW3Hw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=OUcvx2nt1CP6OEcLvhaPhpet6H/F6QD5e+A+9N1KgcS3asUdnSPou5g2m9jzyPBgV FbSyziOrO8Uk9Hw3NDbaZ1b3VXGQndwVbiIQP/D0hL6VUiGT1Ajz5elLclA7EWifIB XD/ZW8/LJ0+st4JQRBCCQGimHq3MnlrsYVjWJpaKqbvMgnNRfee2SusqK6BSnWXQ+H qIjhkar42ttFwkaJwDA9emTT2jHoqgqacxXHobOXL8khGwBrjnIHAB4EaMCELfBkg0 deI4817CVDJQlU5lhF4poWDpJs1S/C+s+5jDe/N94mbfNbMPmRRt8Fazo1k/pXM2aj 4zBV3BfMSW4uA== Received: from ceviche (unknown [45.72.128.33]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 70F511202AF; Sun, 14 Nov 2021 17:25:41 -0500 (EST) From: Stefan Monnier Message-ID: References: <84y273mvog.fsf@gmail.com> Date: Sun, 14 Nov 2021 17:25:35 -0500 In-Reply-To: <84y273mvog.fsf@gmail.com> (Brahimi Saifullah's message of "Fri, 08 Oct 2021 11:35:11 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.050 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Let's start with the following example: > emacs -Q > M-: (insert "|" (propertize "xxxxx" 'cursor-intangible t) "|") > M-x cursor-intangible-mode > > Result: > |xxxxx| > ^^^^^ You can't move the cursor here > > What I expected: > |xxxxx| > ^^^^^ You can't move the cursor here > > To clarify, although all the `X's are set to be intangible, you can still move > your cursor to the first one. Furthermore, even though neither `|' has a text > property, you cannot move your cursor to the last one. If you want `xxxxx` to be intangible, that means you presumably still want to be able to move the cursor between the two `|` but the cursor movement should be "as if" the `xxxxx` was absent (so the `xxxxx` will be either attached to the first `|` or to the second). If so, where do you want to place the cursor when it's between the two `|`? One choice is to place it right after the first `|`, another is to place it right before the second `|`. Both choices make sense, AFAICT, and you haven't explicitly specified which you want (other than in this bug report, that is), so the behavior you see looks OK to me. You can control this behavior via the stickiness property. > Basically, make the first character front-sticky, and the last character > rear-nonsticky. Now it works as expected. But now you allow the cursor to be either before the `xxxxx` or after the `xxxxx`, so they're not really intangible any more. It seems you want them to be "atomic" instead, which we do not directly support (you can simulate it by marking the first four `x` as `intangible`, for example). > The question is: Is this behavior intuitive? Depends what you want, obviously. Stefan