From: M Jared Finder <jared@hpalace.com>
To: emacs-devel@gnu.org
Subject: Re: Customizing the mode line
Date: Sat, 31 Oct 2009 10:46:23 -0700 [thread overview]
Message-ID: <hcht5g$up7$1@ger.gmane.org> (raw)
In-Reply-To: <837huberca.fsf@gnu.org>
Eli Zaretskii wrote:
>> From: Richard Stallman <rms@gnu.org>
>> CC: emacs-devel@gnu.org
>> Date: Sat, 31 Oct 2009 07:07:44 -0400
>>
>> I don't think that a better UI for customizing the mode line is a
>> really important place to improve. Customizing it is not that hard to
>> do.
>
> ??? Really? Then please describe how to do that. What user options
> are available for that, and what values one should give them for the
> following use-cases:
The first two are easy.
> . Show only the major mode, not the minor modes.
(setq minor-mode-alist nil) or customize mode-line-modes
> . Remove the percent/All/Top/Bot part.
Remove the first two entries of mode-line-position
> . Display the load-average and the Mail notification between the line
> number and the major/minor mode indicator.
Reordering the mode line is much harder (and would be greatly
appreciated by me). I think if you cleaned up mode-line-format so that
it only included VARIABLES, then this would be clear as day. Right now
mode-line-format's default value is big and scary (note, from Emacs22):
("%e"
#("-" 0 1
(help-echo "mouse-1: select (drag to resize), mouse-2 = C-x 1,
mouse-3 = C-x 0"))
mode-line-mule-info mode-line-modified mode-line-frame-identification
mode-line-buffer-identification
#(" " 0 3
(help-echo "mouse-1: select (drag to resize), mouse-2 = C-x 1,
mouse-3 = C-x 0"))
mode-line-position
(vc-mode vc-mode)
#(" " 0 2
(help-echo "mouse-1: select (drag to resize), mouse-2 = C-x 1,
mouse-3 = C-x 0"))
mode-line-modes
(which-func-mode
("" which-func-format
#("--" 0 2
(help-echo "mouse-1: select (drag to resize), mouse-2 = C-x 1,
mouse-3 = C-x 0"))))
(global-mode-string
(#("--" 0 2
(help-echo "mouse-1: select (drag to resize), mouse-2 = C-x 1,
mouse-3 = C-x 0"))
global-mode-string))
#("-%-" 0 3
(help-echo "mouse-1: select (drag to resize), mouse-2 = C-x 1,
mouse-3 = C-x 0")))
You could clean this up to be a lot clearer. Part of it is the pretty
printer is doing an awful job, part of it is the explicit propertized
strings. Imagine if it was like this:
(mode-line-mem-info
(:propertize "-" (mode-line-default-props))
mode-line-mule-info
mode-line-modified
mode-line-frame-identification
(:propertize " " (mode-line-default-props))
mode-line-position
mode-line-vc-info
mode-line-modes
mode-line-which-func-info
global-mode-string
(:propertize "-%-" (mode-line-default-props)))
And then you could expose this in Customize as a reorder-able list!
In short, I have four proposals:
1. Change mode-line-format to not include ANY explicitly propertized
strings. Use :eval and :propertize.
2. Remove condition branching in mode-line-format. Just variables with
formatting info should be there, put the branching in those variables.
3. Change the pretty-printer used by C-h v to somehow recognize that
mode-line-format should be formatted with a newline after every element.
4. Change the customize option for mode-line-format to display it as a
reorderable list, like c-mode-hook.
-- MJF
next prev parent reply other threads:[~2009-10-31 17:46 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-30 11:18 Customizing the mode line Eli Zaretskii
2009-10-30 11:28 ` Juanma Barranquero
2009-10-30 13:38 ` Stefan Monnier
2009-10-30 15:15 ` Eli Zaretskii
2009-10-30 16:54 ` Drew Adams
2009-10-30 17:18 ` Eli Zaretskii
2009-10-30 19:12 ` Stefan Monnier
2009-10-30 20:39 ` Eli Zaretskii
2009-10-31 5:16 ` Miles Bader
2009-10-31 8:47 ` Eli Zaretskii
2009-10-31 10:00 ` Juanma Barranquero
2009-10-31 16:03 ` Drew Adams
2009-10-31 16:29 ` Eli Zaretskii
2009-10-31 17:03 ` Drew Adams
2009-10-31 6:09 ` Manoj Srivastava
2009-10-31 10:31 ` Štěpán Němec
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
2009-11-04 16:36 ` Customizing the mode line Evil Boris
2009-10-30 15:01 ` joakim
2009-10-30 15:25 ` Eli Zaretskii
2009-10-30 21:55 ` Stephen Berman
2009-10-30 17:45 ` Chong Yidong
2009-10-30 20:41 ` Eli Zaretskii
2009-10-30 20:56 ` Lennart Borgman
2009-10-31 0:13 ` Stefan Monnier
2009-10-31 5:17 ` Justin Bogner
2009-10-31 5:19 ` Miles Bader
2009-10-31 11:07 ` Richard Stallman
2009-10-31 11:19 ` Juanma Barranquero
2009-11-01 9:28 ` Richard Stallman
2009-11-01 15:21 ` Juanma Barranquero
2009-10-31 11:27 ` Eli Zaretskii
2009-10-31 14:09 ` Robert J. Chassell
2009-10-31 14:30 ` Eli Zaretskii
2009-10-31 22:13 ` Robert J. Chassell
2009-10-31 22:40 ` Robert J. Chassell
2009-11-01 3:49 ` Eli Zaretskii
2009-10-31 18:55 ` Juanma Barranquero
2009-10-31 17:46 ` M Jared Finder [this message]
2009-10-31 18:30 ` Eli Zaretskii
2009-10-31 19:02 ` Juanma Barranquero
2009-10-31 14:33 ` Chong Yidong
2009-10-31 15:45 ` Eli Zaretskii
2009-10-31 18:07 ` Chong Yidong
2009-10-31 18:21 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='hcht5g$up7$1@ger.gmane.org' \
--to=jared@hpalace.com \
--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 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).