From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: customizing minibuffer and the message bar, ie mode-line Date: Mon, 20 Apr 2015 23:38:41 +0200 Organization: Aioe.org NNTP Server Message-ID: <87iocqeazi.fsf@debian.uxu> References: <682e54d4-38b9-49ad-8e3b-0e7ab4451bdb@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1429565724 11831 80.91.229.3 (20 Apr 2015 21:35:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Apr 2015 21:35:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 20 23:35:24 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YkJLc-0001tu-Ub for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Apr 2015 23:35:21 +0200 Original-Received: from localhost ([::1]:55421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkJLc-0003Co-7j for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Apr 2015 17:35:20 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 97 Original-NNTP-Posting-Host: feB02bRejf23rfBm51Mt7Q.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:ITtZM0IWB7nHmjPRw/NWPBB89nA= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:211608 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103889 Archived-At: Marcin Borkowski writes: > While I rather agree with the above (especially that > "professional" was not defined here, and it seems > not necessarily to be an objective quality - for > instance, it might mean a completely different thing > for various, well, professions, like writer vs. > programmer), one must admit that there is a lot of > information in the mode-line (even with only the > default settings), which may be distracting. Yes. Especially if you have a big font like me there is far too much information to fit (my terminal is 85 chars wide). [Mode line code last in the post, for the impatient.] > (Personally, I did it with the (in a sense) opposite > goal in mind: so that I can cramp /even more/ info > in the mode-line, e.g. Org-mode's currently clocked > task, which-function mode and a bunch of minor modes > I use every day.) My take is you should have everything you need, and nothing you do not need. So it is never a matter of having "less" or "more", it is always to have exactly what you need, and always so. This cannot be planned on the drawing table but must be worked out day in, day out. As in, whenever I find I hit a command frequently to get a piece of information, I think - can I put that information somewhere so I don't have to hit the command each time to get it? But sometimes there is just no room. There are clever schemes to solve such issues, as always. For example, I have CAPS bring up the *Buffer List*. In the buffer list, I don't need anything "buffery" information in the mode bar as I see in the main buffer it is a buffer list, and I don't need anything else. So then I can use the mode bar for that mode and put common data I frequently need. That way I only have to hit CAPS to get it, then M-TAB to get back (note the positions of those keys on the keyboard). [If I did it today I would put CAPS in the *Buffer List* to get to the previous buffer, i.e., to get back. Now that lists non-file buffers as well, which is practical, so it isn't worth the effort to reprogram my hands which takes considerably longer than reprogramming the keys, for sure.] Indeed, such solutions are like the familiar pile of firewood by the outhouse. Instead of saying "let's move the firewood and be done with it", every time you go to the outhouse, you bring back a log under each arms. Multiple purpose walking - even (and especially) in the Emacs wellingtons! Now, this is how I set up the mode line to be reactive on specific modes. The best way would probably be to not have to do that: instead all modes would have a format variable string, e.g. the Gnus `gnus-group-mode-line-format', the ERC `erc-mode-line-format', and so on. (Hey - what a social guy!) For context, is the file URL: http://user.it.uu.se/~embe8573/conf/emacs-init/mode-line.el With the most relevant (indispensible) code: (setq-default mode-line-format `(" " (:eval (if (not (or buffer-read-only (member major-mode '(erc-mode inferior-emacs-lisp-mode message-mode) ))) mode-line-modified) ) " " (:eval (if (eq major-mode 'w3m-mode) w3m-current-title (if dired-directory dired-directory (if (eq major-mode 'message-mode) (buffer-name) (if buffer-file-name (abbreviate-file-name buffer-file-name) mode-line-buffer-identification ))))) " " (show-modes mode-line-modes) (line-number-mode "[%l] ") (column-number-mode "{%c} ") )) -- underground experts united http://user.it.uu.se/~embe8573