all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Geza, Herman" <geza.herman@gmail.com>
To: 39458@debbugs.gnu.org
Subject: bug#39458: 26.3; move-overlay affects the scroll-margin feature
Date: Thu, 6 Feb 2020 21:11:32 +0100	[thread overview]
Message-ID: <ea2eaf52-fb1f-aca3-cd5f-683e385fbee5@gmail.com> (raw)

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






             reply	other threads:[~2020-02-06 20:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 20:11 Geza, Herman [this message]
2020-10-27 18:46 ` bug#39458: 26.3; move-overlay affects the scroll-margin feature Lars Ingebrigtsen
2020-10-27 19:22   ` Eli Zaretskii

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=ea2eaf52-fb1f-aca3-cd5f-683e385fbee5@gmail.com \
    --to=geza.herman@gmail.com \
    --cc=39458@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.