* even more(1) tells you how big the file is on the first screen
@ 2003-04-13 2:34 Dan Jacobson
2003-04-14 2:36 ` Richard Stallman
[not found] ` <mailman.4535.1050287953.21513.bug-gnu-emacs@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: Dan Jacobson @ 2003-04-13 2:34 UTC (permalink / raw)
You know, I think it's bad that no matter if we are looking
a giant file, or a little file, the mode line has that "Top"
item, instead of some indication of percent. "Top" is more closed
mouthed than an Army security officer.
---1:---F1 some_file (Fundamental)--L1--Top--
We have to move the cursor down to engage the percent mechanism.
RMS, I recall, was pleased, as top was top. However, I want more for
my money without budging a finger. I.e. we have just done M-x
compile. Does the compile output end just below the screen where we
thought it should, or does it go on for page upon page?
No, don't tell me to rely on the exit condition in the modeline, and
no, don't tell me to set the variable that always makes point equal
the end of the compile buffer.
Do instead break the dumb tradition of Top being top. Let's have emacs
give some clue as to how long the file is without us having to budge
from the first screen, etc.
I mean even the mere wimpy less(1) and even more(1) tell you what
percent you are on right there on the first screen.
Ya ya, I know they are talking about lines and you are talking about
screenfulls or whatever. But it is your mission, Jim, to get the info
one way or the other, to the user, in the modeline, right there, first
screen, no ifs ands or buts.
--
http://jidanni.org/ Taiwan(04)25854780
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: even more(1) tells you how big the file is on the first screen
2003-04-13 2:34 even more(1) tells you how big the file is on the first screen Dan Jacobson
@ 2003-04-14 2:36 ` Richard Stallman
2003-04-14 20:57 ` Dan Jacobson
[not found] ` <mailman.4612.1050362964.21513.bug-gnu-emacs@gnu.org>
[not found] ` <mailman.4535.1050287953.21513.bug-gnu-emacs@gnu.org>
1 sibling, 2 replies; 7+ messages in thread
From: Richard Stallman @ 2003-04-14 2:36 UTC (permalink / raw)
Cc: bug-gnu-emacs
You know, I think it's bad that no matter if we are looking
a giant file, or a little file, the mode line has that "Top"
item, instead of some indication of percent.
When the window start is at the top of the buffer,
the percentage of the buffer above the top is always 0.
I don't think "0%" is clearer than "Top".
In the case of Bot, some real information is actually omitted.
However, the information that the bottom of the buffer is on the screen
is also useful.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: even more(1) tells you how big the file is on the first screen
2003-04-14 2:36 ` Richard Stallman
@ 2003-04-14 20:57 ` Dan Jacobson
[not found] ` <mailman.4612.1050362964.21513.bug-gnu-emacs@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: Dan Jacobson @ 2003-04-14 20:57 UTC (permalink / raw)
>>>>> "RMS" == Richard Stallman <rms@gnu.org> writes:
RMS> You know, I think it's bad that no matter if we are looking
RMS> a giant file, or a little file, the mode line has that "Top"
RMS> item, instead of some indication of percent.
RMS> When the window start is at the top of the buffer,
RMS> the percentage of the buffer above the top is always 0.
RMS> I don't think "0%" is clearer than "Top".
Well, here, a face saving solution: you know those little dots
etc. that now appear in the very left margin on wrapped lines, and
after the bottom of the file, when one has indicate-empty-lines=t?
Well, it turns out that if you add a special mark for the beginning of
the file in the very left margin, then one does not anymore need to
rely on "Top" in the modeline to tell us we are on top.
Therefore, if the user enables that, then he should also have the
choice of having the modeline keep on indicating "traditional emacs
style percents" or "alternative more(1) style percents".
Anyway, how can we not convey how big the file is on the initial
screen when even the wimpy more(1) command has for what, 25 years?
(and less -M)
>>>>> "D" == David Kastrup <dak@gnu.org> writes:
D> for compile buffers and their ilk, ... They don't have to track a
D> moving target.
Ok, but for the general case of static files, the Swiss Army Knife of
editors looks like Swiss cheese when compared to more(1).
P.S., indicate-empty-lines's docstring should mention
default-indicate-empty-lines.
--
http://jidanni.org/ Taiwan(04)25854780
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.4612.1050362964.21513.bug-gnu-emacs@gnu.org>]
* Re: even more(1) tells you how big the file is on the first screen
[not found] ` <mailman.4612.1050362964.21513.bug-gnu-emacs@gnu.org>
@ 2003-04-15 20:59 ` Alan Mackenzie
2003-04-16 4:09 ` Dan Jacobson
0 siblings, 1 reply; 7+ messages in thread
From: Alan Mackenzie @ 2003-04-15 20:59 UTC (permalink / raw)
Dan Jacobson <jidanni@dman.ddts.net> wrote on Tue, 15 Apr 2003 04:57:00 +0800:
>>>>>> "RMS" == Richard Stallman <rms@gnu.org> writes:
> Well, here, a face saving solution: you know those little dots
> etc. that now appear in the very left margin on wrapped lines, and
> after the bottom of the file, when one has indicate-empty-lines=t?
> Well, it turns out that if you add a special mark for the beginning of
> the file in the very left margin, then one does not anymore need to
> rely on "Top" in the modeline to tell us we are on top.
Wouldn't work for those of us using Emacs without fringes.
> Therefore, if the user enables that, then he should also have the
> choice of having the modeline keep on indicating "traditional emacs
> style percents" or "alternative more(1) style percents".
> Anyway, how can we not convey how big the file is on the initial
> screen when even the wimpy more(1) command has for what, 25 years?
> (and less -M)
Dan, I tend to agree with you on the substantive points. I personally
think the mode line ought to contain the size of the file. Maybe this
was left out for efficiency reasons when the machines running emacs had
processor speeds measured in kilohertz rather than gigahertz. But until
(??) Emacs gets this update, try the following in your .emacs:
(defvar mode-line-changed-p nil)
(when (not mode-line-changed-p)
(setq-default mode-line-format
(append (butlast default-mode-line-format)
'((:eval (format "--P%s/%s" (point)
(save-restriction (widen)
(point-max)))))
(last default-mode-line-format)))
(setq mode-line-changed-p t))
--
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: even more(1) tells you how big the file is on the first screen
2003-04-15 20:59 ` Alan Mackenzie
@ 2003-04-16 4:09 ` Dan Jacobson
0 siblings, 0 replies; 7+ messages in thread
From: Dan Jacobson @ 2003-04-16 4:09 UTC (permalink / raw)
>>>>> "A" == Alan Mackenzie <none@example.invalid> writes:
A> '((:eval (format "--P%s/%s" (point)
A> (save-restriction (widen)
A> (point-max)))))
OK, but it seems to make too much excitement in the mode line for my
tastes.
Wait, I see in *Help*
%p -- print percent of buffer above top of window, or Top, Bot or All.
%P -- print percent of buffer above bottom of window, perhaps plus Top,
or print Bottom or All.
Apparently emacs is using one of them and I want to try the other, instead.
But long browsing in Info doesn't tell how to switch this part of the
mode line. OK, back in *Help*
mode-line-format's value is shown below...You can customize this variable.
But maybe it is default-mode-line-format that i want to customize, not
this. Plus I want to just add a couple lines to .emacs and not mess
with the customization Automatic Teller interface.
So how do I use the other %P/p? If I were to just paste the whole
default-mode-line-format into my .emacs just to change one char, my
.emacs would grow by 50 lines.
A> Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
A> (like "aa"), remove half of them (leaving, say, "a").
I was going to send you email, but I refuse to take the decoding exam
(Which I was inflicting on others too, only last year :-) See the
heartwarming story of how I came to grips with spam, and restored
honour to my email address, in http://jidanni.org/comp/config_en.html#spam )
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.4535.1050287953.21513.bug-gnu-emacs@gnu.org>]
* Re: even more(1) tells you how big the file is on the first screen
[not found] ` <mailman.4535.1050287953.21513.bug-gnu-emacs@gnu.org>
@ 2003-04-14 17:11 ` Kevin Rodgers
0 siblings, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2003-04-14 17:11 UTC (permalink / raw)
Richard Stallman wrote:
> When the window start is at the top of the buffer,
> the percentage of the buffer above the top is always 0.
> I don't think "0%" is clearer than "Top".
>
> In the case of Bot, some real information is actually omitted.
> However, the information that the bottom of the buffer is on the screen
> is also useful.
Agreed. But would it be possible to provide an additional mode line format
code analagous to %p but measuring the percent of the buffer below the bottom
of the window? Then users like Dan could add that to their customized
mode-line-format and have both values.
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.4502.1050203467.21513.bug-gnu-emacs@gnu.org>]
* Re: even more(1) tells you how big the file is on the first screen
[not found] <mailman.4502.1050203467.21513.bug-gnu-emacs@gnu.org>
@ 2003-04-13 10:10 ` David Kastrup
0 siblings, 0 replies; 7+ messages in thread
From: David Kastrup @ 2003-04-13 10:10 UTC (permalink / raw)
Dan Jacobson <jidanni@dman.ddts.net> writes:
> You know, I think it's bad that no matter if we are looking
> a giant file, or a little file, the mode line has that "Top"
> item, instead of some indication of percent. "Top" is more closed
> mouthed than an Army security officer.
> ---1:---F1 some_file (Fundamental)--L1--Top--
> We have to move the cursor down to engage the percent mechanism.
>
> RMS, I recall, was pleased, as top was top. However, I want more for
> my money without budging a finger. I.e. we have just done M-x
> compile. Does the compile output end just below the screen where we
> thought it should, or does it go on for page upon page?
One could just say Top 15%. However, there is a major drawback: for
compile buffers and their ilk, it would mean that even a buffer you
are not really interested in until it is finished will keep the mode
line busy and flashing. On a tty, this might impact your editing.
Ok, if done smartly, it can flash only 100 times, but it might be
distracting. Could be made configurable, though.
> I mean even the mere wimpy less(1) and even more(1) tell you what
> percent you are on right there on the first screen.
They don't have to track a moving target.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-04-16 4:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-13 2:34 even more(1) tells you how big the file is on the first screen Dan Jacobson
2003-04-14 2:36 ` Richard Stallman
2003-04-14 20:57 ` Dan Jacobson
[not found] ` <mailman.4612.1050362964.21513.bug-gnu-emacs@gnu.org>
2003-04-15 20:59 ` Alan Mackenzie
2003-04-16 4:09 ` Dan Jacobson
[not found] ` <mailman.4535.1050287953.21513.bug-gnu-emacs@gnu.org>
2003-04-14 17:11 ` Kevin Rodgers
[not found] <mailman.4502.1050203467.21513.bug-gnu-emacs@gnu.org>
2003-04-13 10:10 ` David Kastrup
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).