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#19200: Point adjustemnt moves *into* invisible text Date: Mon, 21 Mar 2016 11:36:23 -0400 Message-ID: References: <87mvpskb84.fsf@web.de> <87io0gbmpl.fsf@web.de> <87d1qnevco.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458574641 27633 80.91.229.3 (21 Mar 2016 15:37:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2016 15:37:21 +0000 (UTC) Cc: 19200@debbugs.gnu.org, Jonas Bernoulli To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 21 16:37:11 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 1ai1tH-0002p5-Cg for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Mar 2016 16:37:11 +0100 Original-Received: from localhost ([::1]:58463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai1tG-0007jB-Qg for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Mar 2016 11:37:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai1tB-0007gM-UQ for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2016 11:37:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai1t8-0004ef-NZ for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2016 11:37:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai1t8-0004eb-KR for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2016 11:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ai1t8-00081y-GF for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2016 11:37: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: Mon, 21 Mar 2016 15:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19200 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19200-submit@debbugs.gnu.org id=B19200.145857459130831 (code B ref 19200); Mon, 21 Mar 2016 15:37:02 +0000 Original-Received: (at 19200) by debbugs.gnu.org; 21 Mar 2016 15:36:31 +0000 Original-Received: from localhost ([127.0.0.1]:57098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ai1sd-00081D-G7 for submit@debbugs.gnu.org; Mon, 21 Mar 2016 11:36:31 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:12303) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ai1sc-000810-1E for 19200@debbugs.gnu.org; Mon, 21 Mar 2016 11:36:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AxFgA731xV/7yMCkxcgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBBgEBAQEeizqFBQeELQWfF5IUghSBRSOBZoIuIoJ4AQEB X-IPAS-Result: A0AxFgA731xV/7yMCkxcgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBBgEBAQEeizqFBQeELQWfF5IUghSBRSOBZoIuIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="197439930" Original-Received: from 76-10-140-188.dsl.teksavvy.com (HELO pastel.home) ([76.10.140.188]) by ironport2-out.teksavvy.com with ESMTP; 21 Mar 2016 11:36:23 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4805E605A0; Mon, 21 Mar 2016 11:36:23 -0400 (EDT) In-Reply-To: <87d1qnevco.fsf@web.de> (Michael Heerdegen's message of "Mon, 21 Mar 2016 15:52:55 +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:115232 Archived-At: >> The way point-adjustment is defined is too conservative for that. >> So I suggest you try and make you code more robust w.r.t the position of >> point within an invisible region in any case. > Well, we just want that cursor movement starting from a visible position > not end up at an invisible position - the docs seem to suggest that this > should not happen, right? It doesn't guarantee it in all cases, no. E.g. it won't work if the command that moves point started/ended in another buffer, or if the command set disable-point-adjustment, plus a few other cases. > We have the following, very simple situation: > Line N > { M invisible lines here } > Line N+M+1 > Line N and Line N+M+1 are completely visible, and displayed after each > other. Point is at the start of Line N, no invisible text near that > position. Now I hit [down] one time and end up somewhere inside the > invisible text in between. I agree it's a bug. I'm just pointing out that even if we fix this bug, there will be other cases which ae not considered bugs where point will end up in the middle of the invisible text, and where it would be odd for your code to then operate on the selection at the "current line" since that's not the line that the user is actually seeing. So, yes, point-adjustment needs to be fixed (this is bug#19200), but Magit also needs to be fixed anyway (and after that fix, it won't care about bug#19200 nearly as much, I think). Stefan