unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13133: 24.2.90; scroll-conservatively is too coarse a setting
@ 2012-12-10  3:29 Dmitry Gutov
  2012-12-10  6:30 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2012-12-10  3:29 UTC (permalink / raw)
  To: 13133

I think this value is used in contexts that are different enough to
behave differently in this respect.

Examples:
1) I want help-button-action to bring me to the function's definition,
and I generally want in the middle of the screen. Same for imenu, etc.
2) I really don't want to see empty space after the contents in the
compilation window. But as much as half of the window may be empty right
after compilation because of the point recentering.
3) Ideally, if I move around with next/previous-line, I don't want
sudden jumps and recenterings. Same thing with beginning/end-of-defun
(so setting scroll-conservatively to a value larger than 0 is not a real
solution).

Thoughts?

So far I'm doing this for the compilation buffer:

(defun compile-scroll-eob (buffer _status)
  (let ((win (get-buffer-window buffer))
        (current (selected-window)))
    (when win
      (select-window win)
      (with-current-buffer buffer
        (when (> (line-number-at-pos (point-max)) (window-height))
          (goto-char (point-max))
          (recenter (window-height))))
      (select-window current))))

(add-to-list 'compilation-finish-functions 'compile-scroll-eob)

I think that behavior should be the default, though.

In GNU Emacs 24.2.90.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.0)
 of 2012-11-26 on vbx
Bzr revision: 110959 rgm@gnu.org-20121126014100-0199uq4y2fo0cnaz
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
System Description:	Ubuntu 12.10





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

end of thread, other threads:[~2012-12-11  7:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10  3:29 bug#13133: 24.2.90; scroll-conservatively is too coarse a setting Dmitry Gutov
2012-12-10  6:30 ` Eli Zaretskii
2012-12-10  6:46   ` Dmitry Gutov
2012-12-10  7:08     ` Eli Zaretskii
2012-12-10  8:28       ` Dmitry Gutov
2012-12-10  8:52         ` Eli Zaretskii
2012-12-11  2:07           ` Dmitry Gutov
2012-12-11  7:09             ` 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).