From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45054: 27.1; Can get point into the middle of a run of characters with a replacing display spec Date: Sat, 05 Dec 2020 22:12:48 +0200 Message-ID: <83o8j8au67.fsf@gnu.org> References: <83sg8kb514.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18202"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45054@debbugs.gnu.org To: Zack Weinberg Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 05 21:14:10 2020 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 1kldwY-0004e5-Eo for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Dec 2020 21:14:10 +0100 Original-Received: from localhost ([::1]:54316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kldwX-000806-HE for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Dec 2020 15:14:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kldwQ-000800-GP for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2020 15:14:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36764) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kldwQ-0004ie-90 for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2020 15:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kldwQ-0003Mg-2r for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2020 15:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Dec 2020 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45054 X-GNU-PR-Package: emacs Original-Received: via spool by 45054-submit@debbugs.gnu.org id=B45054.160719919012864 (code B ref 45054); Sat, 05 Dec 2020 20:14:02 +0000 Original-Received: (at 45054) by debbugs.gnu.org; 5 Dec 2020 20:13:10 +0000 Original-Received: from localhost ([127.0.0.1]:48310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kldvZ-0003LQ-RT for submit@debbugs.gnu.org; Sat, 05 Dec 2020 15:13:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kldvY-0003LD-7v for 45054@debbugs.gnu.org; Sat, 05 Dec 2020 15:13:08 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50183) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kldvT-0004Oh-32; Sat, 05 Dec 2020 15:13:03 -0500 Original-Received: from [176.228.60.248] (port=3283 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kldvR-0007qx-Vm; Sat, 05 Dec 2020 15:13:02 -0500 In-Reply-To: (message from Zack Weinberg on Sat, 5 Dec 2020 15:00:30 -0500) 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:195054 Archived-At: > From: Zack Weinberg > Date: Sat, 5 Dec 2020 15:00:30 -0500 > Cc: 45054@debbugs.gnu.org > > On Sat, Dec 5, 2020 at 11:18 AM Eli Zaretskii wrote: > > > 1. Is this indeed a bug in Emacs? > > > > Probably a bug in adjust_point_for_property. Try your recipe after > > setting global-disable-point-adjustment non-nil. > > No change, but set-variable doesn't recognize that variable (so I used > setq instead) Is this variable possibly only available in development > trunk and/or in an Emacs compiled with internal debugging enabled? No, it just isn't a user option, just a variable. > > A workaround in Lisp? Try making the affected text, or some of it, > > invisible, i.e. give it the 'invisible' text property as well. (I > > didn't try to test this solution, so I cannot promise it will work.) > > That makes the situation worse: with the mode enabled, I can separate > point from the visible cursor just by attempting to move the visible > cursor over the displayed ¶. Then I guess your method of putting the display property really freaks out the mechanism of adjusting point to move it out of this and other similar properties. > > > 3. I think it would be better UI if the C-d in the recipe deleted the > > > entire run of text that’s getting hidden (more generally, deletion > > > commands should behave as if the ¶ is really what’s in the buffer). > > > I can’t figure out how to implement that, can you suggest anything? > > > > Why can't you delete every character around point that has this > > special property? > > I don't know how to do that. What part is missing? Implement a command that uses next-property-change and previous-property-change to find where the property starts and ends, then delete all those characters. Am I missing something?