emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Move org-clock info to left in mode-line?


From: Matthew Lundin
Subject: [Orgmode] Re: Move org-clock info to left in mode-line?
Date: Mon, 06 Jul 2009 13:56:37 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>> Matthew Lundin <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]