all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Jason Rumney <jasonr@gnu.org>
Cc: David Kastrup <dak@gnu.org>, emacs-devel@gnu.org
Subject: Re: Scrollbar thumbs
Date: Fri, 06 Nov 2009 12:10:58 +0900	[thread overview]
Message-ID: <87skcs2vr1.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <4AF36607.50508@gnu.org>

Jason Rumney writes:
 > David Kastrup wrote:
 > 
 > > The "design flaw" is that Emacs has a variable line height.  An editor
 > > is primarily supposed to deal with lines of text, not with continuous
 > > graphical panes.  And previous to Emacs 21, Emacs only dealt with lines
 > > of text of constant height.  Previous to Emacs 19, the lines
 > > corresponded 1:1 to the screen lines.
 > >   
 > Even Emacs 19 had line wrapping, so counting CR characters as the file 
 > is read (as some simple text editors do) has never been the solution to 
 > this problem.

AFAICT XEmacs counts *characters*, not lines.  This means that a page
with lots of empty lines gets a smaller thumb than one with almost all
lines full-width.  (It's observable that the thumbs change size.)
This would also give consistent results between long-lines support
(ie, proper wrapping of newline-delimited paragraphs) and conventional
newline-delimited lines.  Of course it's not possible to jump to a
particular page in this algorithm, but modern apps don't seem to do
this with scrollbars anymore anyway.  They provide a separate tray of
thumbnails (which gets its own scrollbar).

I don't recall seeing a question about this on XEmacs channels, nor
complaints that scrollbars function differently on different platforms.

 > The only solution seems to be to render the entire buffer offscreen
 > in background, adjusting the scrollbar as we get more detailed
 > information about the real contents of the buffer.  This is what
 > word processors, web browsers and other complex applications do -
 > you see the first page quite quickly, then you see the scroll bar
 > growing as it renders the buffer in background.  Most applications
 > do not even make an initial guess, so you cannot scroll to the
 > bottom of the buffer until the background rendering is
 > finished.

That is not acceptable on a 128MB log file, though.  Typically what
you want to look at *first* is the end of the file.

 > The application then needs to use extra memory to cache the metrics
 > it has calculated to avoid having to rerender the entire document
 > on every change.

This is a big deal?  All you need is the heights of the pages.  You
recalculate spillage into or out of the current page as you redisplay,
the previous pages don't change at all, and you approximate the later
pages as not having changed length.




  parent reply	other threads:[~2009-11-06  3:10 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02 10:41 Scrollbar thumbs (was: Customizing the mode line) grischka
2009-11-02 11:21 ` Scrollbar thumbs Miles Bader
2009-11-03  0:48   ` grischka
2009-11-03  9:27     ` David Kastrup
2009-11-04  0:09     ` Miles Bader
2009-11-04  9:51       ` grischka
2009-11-04 11:18         ` joakim
2009-11-04 19:29           ` Jan Djärv
2009-11-04 20:57             ` Stefan Monnier
2009-11-05  1:18               ` YAMAMOTO Mitsuharu
2009-11-09 23:14                 ` YAMAMOTO Mitsuharu
2009-11-05  9:23               ` Jan D.
2009-11-05 13:59                 ` Stefan Monnier
2009-11-05 15:16               ` grischka
2009-11-05 15:32                 ` Lennart Borgman
2009-11-05 15:35                 ` Óscar Fuentes
2009-11-05 16:07                 ` David Kastrup
2009-11-05 23:55                   ` Jason Rumney
2009-11-06  0:31                     ` Miles Bader
2009-11-06  3:10                     ` Stephen J. Turnbull [this message]
2009-11-06  4:37                       ` Miles Bader
2009-11-06  8:42                     ` David Kastrup
2009-11-06  8:55                     ` Eli Zaretskii
2009-11-02 14:15 ` Stefan Monnier
2009-11-03  0:32   ` grischka
2009-11-03  1:18     ` Stefan Monnier
2009-11-03  5:37       ` grischka
2009-11-03 13:38         ` Stefan Monnier
2009-11-03 21:10           ` grischka
2009-11-03 23:00             ` Stefan Monnier
2009-11-03 10:02   ` joakim
2009-11-05  9:21     ` Jan D.
  -- strict thread matches above, loose matches on Subject: below --
2009-11-07 11:50 grischka
2009-11-07 16:38 ` Óscar Fuentes
2009-11-07 17:47   ` David De La Harpe Golden
2009-11-03 16:36 grischka
2009-11-03 17:13 ` David Kastrup
2009-10-30 11:18 Customizing the mode line Eli Zaretskii
2009-10-30 13:38 ` Stefan Monnier
2009-10-31  6:09   ` Manoj Srivastava
2009-10-31 20:38     ` Scrollbar thumbs (was: Customizing the mode line) Stefan Monnier
2009-11-01  3:11       ` Scrollbar thumbs Miles Bader
2009-11-02  6:55         ` Stefan Monnier
2009-11-02  7:41           ` Jason Rumney
2009-11-02 14:10             ` Stefan Monnier

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=87skcs2vr1.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jasonr@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.