From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Lundin Subject: Re: Move org-clock info to left in mode-line? Date: Mon, 06 Jul 2009 13:56:37 -0500 Message-ID: <87fxd9r66y.fsf@fastmail.fm> References: <87vdm5sppf.fsf@fastmail.fm> <7883.1246902725@alphaville.usa.hp.com> <87skh9zmvh.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNtKd-00087d-Bx for emacs-orgmode@gnu.org; Mon, 06 Jul 2009 14:54:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNtKY-00086n-F2 for emacs-orgmode@gnu.org; Mon, 06 Jul 2009 14:54:26 -0400 Received: from [199.232.76.173] (port=41905 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNtKY-00086k-9j for emacs-orgmode@gnu.org; Mon, 06 Jul 2009 14:54:22 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:55530) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MNtKX-0007Xs-Vg for emacs-orgmode@gnu.org; Mon, 06 Jul 2009 14:54:22 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matthew Lundin Cc: emacs org-mode mailing list >> Matthew Lundin wrote: > Thanks! I was able to move the global-mode-string farther up in > the default-mode-line-format variable. Now if only I could get the > org-mode-line-string as the first entry in the global-mode-string. > > Upon further reflection, I decided I would prefer the following behavior: > > - When I clock into an item, a header line appears with the > org-mode-line-string -- i.e., the clock information. > > - When I clock out of an item, the header line disappears (i.e., > header-line-format is set to nil). > > I'll see if I can cook something up using the org-clock hooks. Here's my rather crude solution: --8<---------------cut here---------------start------------->8--- (setq org-clock-in-hook '(lambda () (setq default-header-line-format '((" " org-mode-line-string " "))))) (setq org-clock-out-hook '(lambda () (setq default-header-line-format nil))) (setq org-clock-cancel-hook '(lambda () (setq default-header-line-format nil))) --8<---------------cut here---------------end--------------->8--- Works so far. Obviously, if I had already set default-header-line-format, this solution would be no good. I'll keep my fingers crossed. - Matt