help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to achieve desired automatic scrolling behavior


From: Barry OReilly
Subject: Re: How to achieve desired automatic scrolling behavior
Date: Wed, 29 May 2013 09:57:32 -0400

> Me neither, maybe you (the OP) could describe it once more?

I'm asking about two things, but I'll focus on the first. The simplest way
to describe it: if a command moves point by line off screen, I want to
scroll one line and if point moves more than that off screen, I want to
recenter point.

One would think scroll-conservatively==1 would fit the bill, but it doesn't
when lines wrap. If I arrow down (actually: Evil's j command) I'm fine
until I hit a line that wraps visually, then I get an undesired recenter.
This makes scroll-conservatively==1 practically useless when lines wrap
visually.

Another approach I tried, which might actually give better edge case
behavior* if it worked:
  Customize scroll-conservatively to 0
  Advise line-move:
    (defadvice line-move (around my-advice-line-move activate)
      (let ((scroll-conservatively 101))
        ad-do-it))

That doesn't work; moving by lines has scroll-conservatively==0 behavior.

* eg if I search on a term and the next search term is in the line just
below what's visible.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]