[O] Clocking time in frame title bar

2012-02-23 Thread Borbus
Hi,

I'm really enjoying using org-mode's clocking features and it's nice
that it shows the current task and total clocking time in the modeline
but for me there is a problem with this: I often have multiple windows
open and my frame is split horizontally.  This means the modeline is too
short to contain this information.  Also even if I could see it, it's
being displayed redundantly in multiple modelines.

So I thought about how it could be different and I realised something: I
use the emacs GTK GUI but I turn off most things, scrollbars, menubars
etc. but there is one thing still wasting space: the frame title bar.
So why not use this space?

I know emacs lisp and I'm happy to write a patch for this myself, but
before I dive in I would like to ask a couple of questions here: first,
does this sounds feasible?  Is there something I don't know about the
frame title that would make it unsuitable for being constantly updated
like the modeline?  Secondly, if it seems feasible, where is the best
place to start in the org code (org-clock.el I guess) and would there be
a preferable way to be able to switch this feature on and off?

Thanks,

Borbus.



Re: [O] Clocking time in frame title bar

2012-02-23 Thread Borbus
Well I just went ahead and wrote the hack anyway and it seems to work
for me, here is what I did:

;; show clock and timer stuff in the frame title
(defvar plain-frame-title-format frame-title-format)
(defun clock-in-frame-title ()
  (if (org-clocking-p)
  (setq frame-title-format (list (concat
  (car plain-frame-title-format)
   :: Clocked in: 
  (org-clock-get-clock-string)
   :: Pomodoro:
  org-timer-mode-line-string)))
(setq frame-title-format plain-frame-title-format)))
(run-at-time t 1 'clock-in-frame-title)
(add-hook 'org-clock-in-hook 'clock-in-frame-title)
(add-hook 'org-clock-out-hook 'clock-in-frame-title)
(add-hook 'org-clock-cancel-hook 'clock-in-frame-title)

Any comments? Is run-at-time the best thing to use here?  Note that I
use the Pomodoro method and use the code to start the Pomodoro that was
posted to this list previously: http://orgmode.org/worg/org-gtd-etc.html

Borbus.



Re: [O] Non-interactive insertion of future-dates

2012-01-25 Thread Borbus
On 25/01/12 16:42, Simon Campese wrote:
 I want to setup a capture-template that sets a
 SCHEDULE-property in the future (say one week from today) without any
 user interaction.
 
 Currently, I almost achieve this by inserting the line
 
 :SCHEDULED: %(org-read-date nil nil nil nil nil +1w)
 
 into my template. When I now call the template, I end up in the
 date-time-prompt, with +1w prefilled, so that manually have to press
 enter. 

I think what you want is to use the parameter from-string which doesn't
ask for a user input at all but just uses that string as if you did
input it interactively:

(org-read-date nil nil +1w)

-- 
Borbus.



[O] Odd problem with time of 10:00

2012-01-14 Thread Borbus
Hi,

I have noticed a strange problem with org-agenda when a task contains a
timestamp of 10:00 in it, for example this entry is in one of my agenda
files:

** Test 2012-01-17 Mon 10:00

I now press C-c a a and select the day and press d (so I'm viewing the
day) and get this:

Day-agenda (W03):
Tuesday17 January 2012
   8:00.. 
  appt:   10:00.. Test
  10:00.. 
  12:00.. 
  14:00.. 
  16:00.. 
  18:00.. 
  20:00.. 

Notice that it places the 10:00 appointment in the 9:00 place.  Now, if
I change the time to 10:01 (or any number of minutes past) I get this:

Day-agenda (W03):
Tuesday17 January 2012
   8:00.. 
  10:00.. 
  appt:   10:01.. Test
  12:00.. 
  14:00.. 
  16:00.. 
  18:00.. 
  20:00.. 

So it is now occupying the 11:00 place and there is no 9:00 place!

I have done some tests and it seems to only occur with the 10th hour.
All appointments seem to still show so it's not a major bug, just an
aesthetic one.  Any ideas?

-- 
Borbus.



Re: [O] Odd problem with time of 10:00

2012-01-14 Thread Borbus
On 14/01/12 10:49, Sebastien Vauban wrote:
 Detlef Steuer wrote:
 If you take a close look, you'll see you only have a grid with 2h
 differences defined. There is no 9:00, nor 11:00 etc ..
 
 True. And if you set remove-match, you won't have duplicate 10:00 entries.

Well that was embarrassingly simple!  I didn't notice the odd numbers
were missing because I have appointments at odd hours in my actual
agenda.  I think I will turn on remove-match since it looks a bit weird
having e.g. 11:00 appear and not be duped while 10:00 is.

Thanks!

-- 
Borbus.