all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: How to achieve desired automatic scrolling behavior
@ 2013-05-30 18:23 Barry OReilly
  2013-05-30 19:08 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Barry OReilly @ 2013-05-30 18:23 UTC (permalink / raw)
  To: help-gnu-emacs

> Because the scroll does not happen during the line-move but after it
> (line-move just moves point, and once the command is complete,
> a redisplay is triggered to reflect the change on screen, at which
> point the redisplay code notices that point is "outside the window"
> and triggers a scroll to bring it back into view).

Oh. I suppose that might explain bug 14508 [1], if more than one line-move
can get processed before a redisplay is triggered. Where is redisplay
triggered from?

[1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14508


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: How to achieve desired automatic scrolling behavior
@ 2013-05-29 23:02 Barry OReilly
  2013-05-30 14:45 ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Barry OReilly @ 2013-05-29 23:02 UTC (permalink / raw)
  To: help-gnu-emacs

> By default, Evil's "j" command moves by "physical" lines, not be screen
> lines even if visual-line-mode is enabled. Please use "gj" instead (or
> rebind "j", e.g. (define-key evil-motion-mode-map "j" "gj")).

Thanks, that improves the behavior of scroll-conservatively quite a bit.

> I just tried what I think you are doing, when lines are wrapped, and
> didn't have any recentering.  How about a recipe to reproduce this
> starting from "emacs -Q"?

After Frank's fix, there's still an issue with recentering during line by
line scrolling with scroll-conservatively==1, so I submitted a bug report.

> Customize scroll-conservatively to 0
> Advise line-move:
>   (defadvice line-move (around my-advice-line-move activate)
>     (let ((scroll-conservatively 101))
>       ad-do-it))

Why does the let bound scroll-conservatively not seem to take effect for
the around advice?


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: How to achieve desired automatic scrolling behavior
@ 2013-05-29 13:57 Barry OReilly
  2013-05-29 15:34 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Barry OReilly @ 2013-05-29 13:57 UTC (permalink / raw)
  To: help-gnu-emacs

> 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.


^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <mailman.26006.1368807846.855.help-gnu-emacs@gnu.org>]
* How to achieve desired automatic scrolling behavior
@ 2013-05-17 16:24 Barry OReilly
  2013-05-17 23:37 ` Bob Proulx
  0 siblings, 1 reply; 11+ messages in thread
From: Barry OReilly @ 2013-05-17 16:24 UTC (permalink / raw)
  To: help-gnu-emacs

For the most part, I want the behavior of scroll-conservatively 1, where
navigating line by line doesn't recenter, but jumping to a different part
of the buffer does.

One jarring behavior I wish to customize away is when going line by line
across a line that wraps visually, the behavior is to recenter. How do I
have it not recenter in this case?

Also desirable is when scroll-conservatively==1 would cause a recenter, it
would instead use the scroll-*-aggressively setting. Setting both of these
does not have that effect.


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

end of thread, other threads:[~2013-05-30 19:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 18:23 How to achieve desired automatic scrolling behavior Barry OReilly
2013-05-30 19:08 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2013-05-29 23:02 Barry OReilly
2013-05-30 14:45 ` Stefan Monnier
2013-05-29 13:57 Barry OReilly
2013-05-29 15:34 ` Eli Zaretskii
2013-05-29 15:55   ` Frank Fischer
     [not found] <mailman.26006.1368807846.855.help-gnu-emacs@gnu.org>
2013-05-25 16:37 ` Javier
2013-05-25 19:06   ` Emanuel Berg
2013-05-17 16:24 Barry OReilly
2013-05-17 23:37 ` Bob Proulx

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.