* modeline clock string
@ 2010-04-09 9:30 Yuri Goncharov
2010-04-09 10:18 ` Friedrich Delgado Friedrichs
0 siblings, 1 reply; 4+ messages in thread
From: Yuri Goncharov @ 2010-04-09 9:30 UTC (permalink / raw)
To: emacs-orgmode
I use xmonad with xmobar at my desktop. I'd like to add clock
string from mode line to xmobar. Is there way to save it to
file every time when update mode line?
--
Yuri Goncharov
system administrator
Highlink Ltd. St-Peterburg, Russia
+7 812 3341212
http://www.hl.ru
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: modeline clock string
2010-04-09 9:30 modeline clock string Yuri Goncharov
@ 2010-04-09 10:18 ` Friedrich Delgado Friedrichs
2010-04-12 5:38 ` Yuri Goncharov
0 siblings, 1 reply; 4+ messages in thread
From: Friedrich Delgado Friedrichs @ 2010-04-09 10:18 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 774 bytes --]
Yuri Goncharov schrieb:
> I use xmonad with xmobar at my desktop. I'd like to add clock
> string from mode line to xmobar. Is there way to save it to
> file every time when update mode line?
>
---Zitatende---
You can find information on various subjects with M-x apropos but it's
sometimes hard to find the right keyword. I emacs, certain functions
are called when certain events occur, those functions are called
hooks. I found display-time-hook by doing M-x apropos<ret>hook<ret>
and then searching for status (no result) and update (which yielded
display-time-hook).
See documentation of variable display-time-hook
HTH
--
Friedrich Delgado Friedrichs <friedel@nomaden.org>
TauPan on Ircnet and Freenode ;)
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: modeline clock string
2010-04-09 10:18 ` Friedrich Delgado Friedrichs
@ 2010-04-12 5:38 ` Yuri Goncharov
2010-04-14 15:50 ` Eric S Fraga
0 siblings, 1 reply; 4+ messages in thread
From: Yuri Goncharov @ 2010-04-12 5:38 UTC (permalink / raw)
To: emacs-orgmode
> Yuri Goncharov schrieb:
> > I use xmonad with xmobar at my desktop. I'd like to add clock
> > string from mode line to xmobar. Is there way to save it to
> > file every time when update mode line?
> >
> ---Zitatende---
>
> You can find information on various subjects with M-x apropos but it's
> sometimes hard to find the right keyword. I emacs, certain functions
> are called when certain events occur, those functions are called
> hooks. I found display-time-hook by doing M-x apropos<ret>hook<ret>
> and then searching for status (no result) and update (which yielded
> display-time-hook).
>
> See documentation of variable display-time-hook
Thanks to answer! I need some more help, because my knowledge of lisp
too poor. I found two hooks like I need org-clock-in-hook and
org-clock-out-hook. Function org-clock-get-clock-string returns string
that is showing in mode line. I cant figure how to write it in file.
Apologies to my english.
--
Yuri Goncharov
system administrator
Highlink Ltd. St-Peterburg, Russia
+7 812 3341212
http://www.hl.ru
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: modeline clock string
2010-04-12 5:38 ` Yuri Goncharov
@ 2010-04-14 15:50 ` Eric S Fraga
0 siblings, 0 replies; 4+ messages in thread
From: Eric S Fraga @ 2010-04-14 15:50 UTC (permalink / raw)
To: Yuri Goncharov; +Cc: emacs-orgmode
On Mon, 12 Apr 2010 09:38:15 +0400, Yuri Goncharov <gy@hl.ru> wrote:
>
>
>
>
> > Yuri Goncharov schrieb:
> > > I use xmonad with xmobar at my desktop. I'd like to add clock
> > > string from mode line to xmobar. Is there way to save it to
> > > file every time when update mode line?
> > >
> > ---Zitatende---
> >
> > You can find information on various subjects with M-x apropos but it's
> > sometimes hard to find the right keyword. I emacs, certain functions
> > are called when certain events occur, those functions are called
> > hooks. I found display-time-hook by doing M-x apropos<ret>hook<ret>
> > and then searching for status (no result) and update (which yielded
> > display-time-hook).
> >
> > See documentation of variable display-time-hook
>
> Thanks to answer! I need some more help, because my knowledge of lisp
> too poor. I found two hooks like I need org-clock-in-hook and
> org-clock-out-hook. Function org-clock-get-clock-string returns string
> that is showing in mode line. I cant figure how to write it in file.
> Apologies to my english.
>
> --
> Yuri Goncharov
Maybe this will help:
--8<---------------cut here---------------start------------->8---
;; ---------------------------------------------------------------------------- DISPLAY-TIME
(display-time)
(defun esf/org-clocking-info-to-file ()
(with-temp-file "~/tmp/clocking"
;; (message (org-clock-get-clock-string))
(if (org-clock-is-active)
(insert (format "org: %d/%d min"
(- (org-clock-get-clocked-time) org-clock-total-time)
(org-clock-get-clocked-time))
)
) ;;(org-clock-get-clock-string)
)
)
(add-hook 'display-time-hook 'esf/org-clocking-info-to-file)
--8<---------------cut here---------------end--------------->8---
I use this to place information on clocking at the top of my display
(using dzen2 with ratpoison). I have minimal space so only include
the time information, not the full information which typically
includes the org-heading being clocked.
This doesn't work properly if you have two emacs instances but I can't
be bothered to improve it as I *never* have two or more emacs
running... that's what emacsclient is for, after all... ;-)
HTH,
eric
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-14 16:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-09 9:30 modeline clock string Yuri Goncharov
2010-04-09 10:18 ` Friedrich Delgado Friedrichs
2010-04-12 5:38 ` Yuri Goncharov
2010-04-14 15:50 ` Eric S Fraga
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.