all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Helm <nick@tenpoint.co.nz>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: mode-line size and position indicator
Date: Fri, 25 Aug 2017 21:57:35 +1200	[thread overview]
Message-ID: <m2lgm86kc0.fsf@tenpoint.co.nz> (raw)
In-Reply-To: <83mv6o9a7m.fsf@gnu.org>

Thanks for your comments Eli.

On Fri 25 Aug 2017 at  4.55 am, Eli Zaretskii wrote:

> ...there's a fundamental problem with putting on the mode line an
> indicator that must use a significant part of the screen estate to be
> useful: the mode line is pretty crowded these days, even in the
> default configuration.

Agreed, especially when we already have scroll-bars. Still, something
like this might be useful in a few corner cases – users do seem to keep
reinventing it in one form or another over and over again. See John
Yate's comment down thread for one recent example. Even nyan-mode
qualifies, I guess. :)

> I wonder whether it would have made sense to reuse the code we have
> for computing the scroll-bar thumb.

Almost certainly. I'll check it out.

> Also, why two different code fragments? why not use the former for
> both small and large values of 'total'?

Other parts of xdisp.c seem to warn against overflow when dealing with
large buffers ('total' more than 1000000). Although I couldn't
reproduce any problems when I was playing around with the code, I
thought it was prudent to follow the same kinds of precautions.

In the other case, I wanted the code to run quickly during rapid
scrolling manoeuvres, so I tried to condense the math as much as
possible at the cost of dealing with larger variables. That was the idea
anyway.

Thanks again,
Nick



  parent reply	other threads:[~2017-08-25  9:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23  3:20 mode-line size and position indicator Nick Helm
2017-08-24 16:55 ` Eli Zaretskii
2017-08-24 19:26   ` John Yates
2017-08-25  2:47     ` Richard Stallman
2017-08-25  9:57   ` Nick Helm [this message]
2017-08-25 12:36     ` Eli Zaretskii
2017-08-26  7:50       ` Nick Helm
  -- strict thread matches above, loose matches on Subject: below --
2017-08-24 21:02 mark M
2017-08-25  6:27 ` Eli Zaretskii

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=m2lgm86kc0.fsf@tenpoint.co.nz \
    --to=nick@tenpoint.co.nz \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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.