From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: xah lee Newsgroups: gmane.emacs.bugs Subject: bug#1355: suggestion on the modeline Date: Sat, 15 Nov 2008 17:09:36 -0800 Message-ID: Reply-To: xah lee , 1355@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1226827522 17516 80.91.229.12 (16 Nov 2008 09:25:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Nov 2008 09:25:22 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 16 10:26:23 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L1dtf-0004W7-2S for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Nov 2008 10:26:23 +0100 Original-Received: from localhost ([127.0.0.1]:34935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1dsW-0002Gq-G3 for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Nov 2008 04:25:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1WSu-00034Q-9F for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 20:30:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L1WSt-00033o-9L for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 20:30:15 -0500 Original-Received: from [199.232.76.173] (port=40231 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1WSt-00033j-5Q for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 20:30:15 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:51453) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L1WSs-0000ar-Bk for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 20:30:14 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAG1U81D022885; Sat, 15 Nov 2008 17:30:09 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAG1K389020070; Sat, 15 Nov 2008 17:20:03 -0800 X-Loop: don@donarmstrong.com Resent-From: xah lee Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 16 Nov 2008 01:20:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1355 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122679781318535 (code B ref -1); Sun, 16 Nov 2008 01:20:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 16 Nov 2008 01:10:13 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAG1A8K0018237 for ; Sat, 15 Nov 2008 17:10:10 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1W9Q-0008I2-5D for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 20:10:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L1W9N-0008Hg-HQ for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 20:10:05 -0500 Original-Received: from [199.232.76.173] (port=54266 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1W9N-0008Hd-9n for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 20:10:05 -0500 Original-Received: from mout.perfora.net ([74.208.4.197]:61013) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L1W9M-00082u-Vm for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2008 20:10:05 -0500 Original-Received: from [192.168.1.5] (c-24-6-185-159.hsd1.ca.comcast.net [24.6.185.159]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1L1W974Alu-0007kI; Sat, 15 Nov 2008 20:09:54 -0500 X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX19kjytw6ekZtR8vkAqbgIkfCrEr8ptrBh6uDES aA2CL6ZubC9Ffd7dWfdnF7nBbgmVfaupnstk7Ue1gtasBympWd RPldsAUms0RFgeJA6vakA== X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6? (barebone, rare!) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 15 Nov 2008 20:30:15 -0500 X-Mailman-Approved-At: Sun, 16 Nov 2008 04:25:09 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:22410 Archived-At: Dear emacs developers, Recently there's a question in gnu.help.emacs about how to disable =20 the buffer switching behavior of mouse clicking on the buffer name in =20= mode line. Out of this discussion i wrote a little essay on =20 suggestions on the emacs mode line. The essay is here: http://xahlee.org/emacs/modernization_mode_line.html I think this would make emacs more easier for the average programer =20 or writer but does not subtract its power. Here's what i think, for =20 what its worth. Thanks. --------------------------------------------- Emacs's Mode Line Modernization Suggestions Xah Lee, 2008-12 This article gives some suggestions on improving emacs's =E2=80=9Cmode =20= line=E2=80=9D, 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: =E2=80=A2 The start of the mode line, displaying the coding system used = such =20 as =E2=80=9C-u=E2=80=9D, =E2=80=9C-uuu=E2=80=9D, and displaying the = modification status like =20 =E2=80=9C:**=E2=80=9D, =E2=80=9C%%=E2=80=9D, =E2=80=9C%*=E2=80=9D are = quite cryptic. Having used emacs for =20 10 years, these are still not burned into my brain. And it's not easy =20= to look them up what they are unless you are emacs diehard. (e.g. =20 you'll have to know it's technically called =E2=80=9Cmode line=E2=80=9D, = then =20 you'll have to know about emacs-index-search, and in general familiar =20= with info and emacs) It'd better to instead say =E2=80=9CRead Only=E2=80=9D instead of = =E2=80=9C%*=E2=80=9D, and =20 show =E2=80=9CModified=E2=80=9D instead of the =E2=80=9C**=E2=80=9D. = (don't show anything when =20 it's =E2=80=9C--=E2=80=9D) =E2=80=A2 The coding system shown in mode line should be removed. = Because, =20 for vast majority of programers, he rarely deals with different file =20 coding systems or coding system change, perhaps just few times a =20 year. It is not something programers encounter on a daily basis. =20 Also, 3 letter-code is cryptic for conveying file coding system, =20 especially today because there are lots of them. The current coding =20 system should be shown perhaps in the menu somewhere, and allow users =20= to change thru menu. For programers who deals with different file =20 systems or coding systems hourly and need it be displayed on the mode =20= line, perhaps emacs can introduce a customization feature so that the =20= full coding system is displayed in modeline. =E2=80=A2 The cursor location percentage should by default not shown if =20= emacs is running in GUI with scroll bar. (this is sometimes shown as =20 =E2=80=9CTop=E2=80=9D or =E2=80=9CBot=E2=80=9D) GUI scroll bar gives = intuitive indication of =20 where cursor are in relation to the whole buffer, and also gives a =20 indication of the screen display size in relation to the buffer size, =20= and conveys these info faster. =E2=80=A2 When emacs is running in a terminal, the special indicator =20 =E2=80=9CTop=E2=80=9D and =E2=80=9CBot=E2=80=9D should be shown as = percentage as usual, =20 because for someone uninitiated, consistent changing of percentage as =20= he moves the cursor is more intuitive. The code =E2=80=9CTop=E2=80=9D = and =20 =E2=80=9CBot=E2=80=9D could mean many things =E2=80=A2 Minor mode should not be displayed in mode line. It's = confusing. =20 For one reason, it by default selectively display only some of the =20 minor modes currently on, and the selective process is not something =20 people who intuitively understands. For the other reason, Emacs's =20 technical concept of Minor mode is somewhat confusing. Most minor =20 modes in practice can be thought of as Preferences settings (Mac-=20 speak) or Options (Windows-speak and Linux Desktops). =E2=80=A2 Line number mode should be on by default. So that, the line = number =20 shows in the mode line. How to show line number is a frequently asked =20= question. =E2=80=A2 Clicking on the file name should not switch buffer. It could = do =20 contextual menu listing user buffers instead. (user buffer here are =20 those not starting with =E2=80=9C*=E2=80=9D) =E2=80=A2 Clicking on the major mode name should pop up a contextual = menu to =20 let user switch to popular major modes. (e.g. C, C++, java, perl, =20 php, bash, javascript, html/xml, python, text, LaTeX, elisp.) Summary I think the mode line should be like this: =E2=80=B9buffer name=E2=80=BA =E2=80=B9major mode name=E2=80=BA =E2=80=B9l= ine num=E2=80=BA =20 =E2=80=B9status=E2=80=BA------------------- 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. =20= Possibly making the mode line's background red, or add a word =20 =E2=80=9C(root)=E2=80=9D on the right. Some indication of being root is = a =20 frequently requested feature. If running in a GUI, clicking on the buffer name should show menu =20 list of user buffers, those not starting with a =E2=80=9C*=E2=80=9D. Clicking on the major mode name should show a menu of commonly used =20 major modes, allowing user a easy way to switch. (currently, emacs =20 has no intuitive way for user to switch a mode or know what modes are =20= available. This is also a FAQ item.) Clicking on linePos/charPos show a menu that allow user to turn on/=20 off line number mode or char number mode. Clicking on the Read Only or =E2=80=9CModified=E2=80=9D, should show a = menu =20 allowing user to toggle Read Only. Clicking the rest of the mode line displaying =E2=80=9C--------=E2=80=9D, = can show =20 all the useful info about the current buffer. For example: modified/=20 read status, mode settings, minor modes, encoding used. This can be =20 done as a new split window much like describe-function would. In the =20 result pane, it can show status of other buffer local vars that are =20 related to text editing (such as case sensitive search, how lines are =20= wrapped, length for truncation, margin ... ). With links or active =20 text that lets user toggle or set new vals easily (similar to the UI =20 of the customize function). All these clicking should be Right Click, which is more standard =20 behavior of clicking on things for contextual menu. (e.g. in Windows, =20= Mac, Linux, system wide, and in Firefox and other browsers.) =E2=80=A2 The term =E2=80=9Cmode line=E2=80=9D could be changed to = =E2=80=9Cstatus bar=E2=80=9D in =20 the manuals. =E2=80=9CStatus bar=E2=80=9D is more understandable to = modern users. Xah =E2=88=91 http://xahlee.org/ =E2=98=84