From: Matthew Lundin <mdl@imapmail.org>
To: Matthew Lundin <mdl@imapmail.org>
Cc: emacs org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Move org-clock info to left in mode-line?
Date: Mon, 06 Jul 2009 13:56:37 -0500 [thread overview]
Message-ID: <87fxd9r66y.fsf@fastmail.fm> (raw)
In-Reply-To: 87skh9zmvh.fsf@fastmail.fm
>> Matthew Lundin <mdl@imapmail.org> 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
prev parent reply other threads:[~2009-07-06 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-06 17:09 Move org-clock info to left in mode-line? Matthew Lundin
2009-07-06 17:52 ` Nick Dokos
2009-07-06 18:29 ` Matthew Lundin
2009-07-06 18:56 ` Matthew Lundin [this message]
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.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fxd9r66y.fsf@fastmail.fm \
--to=mdl@imapmail.org \
--cc=emacs-orgmode@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/org-mode.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).