From: Juri Linkov <juri@linkov.net>
To: 21893@debbugs.gnu.org
Subject: bug#21893: 25.0.50; Using scroll-*-command in follow-mode
Date: Fri, 05 Jul 2019 21:44:52 +0300 [thread overview]
Message-ID: <87ef34qq1n.fsf@mail.linkov.net> (raw)
In-Reply-To: <87wogxwm3o.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 05 Jul 2019 00:01:15 +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?
next prev parent reply other threads:[~2019-07-05 18:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 21:07 bug#21893: 25.0.50; Using scroll-*-command in follow-mode Juri Linkov
2019-06-25 14:55 ` Lars Ingebrigtsen
2019-06-25 20:10 ` Juri Linkov
2019-07-04 21:01 ` Juri Linkov
2019-07-05 18:44 ` Juri Linkov [this message]
2019-07-05 19:25 ` Eli Zaretskii
2019-07-07 22:36 ` Juri Linkov
2019-09-29 21:40 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ef34qq1n.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=21893@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.