GNU bug report logs - #21893
25.0.50; Using scroll-*-command in follow-mode

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 12 Nov 2015 21:09:02 UTC

Severity: wishlist

Tags: patch

Found in version 25.0.50

Fixed in version 27.0.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: 21893 <at> debbugs.gnu.org
Subject: bug#21893: 25.0.50; Using scroll-*-command in follow-mode
Date: Fri, 05 Jul 2019 21:44:52 +0300
>> 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?




This bug report was last modified 5 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.