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 21:59:38 -0400 Message-ID: References: <87oaa77fev.fsf@web.de> <8737rj79cp.fsf@web.de> <871t72cxhh.fsf@web.de> <87zitqihlz.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458698428 9919 80.91.229.3 (23 Mar 2016 02:00:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 02:00:28 +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 Wed Mar 23 03:00:14 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 1aiY5j-0003Ve-VA for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Mar 2016 03:00:12 +0100 Original-Received: from localhost ([::1]:40485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiY5j-00027L-AP for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Mar 2016 22:00:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiY5f-00025y-QQ for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 22:00:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiY5a-0004hj-OD for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 22:00:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiY5a-0004hT-Lr for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 22:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aiY5a-000691-BR for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 22:00: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: Wed, 23 Mar 2016 02:00: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.145869838723569 (code B ref 23079); Wed, 23 Mar 2016 02:00:02 +0000 Original-Received: (at 23079) by debbugs.gnu.org; 23 Mar 2016 01:59:47 +0000 Original-Received: from localhost ([127.0.0.1]:60617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiY5L-000685-3V for submit@debbugs.gnu.org; Tue, 22 Mar 2016 21:59:47 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:64889) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiY5J-00067s-5g for 23079@debbugs.gnu.org; Tue, 22 Mar 2016 21:59:45 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BCFgA731xV/5a2xEVcgxCEAoVVwD6CTQQCAoE8PRABAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBAQUBAQEBHos6hQUHhC0BBJ8XhmmNP4FFI4QUIoJ4AQEB X-IPAS-Result: A0BCFgA731xV/5a2xEVcgxCEAoVVwD6CTQQCAoE8PRABAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBAQUBAQEBHos6hQUHhC0BBJ8XhmmNP4FFI4QUIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="197853533" Original-Received: from 69-196-182-150.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.182.150]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 Mar 2016 21:59:39 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 062CAAE1F4; Tue, 22 Mar 2016 21:59:39 -0400 (EDT) In-Reply-To: <87zitqihlz.fsf@web.de> (Michael Heerdegen's message of "Tue, 22 Mar 2016 17:48:24 +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:115376 Archived-At: > (let ((inhibit-read-only t) > (deactivate-mark nil) > (selection (magit-region-sections))) > (mapc #'delete-overlay magit-section-highlight-overlays) > (setq magit-section-unhighlight-sections > magit-section-highlighted-sections > magit-section-highlighted-sections nil) > (unless (eq section magit-root-section) > (run-hook-with-args-until-success > 'magit-section-highlight-hook section selection)) > (--each magit-section-unhighlight-sections > (run-hook-with-args-until-success > 'magit-section-unhighlight-hook it selection)) > (restore-buffer-modified-p nil) Hmm... what kind of buffer modifications might happen in here? I think this might be the problem: point-adjustment is only applied after "movement commands" and is disabled if the buffer was modified during the course of the command (including post-command-hook). [ This is mostly due to the simplistic way we keep track of the "previous state", which we can't trust if the buffer was modified. ] > This function doesn't move point, but it somehow interferes with point > adjustment in another way. It's difficult to adjust point without risking adverse effects in corner cases (typically problems like "repeated C-n gets stuck" or "forward-foo moves backward"), so point-adjustment is conservative to try and make sure it's only done when we're sure it's "safe". Stefan