help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs mode line suggestions


From: Xah
Subject: Re: emacs mode line suggestions
Date: Sat, 15 Nov 2008 17:54:02 -0800 (PST)
User-agent: G2/1.0

On Nov 15, 1:23 am, Eli Zaretskii <e...@gnu.org> wrote:
> > From:Xah<xah...@gmail.com>
> > Date: Fri, 14 Nov 2008 15:18:31 -0800 (PST)
>
> > • that the buffer location percentage should by default not shown if
> > emacs is running in GUI with scroll bar.
>
> This is already the default on _all_ types of displays, and has been
> so since day one, even when Emacs didn't support scroll bars.

umm? on my carbon emacs (based on emacs 22.x), it still show cursor
location percentage.

In my x11 emacs running in gui (emacs 21.x) with scroll bar, it also
shows this percentage.

> > • clicking on the file name should not switch buffer.
>
> That's not the file name, that's the buffer name.

please get the over all picture, not bone picking.

> As for what it should do, I don't see why your preference is better
> than the current one.  Popping a menu requires another click to
> actually select a buffer, whereas the current behavior does it in one
> click.

typically, a user has several user buffers open, and as far as i guess
many programers who use emacs extensively has like hundreds of buffers
open. Cycling them one by one is not much useful.

Counting emacs's own buffers, those info, messages, scratch,
completions, grep output, shell output, C-h f and friends output,
dictionary lookup output, ispell output, man page output ... etc...
these are typically looked once and not useful afterwards. Switching
and cycling thru them are not much useful.

> Since there's a menu-bar menu item to do what you want, I
> don't see a problem.

it's more about what would be a useful behavior for clicking on the
buffer name section of mode line, not about whether suggested
functionality already exists somewhere. For example, the functionality
of cycling thru buffers also is already in the menu under Buffers.

i don't necessarily disagree with every point you make. But please
consider the over all suggestion, as opposed to seeming to have a nay-
say attitude and turn down the whole thing.

> > • Minor mode should not be displayed there. It's confusing.
>
> Emacs always displayed it.  Get used to it.

the question is not about what emacs is. It is about what is better
for emacs.

if we already stick with what emacs always has been, there'd be no
progress.

here's a refined suggestion on the minor mode in mode line point:

• Minor mode should not be displayed in mode line. It's confusing. For
one reason, it by default selectively display only some of the minor
modes currently on, and the selective process is not something people
who intuitively understands. For the other reason, Emacs's technical
concept of Minor mode is somewhat confusing. Most minor modes in
practice are Preferences settings (Mac-speak) or Options (Windows-
speak and Linux Desktops) from user point of view.

> > • Clicking on the major mode name should pop up a contextual menu to
> > let user switch to major major modes.
>
> Switching a major mode is a very rare command, so having this at your
> fingertips makes no sense, IMO.

switching between modes is not rarely used. I'd estimate it is used
every other hour at least.

> > • line number mode should be on by default. So that, the line number
> > shows in the mode line.
>
> This already is the default.

Opps, you are right. Thanks.

> > The coding system shown in mode line should be removed. The current
> > coding system should be shown in the menu somewhere
>
> It's an important piece of information, and takes only one position in
> the mode line.  I always hated the way IE and Outlook hide this
> somewhere under View, because I might wish to know the current
> encoding even if I don't need to switch it.
>
> > and allow users to change [coding system] thru menu.
>
> Emacs does have the change encoding part in the menu.

I have refined my previous writings about the mode line suggestions.
It has more neutral wording, with more explanations. This came in part
when i just filed a bug report to GNU as suggestions so that
developers have a chance to review this opinion.

Please give it another try. The url is here:

• Emacs's Mode Line Modernization Suggestions
http://xahlee.org/emacs/modernization_mode_line.html

plain text version follows:
-----------------

Emacs's Mode Line Modernization Suggestions

Xah Lee, 2008-12

This article gives some suggestions on improving emacs's “mode line”,
so that it is more intuitive and useful.

I think the mode line is one of emacs's problem in usability.
emacs mode line

above: Emacs's mode line.

Here's what i think are better default:

• The start of the mode line, displaying the coding system used such
as “-u”, “-uuu”, and displaying the modification status like “:**”, “%
%”, “%*” are quite cryptic. Having used emacs for 10 years, these are
still not burned into my brain. And it's not easy to look them up what
they are unless you are emacs diehard. (e.g. you'll have to know it's
technically called “mode line”, then you'll have to know about emacs-
index-search, and in general familiar with info and emacs)

It'd better to instead say “Read Only” instead of “%*”, and show
“Modified” instead of the “**”. (don't show anything when it's “--”)

• The coding system shown in mode line should be removed. Because, for
vast majority of programers, he rarely deals with different file
coding systems or coding system change, perhaps just few times a year.
It is not something programers encounter on a daily basis. Also, 3
letter-code is cryptic for conveying file coding system, especially
today because there are lots of them. The current coding system should
be shown perhaps in the menu somewhere, and allow users to change thru
menu. For programers who deals with different file systems or coding
systems hourly and need it be displayed on the mode line, perhaps
emacs can introduce a customization feature so that the full coding
system is displayed in modeline.

• The cursor location percentage should by default not shown if emacs
is running in GUI with scroll bar. (this is sometimes shown as “Top”
or “Bot”) GUI scroll bar gives intuitive indication of where cursor is
in relation to the whole buffer, and also gives a indication of the
screen display size in relation to the buffer size, and conveys these
info faster.

• When emacs is running in a terminal, the special indicator “Top” and
“Bot” should be shown as percentage as usual, because for someone
uninitiated, consistent changing of percentage as he moves the cursor
is more intuitive. The code word “Top” and “Bot” could mean many
things to first time users.

• Minor mode should not be displayed in mode line. It's confusing. For
one reason, it by default selectively display only some of the minor
modes currently on, and the selective process is not something people
who intuitively understands. For the other reason, Emacs's technical
concept of Minor mode is somewhat confusing. Most minor modes in
practice are Preferences settings (Mac-speak) or Options (Windows-
speak and Linux Desktops) from user point of view.

• Line number mode should be on by default. So that, the line number
shows in the mode line. How to show line number is a frequently asked
question.

• Clicking on the file name should not switch buffer. It could do
contextual menu listing user buffers instead. (user buffer here are
those not starting with “*”)

• Clicking on the major mode name should pop up a contextual menu to
let user switch to major modes that are familiar to majority of
average programers. (e.g. C, C++, java, perl, php, bash, javascript,
html/xml, python, text, LaTeX, elisp.) The menu can have a “More...”
submenu to show all other available major modes.

Summary

I think the mode line should be like this:

‹buffer name› ‹major mode name› ‹line num› ‹status›-------------------

where the status is Modified or Read Only.

Here's a example of such actual display:

elisp_basics.html    html-mode    L19    Modified-------------------

Also, when editing as root, it'd be nice to indicate it in mode line.
Possibly making the mode line's background red, or add a word “(root)”
on the right. Some indication of being root is a frequently requested
feature.

If running in a GUI, clicking on the buffer name should show menu list
of user buffers, those not starting with a “*”.

Clicking on the major mode name should show a menu of commonly used
major modes, allowing user a easy way to switch. (currently, emacs has
no intuitive way for user to switch a mode or know what modes are
available. This is also a FAQ item.)

Clicking on linePos/charPos show a menu that allow user to turn on/off
line number mode or char number mode.

Clicking on the Read Only or “Modified”, should show a menu allowing
user to toggle Read Only.

Clicking the rest of the mode line displaying “--------”, can show all
the useful info about the current buffer. For example: modified/read
status, mode settings, minor modes, encoding used. This can be done as
a new split window much like describe-function would. In the result
pane, it can show status of other buffer local vars that are related
to text editing (such as case sensitive search, how lines are wrapped,
length for truncation, margin ... ). With links or active text that
lets user toggle or set new vals easily (similar to the UI of the
customize function).

All these clicking should be Right Click, which is more standard
behavior of clicking on things for contextual menu. (e.g. in Windows,
Mac, Linux, system wide, and in Firefox and other browsers.)

• The term “mode line” could be changed to “status bar” in the
manuals. “Status bar” is more understandable to modern users.

  Xah
∑ http://xahlee.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]