From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#32848: 26.1; follow-mode cursor move breaks with frame-resize-pixelwise Date: Sun, 30 Sep 2018 11:02:15 +0000 Message-ID: <20180930110215.GA6305@ACM> References: <8336tv8iv7.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1538305571 3956 195.159.176.226 (30 Sep 2018 11:06:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Sep 2018 11:06:11 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 32848@debbugs.gnu.org, Anders Lindgren To: Allen Li , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 30 13:06:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6ZY1-0000lM-Qg for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Sep 2018 13:06:01 +0200 Original-Received: from localhost ([::1]:54852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6Za8-0000KR-Ag for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Sep 2018 07:08:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6Za2-0000KI-6q for bug-gnu-emacs@gnu.org; Sun, 30 Sep 2018 07:08:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6Za0-0004eO-2w for bug-gnu-emacs@gnu.org; Sun, 30 Sep 2018 07:08:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55184) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6ZZy-0004cS-3I for bug-gnu-emacs@gnu.org; Sun, 30 Sep 2018 07:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g6ZZx-0005aM-OW for bug-gnu-emacs@gnu.org; Sun, 30 Sep 2018 07:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Sep 2018 11:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32848-submit@debbugs.gnu.org id=B32848.153830568021463 (code B ref 32848); Sun, 30 Sep 2018 11:08:01 +0000 Original-Received: (at 32848) by debbugs.gnu.org; 30 Sep 2018 11:08:00 +0000 Original-Received: from localhost ([127.0.0.1]:59442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6ZZw-0005a7-7h for submit@debbugs.gnu.org; Sun, 30 Sep 2018 07:08:00 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:51773 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1g6ZZt-0005Zw-Mx for 32848@debbugs.gnu.org; Sun, 30 Sep 2018 07:07:58 -0400 Original-Received: (qmail 43818 invoked by uid 3782); 30 Sep 2018 11:07:56 -0000 Original-Received: from acm.muc.de (p5B14620D.dip0.t-ipconnect.de [91.20.98.13]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 30 Sep 2018 13:07:54 +0200 Original-Received: (qmail 6358 invoked by uid 1000); 30 Sep 2018 11:02:15 -0000 Content-Disposition: inline In-Reply-To: <8336tv8iv7.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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" Xref: news.gmane.org gmane.emacs.bugs:150796 Archived-At: Hello, Allen and Eli. I've just committed the following change to the emacs-26 branch. It is a workaround, but is safe, and should enable you (Allen) to carry on using follow mode. Eli and I have a more satisfactory fix planned for master. diff --git a/lisp/follow.el b/lisp/follow.el index fd397c077b..7942901bb4 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -438,7 +438,10 @@ follow-mode (setq pos-visible-in-window-group-p-function 'follow-pos-visible-in-window-p) (setq selected-window-group-function 'follow-all-followers) - (setq move-to-window-group-line-function 'follow-move-to-window-line)) + (setq move-to-window-group-line-function 'follow-move-to-window-line) + + ;; Crude workaround for bug #32848 for the emacs-26 branch, 2018-09-30. + (setq-local make-cursor-line-fully-visible nil)) ;; Remove globally-installed hook functions only if there is no ;; other Follow mode buffer. @@ -451,6 +454,9 @@ follow-mode (remove-hook 'post-command-hook 'follow-post-command-hook) (remove-hook 'window-size-change-functions 'follow-window-size-change))) + ;; Second part of crude workaround for bug #32848. + (kill-local-variable 'make-cursor-line-fully-visible) + (kill-local-variable 'move-to-window-group-line-function) (kill-local-variable 'selected-window-group-function) (kill-local-variable 'pos-visible-in-window-group-p-function) -- Alan Mackenzie (Nuremberg, Germany). On Thu, Sep 27, 2018 at 11:06:20 +0300, Eli Zaretskii wrote: > > From: Allen Li > > Date: Wed, 26 Sep 2018 15:49:15 -0700 > > Moving the cursor off the bottom of the window with follow-mode enabled > > doesn't move to the other window properly if frame-resize-pixelwise is > > set and a partial line is visible. > It seems like setting make-cursor-line-fully-visible to nil solves the > problem. Could you try that for a while, and see if this has any > adverse effects? > Alan and Anders: does setting this variable to nil in buffers under > follow-mode sounds like an okay solution? It might mean that in some > rare cases the user will see the current line only partially (only in > the last window in the group). If you think this is OK, we could > arrange for that variable to be set locally as part of turning on > follow-mode. > A more complex solution would be to allow > make-cursor-line-fully-visible have a value that is a function, which > follow-mode will define in a way that will only allow > partially-visible current line in a window if it is not the last one > in the order returned by follow-all-followers. > Comments?