From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#21893: 25.0.50; Using scroll-*-command in follow-mode Date: Fri, 05 Jul 2019 21:44:52 +0300 Organization: LINKOV.NET Message-ID: <87ef34qq1n.fsf@mail.linkov.net> References: <877flnudud.fsf@mail.linkov.net> <875zotzb69.fsf@mail.linkov.net> <87wogxwm3o.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="55364"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) To: 21893@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 05 21:15:27 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hjTg5-000EDC-S6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jul 2019 21:15:26 +0200 Original-Received: from localhost ([::1]:55512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjTg4-0003uy-Ru for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jul 2019 15:15:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48987) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjTet-0002kP-Sh for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 15:14:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjTer-0000He-2f for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 15:14:11 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44963) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hjTeq-0000HN-PA for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 15:14:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hjTeq-00049U-GC for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2019 15:14:08 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jul 2019 19:14:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21893 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 21893-submit@debbugs.gnu.org id=B21893.156235399615773 (code B ref 21893); Fri, 05 Jul 2019 19:14:07 +0000 Original-Received: (at 21893) by debbugs.gnu.org; 5 Jul 2019 19:13:16 +0000 Original-Received: from localhost ([127.0.0.1]:53763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjTdz-00046L-LC for submit@debbugs.gnu.org; Fri, 05 Jul 2019 15:13:15 -0400 Original-Received: from chocolate.birch.relay.mailchannels.net ([23.83.209.35]:5287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjTdx-00046C-49 for 21893@debbugs.gnu.org; Fri, 05 Jul 2019 15:13:13 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E83011A25D5 for <21893@debbugs.gnu.org>; Fri, 5 Jul 2019 19:13:11 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a47.g.dreamhost.com (100-96-4-176.trex.outbound.svc.cluster.local [100.96.4.176]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 797721A249F for <21893@debbugs.gnu.org>; Fri, 5 Jul 2019 19:13:11 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a47.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.3); Fri, 05 Jul 2019 19:13:11 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Irritate-Towering: 733d073a71585bd4_1562353991755_2232561058 X-MC-Loop-Signature: 1562353991755:2940870732 X-MC-Ingress-Time: 1562353991755 Original-Received: from pdx1-sub0-mail-a47.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a47.g.dreamhost.com (Postfix) with ESMTP id D1B7283219 for <21893@debbugs.gnu.org>; Fri, 5 Jul 2019 12:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=QBEmAOs9sbJ5BeV5uO+EEkMoNrw=; b= QzcoxaO2Jz8ln7Rh/7EtXAya4bfVY4MZrKq0aL5JIC6YTUAmN2ec00N1MHVzQGqk G2gDDoTF66N+zXnqhPw5dtJiDmshfOe8KJuSR87Qn0BRUeVoac9cVWj7i4rYXZM/ XxkgL7QE2vWkZHwkK3ZlCws2L3evDS4jgO+rq4S/yxg= Original-Received: from mail.jurta.org (m91-129-109-127.cust.tele2.ee [91.129.109.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a47.g.dreamhost.com (Postfix) with ESMTPSA id 99F5F83221 for <21893@debbugs.gnu.org>; Fri, 5 Jul 2019 12:13:08 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a47 In-Reply-To: <87wogxwm3o.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 05 Jul 2019 00:01:15 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrfeeggddufeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledruddvjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdelrdduvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvddukeelfeesuggvsggsuhhgshdrghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedt 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: 209.51.188.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:162153 Archived-At: >> Lars reminded me of this old report that tries to add support for >> a non-nil value of scroll-error-top-bottom for scrolling in follow-mode. >> >> Now I updated the patch for the current master. >> Do you think this is the right fix? > > Here is a better patch: The same problem of ignoring customization of scroll-error-top-bottom exists in view-mode too, and this patch fixes it: diff --git a/lisp/view.el b/lisp/view.el index a765be02c1..e4489b391a 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -743,18 +743,19 @@ view-scroll-lines (setq backward (not backward) lines (- lines))) (when (and maxdefault lines (> lines (view-window-size))) (setq lines nil)) - (cond (backward (scroll-down lines)) + (cond (backward (scroll-down-command lines)) ((view-really-at-end) (if view-scroll-auto-exit (View-quit) (ding) (view-end-message))) - (t (scroll-up lines) + (t (scroll-up-command lines) (if (view-really-at-end) (view-end-message))))) (defun view-really-at-end () ;; Return true if buffer end visible. Maybe revert buffer and test. - (and (pos-visible-in-window-p (point-max)) + (and (or (null scroll-error-top-bottom) (eobp)) + (pos-visible-in-window-p (point-max)) (let ((buf (current-buffer)) (bufname (buffer-name)) (file (buffer-file-name))) BTW, view-end-message is too verbose. Shouldn't it verbosity be customizable?