From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#23079: 25.0.92; Movement commands leave cursor in invisible line Date: Tue, 22 Mar 2016 12:16:12 -0400 Message-ID: References: <87oaa77fev.fsf@web.de> <8737rj79cp.fsf@web.de> <871t72cxhh.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458663451 17206 80.91.229.3 (22 Mar 2016 16:17:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Mar 2016 16:17:31 +0000 (UTC) Cc: 23079@debbugs.gnu.org, jonas@bernoul.li To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 22 17:17:19 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aiOzY-000276-QL for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Mar 2016 17:17:13 +0100 Original-Received: from localhost ([::1]:38238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiOzY-0002Mc-9A for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Mar 2016 12:17:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiOzT-0002Jc-Jz for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 12:17:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiOzO-00080J-Ku for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 12:17:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiOzO-00080D-Hf for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 12:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aiOzO-0000IY-EG for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 12:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Mar 2016 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23079 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 23079-submit@debbugs.gnu.org id=B23079.14586633811083 (code B ref 23079); Tue, 22 Mar 2016 16:17:02 +0000 Original-Received: (at 23079) by debbugs.gnu.org; 22 Mar 2016 16:16:21 +0000 Original-Received: from localhost ([127.0.0.1]:60204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiOyi-0000HP-Mq for submit@debbugs.gnu.org; Tue, 22 Mar 2016 12:16:20 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:52141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiOyg-0000G7-OA for 23079@debbugs.gnu.org; Tue, 22 Mar 2016 12:16:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A5FgA731xV/5a2xEVcgxCEAoVVwD6CTQQCAoE8PBEBAQEBAQEBgQpBBYNdAQEDAVYjEAs0EhQYDSSINwjPIwEBAQEBAQQBAQEBHos6hQUHhC0Fm2SDRpQVgUUjhBQigngBAQE X-IPAS-Result: A0A5FgA731xV/5a2xEVcgxCEAoVVwD6CTQQCAoE8PBEBAQEBAQEBgQpBBYNdAQEDAVYjEAs0EhQYDSSINwjPIwEBAQEBAQQBAQEBHos6hQUHhC0Fm2SDRpQVgUUjhBQigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="197764325" Original-Received: from 69-196-182-150.dsl.teksavvy.com (HELO pastel.home) ([69.196.182.150]) by ironport2-out.teksavvy.com with ESMTP; 22 Mar 2016 12:16:12 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id CFBF663F25; Tue, 22 Mar 2016 12:16:12 -0400 (EDT) In-Reply-To: <871t72cxhh.fsf@web.de> (Michael Heerdegen's message of "Tue, 22 Mar 2016 17:02:02 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115332 Archived-At: >> > Seems that works only for the invisible text property. In Magit, >> > they use overlays to make text invisible, and stickiness of text >> > properties has not effect there. >> For overlays, you need to use the insertion-type of the beg/end marker. >> See the FRONT-ADVANCE and REAR-ADVANCE args of make-overlay. > Hmm, that doesn't seem to work: > (progn > (insert "111" "\n222\n") > (let ((beg (point)) end) > (insert "333\n444\n") > (setq end (point)) > (insert "555\n666\n") > (overlay-put > (make-overlay beg end nil t t) > 'invisible t) > (goto-char 1) > (hl-line-mode +1))) The default "stickiness" of overlay boundaries is the inverse of that if text-properties, for some reason. So, this test above suffers from the bug#19200, but other than that, it seems to work correctly for me (i.e. it prefers putting point in front of "333" rather than in front of "555"). And if I remove the "nil t t" args to make-overlay, then point-adjustment correctly tries to put point in front of "555" instead of putting it in front of "333". At least, in my tests, Stefan PS: Notice that the hl-line-highlighting is sometimes off, because it's performed in post-command-hook, which is run *before* point-adjustment. hl-line-mode should probably be changed to use pre-redisplay-function to try and avoid this problem.