emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Move org-clock info to left in mode-line?
@ 2009-07-06 17:09 Matthew Lundin
  2009-07-06 17:52 ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Lundin @ 2009-07-06 17:09 UTC (permalink / raw)
  To: emacs org-mode mailing list

Hi everyone,

I've made some progress in understanding emacs this past year, but
customizing the mode-line eludes me.

When I clock into an item in org-mode, the clock information is always
at the extreme right of the mode line --- and thus unable to be seen
unless I make my emacs window full screen.

(Most of my buffers have a ton of minor modes, which are all listed in
the mode line and push everything else out of sight).

Interestingly, if I have other modes contributing to the mode line, the
org-mode-line-string is always placed at the end of the
global-mode-string:

,----
| global-mode-string is a variable defined in `C source code'.
| Its value is 
| ((t jabber-activity-mode-string)
|  "" appt-mode-string display-time-string org-mode-line-string)
`----

I would be most grateful for any tips on how I might move the org-clock
information farther to the left in the mode line.

Thanks,
Matt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Move org-clock info to left in mode-line?
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2009-07-06 17:52 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs org-mode mailing list

Matthew Lundin <mdl@imapmail.org> wrote:

> I've made some progress in understanding emacs this past year, but
> customizing the mode-line eludes me.
> 
> When I clock into an item in org-mode, the clock information is always
> at the extreme right of the mode line --- and thus unable to be seen
> unless I make my emacs window full screen.
> 
> (Most of my buffers have a ton of minor modes, which are all listed in
> the mode line and push everything else out of sight).
> 
> Interestingly, if I have other modes contributing to the mode line, the
> org-mode-line-string is always placed at the end of the
> global-mode-string:
> 
> ,----
> | global-mode-string is a variable defined in `C source code'.
> | Its value is 
> | ((t jabber-activity-mode-string)
> |  "" appt-mode-string display-time-string org-mode-line-string)
> `----
> 
> I would be most grateful for any tips on how I might move the org-clock
> information farther to the left in the mode line.
> 

I think the variable you want is ``mode-line-format''.

HTH,
Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Move org-clock info to left in mode-line?
  2009-07-06 17:52 ` Nick Dokos
@ 2009-07-06 18:29   ` Matthew Lundin
  2009-07-06 18:56     ` Matthew Lundin
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Lundin @ 2009-07-06 18:29 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Matthew Lundin, emacs org-mode mailing list

Nick Dokos <nicholas.dokos@hp.com> writes:

> Matthew Lundin <mdl@imapmail.org> wrote:
>
>> I've made some progress in understanding emacs this past year, but
>> customizing the mode-line eludes me.
>> 
>> When I clock into an item in org-mode, the clock information is always
>> at the extreme right of the mode line --- and thus unable to be seen
>> unless I make my emacs window full screen.
>> 
>> (Most of my buffers have a ton of minor modes, which are all listed in
>> the mode line and push everything else out of sight).
>> 
>> Interestingly, if I have other modes contributing to the mode line, the
>> org-mode-line-string is always placed at the end of the
>> global-mode-string:
>> 
>> ,----
>> | global-mode-string is a variable defined in `C source code'.
>> | Its value is 
>> | ((t jabber-activity-mode-string)
>> |  "" appt-mode-string display-time-string org-mode-line-string)
>> `----
>> 
>> I would be most grateful for any tips on how I might move the org-clock
>> information farther to the left in the mode line.
>> 
>
> I think the variable you want is ``mode-line-format''.

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.

Best,
Matt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Move org-clock info to left in mode-line?
  2009-07-06 18:29   ` Matthew Lundin
@ 2009-07-06 18:56     ` Matthew Lundin
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Lundin @ 2009-07-06 18:56 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: emacs org-mode mailing list

>> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-06 18:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this 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).