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#45319: 28.0.50; Redisplay: `forward-char' moves backwards into invisible text Date: Sat, 19 Dec 2020 11:10:48 +0200 Message-ID: <838s9uupnr.fsf@gnu.org> References: <87sg82tjf6.fsf@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19272"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jonas@bernoul.li, 45319@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 19 10:12: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 1kqYHa-0004uq-8S for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 10:12:10 +0100 Original-Received: from localhost ([::1]:36810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqYHZ-0001Q6-5R for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 04:12:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqYHS-0001Pn-0C for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 04:12:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57491) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqYHR-0005uK-Om for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 04:12:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kqYHR-0005w7-K1 for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 04:12:01 -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, 19 Dec 2020 09:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45319 X-GNU-PR-Package: emacs Original-Received: via spool by 45319-submit@debbugs.gnu.org id=B45319.160836907422761 (code B ref 45319); Sat, 19 Dec 2020 09:12:01 +0000 Original-Received: (at 45319) by debbugs.gnu.org; 19 Dec 2020 09:11:14 +0000 Original-Received: from localhost ([127.0.0.1]:40804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqYGg-0005v3-9K for submit@debbugs.gnu.org; Sat, 19 Dec 2020 04:11:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqYGe-0005uq-Q6 for 45319@debbugs.gnu.org; Sat, 19 Dec 2020 04:11:13 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53309) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqYGY-0005a9-H1; Sat, 19 Dec 2020 04:11:06 -0500 Original-Received: from [176.228.60.248] (port=2300 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kqYGW-0005jH-U1; Sat, 19 Dec 2020 04:11:05 -0500 In-Reply-To: <87sg82tjf6.fsf@web.de> (message from Michael Heerdegen on Sat, 19 Dec 2020 07:10:53 +0100) 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:196369 Archived-At: > From: Michael Heerdegen > Date: Sat, 19 Dec 2020 07:10:53 +0100 > Cc: Jonas Bernoulli > > (defvar my-magit-log-show-only-hash-lines-mode-keywords > `((,(rx (and bol space (* any) eol)) > (0 (let ((beg (match-beginning 0)) > (end (1+ (match-end 0)))) > (add-text-properties beg end > (list 'invisible 'my-magit-log-show-only-hash-lines)) > nil))))) > > (define-minor-mode my-magit-log-show-only-hash-lines-mode > "..." nil nil nil > (if (not my-magit-log-show-only-hash-lines-mode) > (remove-from-invisibility-spec 'my-magit-log-show-only-hash-lines) > (font-lock-add-keywords nil my-magit-log-show-only-hash-lines-mode-keywords) > (add-to-invisibility-spec 'my-magit-log-show-only-hash-lines))) > > Now enable that mode in the buffer and M-x font-lock-fontify-buffer. > > When I now move around in the buffer with the arrow keys, it often > happens that when point is at the beginning of a visible line, and I hit > , the echo area shows that point actually has moved backwards into > the invisible area somewhere before that line, but the cursor is placed > at the expected position. Further movement behaves as expected from the > drawn cursor position, just the value of `point' sometimes is > inconsistent, and that can cause trouble (like incorrect section > highlighting in the Magit Log buffer). Does setting global-disable-point-adjustment non-nil and repeating your experiment explain what happens? It isn't a redisplay problem.