From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#9034: point adjustment (with invisible text) moves to the next line Date: Wed, 25 Aug 2021 18:32:15 +0200 Message-ID: <87tujd32pc.fsf@gnus.org> References: <87iprb38sa.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36220"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 9034@debbugs.gnu.org To: Dmitry Kurochkin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 25 18:33:11 2021 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 1mIvpv-0009Aq-Eb for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Aug 2021 18:33:11 +0200 Original-Received: from localhost ([::1]:41330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIvpu-0004pc-0e for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Aug 2021 12:33:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIvpm-0004oc-M0 for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 12:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIvpm-0008DD-Dq for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 12:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mIvpm-0006lL-6V for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 12:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 16:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 9034-submit@debbugs.gnu.org id=B9034.162990915125916 (code B ref 9034); Wed, 25 Aug 2021 16:33:02 +0000 Original-Received: (at 9034) by debbugs.gnu.org; 25 Aug 2021 16:32:31 +0000 Original-Received: from localhost ([127.0.0.1]:47486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIvpH-0006jv-J4 for submit@debbugs.gnu.org; Wed, 25 Aug 2021 12:32:31 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:38656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIvpD-0006je-2F for 9034@debbugs.gnu.org; Wed, 25 Aug 2021 12:32:30 -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=qqFxARSoy/1Q6Q4hHH8CDOy0rbPpTNzNlnFy9SppzO0=; b=Qh1CjosBiMa7BN+6gvN9AWvmQ6 6l00YdVQylB/dMAJpJfCnwEvAOSmtqMpAyY4hoLyAFBPsn96uAVEIss99Sa/dp8pFAhIUmlux/Kws wPLBDsIVYD5zsk0mgf3DLe9AOa5BrWoqj3k1PThqhR4emZAlWP8x0jPQX3/5VXtqF19s=; Original-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 1mIvp2-0006YQ-HW; Wed, 25 Aug 2021 18:32:20 +0200 In-Reply-To: <87iprb38sa.fsf@gmail.com> (Dmitry Kurochkin's message of "Sat, 09 Jul 2011 17:04:05 +0400") 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:212657 Archived-At: Dmitry Kurochkin writes: > (progn (switch-to-buffer "test") > (insert "aline1\nbline2\ncline3\n") > (put-text-property 7 14 'invisible t) ; region [\nbline2] > (goto-char (point-min))) > > After that in the test buffer do M-: (progn (end-of-visual-line) > (point)). `end-of-visual-line' moves point to position 14 as expected. > But after that the point is adjusted to position 15, as can be checked > by C-x =. (I'm going through old bug reports that unfortunately got weren't resolved at the time.) This problem is still present in Emacs 28, and as previously noted, any command you do (with `M-:') makes point advance to the next line. (It's not 100% reproducible -- sometimes nothing happens, and sometimes it advances.) So `C-e' and then, for instance `M-: 4 RET' will advance point here. Also as previously noted, if Vglobal_disable_point_adjustment is on, then this doesn't happen, so the problem almost has to be here: command_loop_1 ... if (current_buffer == prev_buffer && XBUFFER (XWINDOW (selected_window)->contents) == current_buffer && last_point_position != PT && NILP (Vdisable_point_adjustment) && NILP (Vglobal_disable_point_adjustment)) { if (last_point_position > BEGV && last_point_position < ZV && (composition_adjust_point (last_point_position, last_point_position) != last_point_position)) /* The last point was temporarily set within a grapheme cluster to prevent automatic composition. To recover the automatic composition, we must update the display. */ windows_or_buffers_changed = 21; if (!already_adjusted) adjust_point_for_property (last_point_position, MODIFF != prev_modiff); } I haven't tried to debug any further -- is it obvious to anybody what's failing here, by any chance? :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no