Subject: Re: bug#13133: 24.2.90; scroll-conservatively is too coarse a setting

From: Eli Zaretskii <[email-masked]>
Date: Mon, 10 Dec 2012 10:52:24 +0200

> Date: Mon, 10 Dec 2012 12:28:58 +0400
> From: Dmitry Gutov <[email-masked]>
> CC: [email-masked]
> 
> Like I mentioned, I don't want C-M-e/C-M-a to recenter. Why do you think 
> it's TRT?

Because you generally want to see the entire definition of the API,
not just the opening brace or paren.

> As far as I'm concerned, recentering might be fine when we go to the end 
> of a small function (it will fit on the screen anyway), but a larger 
> function, which might have fit on the full screen, will be cut in half.

IMO, C-M-e/C-M-a is not for observing the whole function.  You may be
looking for a separate feature, or maybe a modification of an existing
feature.

> >> Half-window happens because when the compilation buffer is filled, the
> >> point is at the end of it (when compilation-scroll-output is t, at least).
> >
> > Does this happen with or without setting scroll-conservatively to a
> > value larger than 100?
> 
> Without.

Can you cook up a test case?  I'd like to see why this happens.  (If
showing this requires injection of specific amount of text into the
compilation buffer, you could use 'cat' or some similar program to do
so, instead of actually running a compiler.)

> > Just for the record: when I asked whether people who like Emacs to
> > _never_ recenter would mind having that behavior in contexts that have
> > nothing to do with scrolling, the response was a huge YES.  So the
> > current behavior seems to be "by popular demand".
> 
> If I had to guess, it might be that people just wanted out of the 
> default always-recentering behavior, and it was a quick way to end the 
> discussion and get the implementation.
> 
> Anyway, I don't remember seeing that poll. And if you were asking on 
> emacs-devel, that doesn't exactly represent the majority of users.

Emacs 24.x with this feature was released 6 months ago, and I have yet
to see a single complaint about it -- until now.  What user poll can
possibly match that?

> > Another possibility would be to add more customization values to
> > compilation-scroll-output, implementing the behavior of your
> > compile-scroll-eob.
> 
> Yes, sure. Just set buffer-local value of scroll-conservatively, maybe?

Could be.  But I think it is best first to define the required
behavior first.  Then we can see if setting scroll-conservatively
would fit the bill.

> But that won't help with C-M-a/C-M-e and, I don't know, any other 
> buffers with deal with process output?

"M-x shell" comes to mind.

> > I won't argue what the default behavior should be, because it tends to
> > become bike-shedding very fast.  FWIW, I use the default behavior,
> > without customizing any scroll-related variables, and like that
> > behavior, including in compilation buffers.
> 
> Do you like the behavior of compilation buffer often having wasted 
> space, or do you just not mind it (with monitors being cheap and all)? I 
> don't see what anyone could really like about it.

Very simple: I don't watch the compilation messages as they come in.
It's a waste of time; I continue editing or doing something else while
the compiler churns away.  To me, watching the messages is a relic
from old DOS days when I couldn't do anything while waiting for the
compiler to finish.

I only look at the compiler messages when compilation finishes, and
then I either scroll through the buffer or use "C-x `".  In both
cases, what redisplay does when a new message comes in is of no
interest to me.