From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Customizing the mode line Date: Sat, 31 Oct 2009 20:30:39 +0200 Message-ID: <83ocnnct68.fsf@gnu.org> References: <83skd1dta0.fsf@gnu.org> <837huberca.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1257013947 6630 80.91.229.12 (31 Oct 2009 18:32:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2009 18:32:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: M Jared Finder Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 31 19:32:19 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N4IkK-00014w-Uu for ged-emacs-devel@m.gmane.org; Sat, 31 Oct 2009 19:32:17 +0100 Original-Received: from localhost ([127.0.0.1]:39317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4IkK-00024x-I4 for ged-emacs-devel@m.gmane.org; Sat, 31 Oct 2009 14:32:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4Iiu-0001AX-GP for emacs-devel@gnu.org; Sat, 31 Oct 2009 14:30:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4Iip-00018J-Jw for emacs-devel@gnu.org; Sat, 31 Oct 2009 14:30:47 -0400 Original-Received: from [199.232.76.173] (port=39251 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4Iip-00018E-FQ for emacs-devel@gnu.org; Sat, 31 Oct 2009 14:30:43 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:63390) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N4Iip-0000Ug-2d for emacs-devel@gnu.org; Sat, 31 Oct 2009 14:30:43 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0KSE00B005ZRQB00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Sat, 31 Oct 2009 20:30:39 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.70.37.193]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KSE007ZP632GBC0@a-mtaout23.012.net.il>; Sat, 31 Oct 2009 20:30:39 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116525 Archived-At: > From: M Jared Finder > Date: Sat, 31 Oct 2009 10:46:23 -0700 > > Eli Zaretskii wrote: > >> From: Richard Stallman > >> 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. Not really. > > . Show only the major mode, not the minor modes. > > (setq minor-mode-alist nil) "C-h v minor-mode-alist RET" produces a 100-odd line long "*Help*" buffer, where even I get lost. And how did you know that setting it to nil will do the trick? the doc string doesn't tell. > or customize mode-line-modes This one produces a 123-line "*Help*" buffer. Most users will not know how even to start customizing it, because the various portions of the spec are not documented at all. > > . Remove the percent/All/Top/Bot part. > > Remove the first two entries of mode-line-position Come on! "C-h v" on this variable produces a 71-line "*Help*" buffer for just 3 indicators. If this is user-friendly UI, then I don't know what a user-friendly UI is. > 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. Sounds like a good plan. Thanks.