From unknown Fri Jun 20 18:14:00 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#925 <925@debbugs.gnu.org> To: bug#925 <925@debbugs.gnu.org> Subject: Status: 23.0.60; follow-mode doesn't work in buffers with a header line Reply-To: bug#925 <925@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:14:00 +0000 retitle 925 23.0.60; follow-mode doesn't work in buffers with a header line reassign 925 emacs submitter 925 Phil Sung severity 925 normal thanks From philbert@gmail.com Sun Sep 7 15:26:58 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.0 required=4.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 7 Sep 2008 22:26:58 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87MQtUu007106 for ; Sun, 7 Sep 2008 15:26:56 -0700 Received: from mail.gnu.org ([199.232.76.166]:40551 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KcSgw-0004Hi-EA for emacs-pretest-bug@gnu.org; Sun, 07 Sep 2008 18:25:10 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KcSiY-0007HG-6v for emacs-pretest-bug@gnu.org; Sun, 07 Sep 2008 18:26:53 -0400 Received: from yx-out-1718.google.com ([74.125.44.152]:35096) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KcSiX-0007HA-Ru for emacs-pretest-bug@gnu.org; Sun, 07 Sep 2008 18:26:49 -0400 Received: by yx-out-1718.google.com with SMTP id 34so759724yxf.66 for ; Sun, 07 Sep 2008 15:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:mime-version :content-type:content-transfer-encoding:message-id:date:to:subject :x-mailer:sender; bh=OYtoeZEQmaX6EBbDitfBax8yFtwOuPart5rVviZLGAE=; b=WrbykjjznSwluY/q5idhwcwPzWOiq61ZuxpHmAROZCmMgO9D7Yper5OIoG4BuE+ukj g4S0TGDeQRuKHy6FPGANgZjB5ajbxVcFi6rOLV6SFJJOfrnPFPcZcrIoeZn5YSC6TJYO MNb8FKE2geb46s50vKg5jG2KwBVB5dPkZksNo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:content-transfer-encoding:message-id :date:to:subject:x-mailer:sender; b=dWLX9r/PvaNHS48Or0A3MUVBs899RDX9ibBeVKf+V1q4jTRUq7g/qoVPebysYsuW/c +0Vl+CW+KOgxtroitgaz3IQDtef6K1lJU3nhZAVW/Rt0fvKey6+wbEMlj3TNIgvyxI4P /4iDHmv0rJAHPKPzeR3/eRfM+SFtZr+hxvJIk= Received: by 10.150.51.2 with SMTP id y2mr15090238yby.243.1220826407967; Sun, 07 Sep 2008 15:26:47 -0700 (PDT) Received: from creme-brulee ( [18.95.1.79]) by mx.google.com with ESMTPS id 4sm4879176yxq.9.2008.09.07.15.26.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 07 Sep 2008 15:26:47 -0700 (PDT) From: Phil Sung MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18628.21774.308940.632822@gargle.gargle.HOWL> Date: Sun, 7 Sep 2008 18:26:22 -0400 To: emacs-pretest-bug@gnu.org Subject: 23.0.60; follow-mode doesn't work in buffers with a header line X-Mailer: VM 8.0.9 under Emacs 23.0.60.1 (i486-pc-linux-gnu) Sender: Phil Sung X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Steps to reproduce: 0. emacs -Q 1. C-h r [info-emacs-manual] 2. C-x 3 [split-window-horizontally] 3. M-x follow-mode 4. C-n until point moves past bottom of window Expected results: Point moves to top of next window. Actual results: First window scrolls down and then recenters around point. In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.13.7) of 2008-08-31 on iridium, modified by Debian (emacs-snapshot package, version 1:20080831-1) configured using `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS='' From rudalics@gmx.at Mon Sep 8 09:11:13 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 925) by emacsbugs.donarmstrong.com; 8 Sep 2008 16:11:13 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m88GB8kR023163 for <925@emacsbugs.donarmstrong.com>; Mon, 8 Sep 2008 09:11:10 -0700 Received: (qmail invoked by alias); 08 Sep 2008 16:11:02 -0000 Received: from 62-47-57-83.adsl.highway.telekom.at (EHLO [62.47.57.83]) [62.47.57.83] by mail.gmx.net (mp005) with SMTP; 08 Sep 2008 18:11:02 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19474N/7d94X8OpiR7aJLV4qpYwO4ub/Ny53ijxW6 TFiLVashITD12d Message-ID: <48C54DE8.8080100@gmx.at> Date: Mon, 08 Sep 2008 18:08:08 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Phil Sung , 925@debbugs.gnu.org Subject: Re: bug#925: 23.0.60; follow-mode doesn't work in buffers with a header line References: <18628.21774.308940.632822@gargle.gargle.HOWL> In-Reply-To: <18628.21774.308940.632822@gargle.gargle.HOWL> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.77 > Steps to reproduce: > > 0. emacs -Q > 1. C-h r [info-emacs-manual] > 2. C-x 3 [split-window-horizontally] > 3. M-x follow-mode > 4. C-n until point moves past bottom of window > > Expected results: > > Point moves to top of next window. > > Actual results: > > First window scrolls down and then recenters around point. Does it help when you set `scroll-conservatively' to 100? martin From philbert@gmail.com Wed Sep 10 09:54:37 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, IMPRONONCABLE_2,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 925) by emacsbugs.donarmstrong.com; 10 Sep 2008 16:54:37 +0000 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8AGsUPw021882 for <925@emacsbugs.donarmstrong.com>; Wed, 10 Sep 2008 09:54:32 -0700 Received: by yx-out-2324.google.com with SMTP id 8so1553144yxg.31 for <925@emacsbugs.donarmstrong.com>; Wed, 10 Sep 2008 09:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:mime-version :content-type:content-transfer-encoding:message-id:date:to:subject :in-reply-to:references:x-mailer:sender; bh=ig/9R3gem/F5xic42n30hMoTvM6fCRCaH59w3/aaOQU=; b=E/WkuSUdVGk/IRN66Nh1BxNaBDewAn9poIOxJM/8tskf4GTUx3DSGj5A7iRuOw2HGd +aaJhD7H0YD2/eL34ikf9w60r6CNcX5y63kbMjZTXxbKtnQK5h2GmtE0ly0mBjcU6zK8 oN05gmhbKnNpGEExpd2SG1s03rJI6UZ+ejIac= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:content-transfer-encoding:message-id :date:to:subject:in-reply-to:references:x-mailer:sender; b=cri/R6iA8MWgLsz4hHRMbTtDyU2IPtTC7CHy8MSJmAu4i2jFb8RUrajC4qRsJ1Tnym 3sALDdP+yQWqvQb7I3Y5yFLnGZ0fw9za6aVA6hU7o+/IJ5eMz0tjvgBoEzMOGlISGH0x 1DZbonvSK8C2ZdX+LxMZwY2wTuQiaQ6+B7/AA= Received: by 10.114.26.18 with SMTP id 18mr923338waz.162.1221065669842; Wed, 10 Sep 2008 09:54:29 -0700 (PDT) Received: from creme-brulee ( [18.95.1.79]) by mx.google.com with ESMTPS id 6sm9986962ywp.3.2008.09.10.09.54.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Sep 2008 09:54:29 -0700 (PDT) From: Phil Sung MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18631.64418.476362.955622@gargle.gargle.HOWL> Date: Wed, 10 Sep 2008 12:53:54 -0400 To: martin rudalics , 925@debbugs.gnu.org Subject: Re: bug#925: 23.0.60; follow-mode doesn't work in buffers with a header line In-Reply-To: <48C54DE8.8080100@gmx.at> References: <18628.21774.308940.632822@gargle.gargle.HOWL> <48C54DE8.8080100@gmx.at> X-Mailer: VM 8.0.9 under Emacs 23.0.60.1 (i486-pc-linux-gnu) Sender: Phil Sung martin rudalics writes: > Does it help when you set `scroll-conservatively' to 100? No, it doesn't. When I do that, not only does the expected behavior not happen, point moves back to the center of the first screen. This didn't happen with the default value of scroll-conservatively. Here's what I now think is going on: When there's a header line, follow-mode miscomputes the beginning of the second window-- if you try out the "steps to reproduce", you can see that there's one line after the end of the first window which is not visible in the second window. When you try to C-n to that line, follow-mode can't display that line in either window, so something weird happens. I tried the (flawed) patch below, which decreases the effective window-height when there's a header line. I'm not sure if this is the right approach. With this patch, point correctly moves from one window to the other, and the two windows display consecutive lines, as expected. However, sometimes when moving point between windows, the text will shift up or down by a line. I don't know why that happens. Thanks, Phil follow.el (follow-scroll-down, follow-calc-win-end, follow-estimate-first-window-start): reduce effective window height when header line is present. diff --git a/lisp/follow.el b/lisp/follow.el index 508d0f5..766dfce 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -624,7 +624,7 @@ Works like `scroll-up' when not in Follow mode." (select-window win) (goto-char start) (vertical-motion (- (- (window-height win) - 1 + (if header-line-format 2 1) next-screen-context-lines))) (set-window-start win (point)) (goto-char start) @@ -887,7 +887,8 @@ Returns (end-pos end-of-buffer-p)" (prog1 (save-excursion (goto-char (window-start)) - (setq height (- (window-height) 1)) + (setq height (- (window-height) + (if header-line-format 2 1))) (setq buffer-end-p (if (bolp) (not (= height (vertical-motion height))) @@ -1219,7 +1220,9 @@ position of the first window. Otherwise it is a good guess." ;(setq exact (bolp)) (vertical-motion 0 win) (while pred - (vertical-motion (- 1 (window-height (car pred))) (car pred)) + (vertical-motion (- (if header-line-format 2 1) + (window-height (car pred))) + (car pred)) (if (not (bolp)) (setq exact nil)) (setq pred (cdr pred))) From rudalics@gmx.at Thu Sep 11 01:58:29 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 925) by emacsbugs.donarmstrong.com; 11 Sep 2008 08:58:29 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m8B8wNYr013712 for <925@emacsbugs.donarmstrong.com>; Thu, 11 Sep 2008 01:58:25 -0700 Received: (qmail invoked by alias); 11 Sep 2008 08:58:17 -0000 Received: from 62-47-61-65.adsl.highway.telekom.at (EHLO [62.47.61.65]) [62.47.61.65] by mail.gmx.net (mp055) with SMTP; 11 Sep 2008 10:58:17 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19VI2osXPxVW/JW7oDfjvq+NopwbQDladxhthaUi7 fAL+2J2l8Gc5nB Message-ID: <48C8DCE2.7020809@gmx.at> Date: Thu, 11 Sep 2008 10:54:58 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Phil Sung CC: 925@debbugs.gnu.org Subject: Re: bug#925: 23.0.60; follow-mode doesn't work in buffers with a header line References: <18628.21774.308940.632822@gargle.gargle.HOWL> <48C54DE8.8080100@gmx.at> <18631.64418.476362.955622@gargle.gargle.HOWL> In-Reply-To: <18631.64418.476362.955622@gargle.gargle.HOWL> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.74 > No, it doesn't. When I do that, not only does the expected behavior > not happen, point moves back to the center of the first screen. This > didn't happen with the default value of scroll-conservatively. I don't understand well. When I set `scroll-conservatively' to 100 there's no recentering with emacs -Q and both windows scroll. There's, however, at least one line missing as you remark below. > Here's what I now think is going on: > > When there's a header line, follow-mode miscomputes the beginning of > the second window-- if you try out the "steps to reproduce", you can > see that there's one line after the end of the first window which is > not visible in the second window. When you try to C-n to that line, > follow-mode can't display that line in either window, so something > weird happens. > > I tried the (flawed) patch below, which decreases the effective > window-height when there's a header line. I'm not sure if this is the > right approach. Ideally, the second window wouldn't display the header line at all. > With this patch, point correctly moves from one window to the other, > and the two windows display consecutive lines, as expected. However, > sometimes when moving point between windows, the text will shift up or > down by a line. I don't know why that happens. This seems to already happen without your patch. martin From rudalics@gmx.at Tue Oct 28 10:45:33 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 925-done) by emacsbugs.donarmstrong.com; 28 Oct 2008 17:45:33 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m9SHjQXp008327 for <925-done@emacsbugs.donarmstrong.com>; Tue, 28 Oct 2008 10:45:28 -0700 Received: (qmail invoked by alias); 28 Oct 2008 17:45:20 -0000 Received: from 88-117-47-7.adsl.highway.telekom.at (EHLO [88.117.47.7]) [88.117.47.7] by mail.gmx.net (mp001) with SMTP; 28 Oct 2008 18:45:20 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+krExIT7+kkO+bEmc1E+eYVoOofZ4jf/2NVMTDsI V8yjYg0G6S3SqI Message-ID: <49074F4C.6080008@gmx.at> Date: Tue, 28 Oct 2008 18:43:40 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 925-done@debbugs.gnu.org CC: Phil Sung Subject: Re: bug#925: 23.0.60; follow-mode doesn't work in buffers with a header line References: <18628.21774.308940.632822@gargle.gargle.HOWL> <48C54DE8.8080100@gmx.at> <18631.64418.476362.955622@gargle.gargle.HOWL> In-Reply-To: <18631.64418.476362.955622@gargle.gargle.HOWL> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.74 Fixed as 2008-10-28 Phil Sung (tiny change) * follow.el (follow-scroll-down, follow-calc-win-end) (follow-estimate-first-window-start): Reduce effective window height when header line is present. (Bug#925) Thanks, martin From unknown Fri Jun 20 18:14:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Wed, 26 Nov 2008 15:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator