unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39458: 26.3; move-overlay affects the scroll-margin feature
@ 2020-02-06 20:11 Geza, Herman
  2020-10-27 18:46 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Geza, Herman @ 2020-02-06 20:11 UTC (permalink / raw)
  To: 39458

Hi,

I discovered a possible little bug. Put this into init.el:

----- snip ---------

(setq scroll-margin 10)
(setq scroll-conservatively 101)

(defun foo ()
   (move-overlay overlay 1 2)
)

(defun bar ()
   (setq overlay (make-overlay (point) (point)))
   (add-hook 'post-command-hook #'foo nil t)
)

(add-hook 'after-change-major-mode-hook 'bar)


----- snip ---------

Load a several-page large text file, and scroll down to the
bottom. Try to position the document in a way that the window has an empty
space at the bottom. Now, move the cursor upwards. Notice, that you can
move the cursor at the very top of the window, the scroll-margin value
is ignored. If you continue moving, the document will fill the whole
window, and now emacs will take scroll-margin value into consideration.

The overall effect is, when scrolling with some empty space at the
bottom, scrolling is non-continuous. When the space is filled, it
becomes continuous.

If you remove the move-overlay call from foo, everything is fine.

(I discovered this bug while using hl-line. You can see the same effect,
if you just set the two scroll variables as I set them, and enable 
hl-line-mode)



Emacs info:

In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.11)
  of 2019-09-22, modified by Debian built on x86-csail-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description:    Debian GNU/Linux bullseye/sid

Configured using:
  'configure --build x86_64-linux-gnu --prefix=/usr
  --sharedstatedir=/var/lib --libexecdir=/usr/lib
  --localstatedir=/var/lib --infodir=/usr/share/info
  --mandir=/usr/share/man --enable-libsystemd --with-pop=yes
  --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share/emacs/site-lisp
  --with-sound=alsa --without-gconf --with-mailutils --build
  x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
  --libexecdir=/usr/lib --localstatedir=/var/lib
  --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
  --with-pop=yes
  --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share/emacs/site-lisp
  --with-sound=alsa --without-gconf --with-mailutils --with-x=yes
  --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
  -fdebug-prefix-map=/build/emacs-n8pPyG/emacs-26.3+1=. 
-fstack-protector-strong
  -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
  -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD LCMS2

Important settings:
   value of $LC_ALL: C.UTF-8
   value of $LANG: en_US.UTF-8
   locale-coding-system: utf-8-unix

Load-path shadows:
/usr/share/emacs/site-lisp/llvm/tablegen-mode hides 
/usr/share/emacs/site-lisp/llvm-9/tablegen-mode
/usr/share/emacs/site-lisp/llvm/llvm-mode hides 
/usr/share/emacs/site-lisp/llvm-9/llvm-mode
/usr/share/emacs/site-lisp/llvm/emacs hides 
/usr/share/emacs/site-lisp/llvm-9/emacs
/usr/share/emacs/site-lisp/rst hides 
/usr/share/emacs/26.3/lisp/textmodes/rst






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#39458: 26.3; move-overlay affects the scroll-margin feature
  2020-02-06 20:11 bug#39458: 26.3; move-overlay affects the scroll-margin feature Geza, Herman
@ 2020-10-27 18:46 ` Lars Ingebrigtsen
  2020-10-27 19:22   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-27 18:46 UTC (permalink / raw)
  To: Geza, Herman; +Cc: 39458

"Geza, Herman" <geza.herman@gmail.com> writes:

> Load a several-page large text file, and scroll down to the
> bottom. Try to position the document in a way that the window has an empty
> space at the bottom. Now, move the cursor upwards. Notice, that you can
> move the cursor at the very top of the window, the scroll-margin value
> is ignored. If you continue moving, the document will fill the whole
> window, and now emacs will take scroll-margin value into consideration.

I can reproduce this bug in Emacs 26.3, but not in Emacs 28, so I'm
going to go ahead and guess that it's been fixed, and I'm closing this
bug report.  If this is still a problem in Emacs 28, please respond to
the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#39458: 26.3; move-overlay affects the scroll-margin feature
  2020-10-27 18:46 ` Lars Ingebrigtsen
@ 2020-10-27 19:22   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2020-10-27 19:22 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 39458, geza.herman

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Tue, 27 Oct 2020 19:46:23 +0100
> Cc: 39458@debbugs.gnu.org
> 
> "Geza, Herman" <geza.herman@gmail.com> writes:
> 
> > Load a several-page large text file, and scroll down to the
> > bottom. Try to position the document in a way that the window has an empty
> > space at the bottom. Now, move the cursor upwards. Notice, that you can
> > move the cursor at the very top of the window, the scroll-margin value
> > is ignored. If you continue moving, the document will fill the whole
> > window, and now emacs will take scroll-margin value into consideration.
> 
> I can reproduce this bug in Emacs 26.3, but not in Emacs 28, so I'm
> going to go ahead and guess that it's been fixed

Probably by the fix to bug#42653.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-27 19:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 20:11 bug#39458: 26.3; move-overlay affects the scroll-margin feature Geza, Herman
2020-10-27 18:46 ` Lars Ingebrigtsen
2020-10-27 19:22   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).