Re: [Orgmode] timer for a task

2009-05-26 Thread Carsten Dominik


On May 25, 2009, at 5:43 PM, Konstantin Antipin wrote:


Here is the patch to org-clock.el that does show estimated effort in
the mode-line if it is set.  Like so: 01:20/01:30 (clocked
time/estimated time)
 It does it by:
   * Setting new variable org-clock-effort in org-clock-in function.
   * If org-clock-effort is not nil, show estimated effort in the  
mode-line.


I would like to go further and do the following:
* Make a beep/or highlight if we spend more time on a task that
initially intended
* As proposed by Daniel, give user an option to see total time, spend
on the task instead of currently clocked time.

Does somebody else need this? Will this changes be accepted to the
orgmode-core?
I just saw that in order to contribute, you need to sign some papers..
Is this the only way?
I am new to open-source, so I am not really familiar with such things.



Hi Konstantin,

this is interesting functionality which I would like to have in the  
core.


I can accept short patches of only a few lines without the paperwork,  
but

your patch is already at the limit, and adding the other ideas you have
will push it over that limit.  We have the following possibilities:

1. You sign the papers.  This is very simple to do, unless you have
   an employer who owns everything you do and who might make problems.
   This would be my preferred solution.

2. I can put stuff without FSF copyright assignment into the
   contrib directory - you could make a little package that hooks
   into Org, I would created any hooks needed.

3. I treat your contribution as an idea/feature request and implement
   it myself.  As I have many other things to do, this is my least  
preferred

   solution.

If you decide to sign the papers, please get the form from the homepage
orgmode.org (near te end) and send it to the FSF, with a CC to me.   
This will take you no more than 2 minutes.  We can then proceed with  
integrating your stuff into the Org core, but I will be able to  
integrate this change into Emacs only after I receive confirmation  
about the signed paper, which will happen within a fee weeks or so.


- Carsten



best,
Konstantin


On Mon, May 25, 2009 at 12:44 PM, Eraldo Helal ad...@eraldo.at  
wrote:

Sounds good to me.

Eraldo

On Mon, May 25, 2009 at 12:30, Konstantin Antipin
antipin.konstan...@googlemail.com wrote:

Hi Daniel,
Yes, you are right indeed. I am talking about effort estimates - I'v
missed this chapter for some reason from the manual.
I like the idea you proposed - to show how much time is left in the
mode line. And I think I am going to write necessary code for this.

Or, may be someone has even better idea?

best,
Konstantin

On Mon, May 25, 2009 at 11:25 AM, Daniel Clemente  
n142...@gmail.com wrote:


Hi.
 I suppose you talk about estimated efforts. I also have noticed  
that I work better if I have defined them, but it is very easy to  
miss them and work on a task more time than planned.
 An easy improvement would be to show at the mode line not only  
how much time you have worked on the current task but also the  
remaining time according to your effort estimate. And if it comes  
to 0, highlight it noticeably.


 Other useful things to show would be the *total* elapsed time  
(not only the elapsed time of the last C-c C-x C-i) or directly  
the effort estimate (instead of the remaining time, the total  
time).


 And as you say, an alarm would be useful.

-- Daniel

El dl, mai 25 2009, Konstantin Antipin va escriure:

Hi everybody!
I am constantly trying to be more productive, and there is one  
thing

that I noticed:
If you give yourself a specific time for a task, then you tend to
finish this task in this time. It helps to stay focused and do  
stuff

that is most important.

So, the question is - Is there any way to set a timer on a taks,  
and

get a bell when it is expired?
Some time before I even wrote a small extension that helps me to  
do

that http://www.emacswiki.org/emacs/tea-time
But now I am thinking - is there an orgmode-way to do that? It  
would

be great to integrate it with great time tracking system, for
example...
If nobody uses proposed feature, please give me a hint how it  
would be

best to do that.


my best,
Konstantin


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode





___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




clock-efforts.patch___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to 

Re: [Orgmode] timer for a task

2009-05-26 Thread Konstantin Antipin
Carsten, thank you for explanation.
Hopefully, I will get FSF papers soon.

In a meanwhile, here is another patch that introduces following changes:

In case we set effort estimate on the currently clocked item,
show message when time is up (notification is shown only once)
 * Linux only: If libnotify is used - the standard notification
   system in linux, then show notification with it.
   Note: Additional package libnotify-bin should be installed.
   Additionally, if variable org-clock-sound is set, interpret it as
path to sound file
   and play it (wav files only).
 * If aplay (tool from alsa - standard linux sound system) is
available play sound
   with it (all type of files).

So, if someone has interest in this features, please try it.
I also would like to discuss If we want this functionality (sound and
notification) in the core,
or it is better to put it to the extension... Or, just introduce
another variable that controls if we show notification or not...


TODO:
* As proposed by Daniel, give user an option to see total time, spend
on the task instead of currently clocked time.
In fact, this functionality requires refactoring of org-clock-sum
function. Is it ok, if I do it?

best,
Konstantin

patch is made on the git version of orgmode.




On Tue, May 26, 2009 at 3:18 PM, Carsten Dominik
carsten.domi...@gmail.com wrote:

 On May 25, 2009, at 5:43 PM, Konstantin Antipin wrote:

 Here is the patch to org-clock.el that does show estimated effort in
 the mode-line if it is set.  Like so: 01:20/01:30 (clocked
 time/estimated time)
  It does it by:
   * Setting new variable org-clock-effort in org-clock-in function.
   * If org-clock-effort is not nil, show estimated effort in the
 mode-line.

 I would like to go further and do the following:
 * Make a beep/or highlight if we spend more time on a task that
 initially intended
 * As proposed by Daniel, give user an option to see total time, spend
 on the task instead of currently clocked time.

 Does somebody else need this? Will this changes be accepted to the
 orgmode-core?
 I just saw that in order to contribute, you need to sign some papers..
 Is this the only way?
 I am new to open-source, so I am not really familiar with such things.


 Hi Konstantin,

 this is interesting functionality which I would like to have in the core.

 I can accept short patches of only a few lines without the paperwork, but
 your patch is already at the limit, and adding the other ideas you have
 will push it over that limit.  We have the following possibilities:

 1. You sign the papers.  This is very simple to do, unless you have
   an employer who owns everything you do and who might make problems.
   This would be my preferred solution.

 2. I can put stuff without FSF copyright assignment into the
   contrib directory - you could make a little package that hooks
   into Org, I would created any hooks needed.

 3. I treat your contribution as an idea/feature request and implement
   it myself.  As I have many other things to do, this is my least preferred
   solution.

 If you decide to sign the papers, please get the form from the homepage
 orgmode.org (near te end) and send it to the FSF, with a CC to me.  This
 will take you no more than 2 minutes.  We can then proceed with integrating
 your stuff into the Org core, but I will be able to integrate this change
 into Emacs only after I receive confirmation about the signed paper, which
 will happen within a fee weeks or so.

 - Carsten


 best,
 Konstantin


 On Mon, May 25, 2009 at 12:44 PM, Eraldo Helal ad...@eraldo.at wrote:

 Sounds good to me.

 Eraldo

 On Mon, May 25, 2009 at 12:30, Konstantin Antipin
 antipin.konstan...@googlemail.com wrote:

 Hi Daniel,
 Yes, you are right indeed. I am talking about effort estimates - I'v
 missed this chapter for some reason from the manual.
 I like the idea you proposed - to show how much time is left in the
 mode line. And I think I am going to write necessary code for this.

 Or, may be someone has even better idea?

 best,
 Konstantin

 On Mon, May 25, 2009 at 11:25 AM, Daniel Clemente n142...@gmail.com
 wrote:

 Hi.
  I suppose you talk about estimated efforts. I also have noticed that I
 work better if I have defined them, but it is very easy to miss them and
 work on a task more time than planned.
  An easy improvement would be to show at the mode line not only how
 much time you have worked on the current task but also the remaining time
 according to your effort estimate. And if it comes to 0, highlight it
 noticeably.

  Other useful things to show would be the *total* elapsed time (not
 only the elapsed time of the last C-c C-x C-i) or directly the effort
 estimate (instead of the remaining time, the total time).

  And as you say, an alarm would be useful.

 -- Daniel

 El dl, mai 25 2009, Konstantin Antipin va escriure:

 Hi everybody!
 I am constantly trying to be more productive, and there is one thing
 that I noticed:
 If you 

Re: [Orgmode] timer for a task

2009-05-26 Thread Carsten Dominik


On May 26, 2009, at 4:26 PM, Konstantin Antipin wrote:


Carsten, thank you for explanation.
Hopefully, I will get FSF papers soon.

In a meanwhile, here is another patch that introduces following  
changes:


   In case we set effort estimate on the currently clocked item,
   show message when time is up (notification is shown only once)
* Linux only: If libnotify is used - the standard notification
  system in linux, then show notification with it.
  Note: Additional package libnotify-bin should be installed.
  Additionally, if variable org-clock-sound is set, interpret it as
path to sound file
  and play it (wav files only).
* If aplay (tool from alsa - standard linux sound system) is
available play sound
  with it (all type of files).

So, if someone has interest in this features, please try it.
I also would like to discuss If we want this functionality (sound and
notification) in the core,
or it is better to put it to the extension... Or, just introduce
another variable that controls if we show notification or not...


I think we can put this into the core if:

- this will work without crashing on any system where Emacs runs on,
  i.e. if the re is no way to play a sound file, fall back to (ding)
  with a message or so...





TODO:
* As proposed by Daniel, give user an option to see total time, spend
on the task instead of currently clocked time.
In fact, this functionality requires refactoring of org-clock-sum
function. Is it ok, if I do it?


Maybe you don't really need to refactor it:

(save-restriction
  (org-narrow-to-subtree)
  (org-clock-sum)
  org-clock-file-total-minutes)

will give you the total clocked time in minutes.

- Carsten



best,
Konstantin

patch is made on the git version of orgmode.




On Tue, May 26, 2009 at 3:18 PM, Carsten Dominik
carsten.domi...@gmail.com wrote:


On May 25, 2009, at 5:43 PM, Konstantin Antipin wrote:


Here is the patch to org-clock.el that does show estimated effort in
the mode-line if it is set.  Like so: 01:20/01:30 (clocked
time/estimated time)
 It does it by:
  * Setting new variable org-clock-effort in org-clock-in function.
  * If org-clock-effort is not nil, show estimated effort in the
mode-line.

I would like to go further and do the following:
* Make a beep/or highlight if we spend more time on a task that
initially intended
* As proposed by Daniel, give user an option to see total time,  
spend

on the task instead of currently clocked time.

Does somebody else need this? Will this changes be accepted to the
orgmode-core?
I just saw that in order to contribute, you need to sign some  
papers..

Is this the only way?
I am new to open-source, so I am not really familiar with such  
things.



Hi Konstantin,

this is interesting functionality which I would like to have in the  
core.


I can accept short patches of only a few lines without the  
paperwork, but
your patch is already at the limit, and adding the other ideas you  
have

will push it over that limit.  We have the following possibilities:

1. You sign the papers.  This is very simple to do, unless you have
  an employer who owns everything you do and who might make problems.
  This would be my preferred solution.

2. I can put stuff without FSF copyright assignment into the
  contrib directory - you could make a little package that hooks
  into Org, I would created any hooks needed.

3. I treat your contribution as an idea/feature request and  
implement
  it myself.  As I have many other things to do, this is my least  
preferred

  solution.

If you decide to sign the papers, please get the form from the  
homepage
orgmode.org (near te end) and send it to the FSF, with a CC to me.   
This
will take you no more than 2 minutes.  We can then proceed with  
integrating
your stuff into the Org core, but I will be able to integrate this  
change
into Emacs only after I receive confirmation about the signed  
paper, which

will happen within a fee weeks or so.

- Carsten



best,
Konstantin


On Mon, May 25, 2009 at 12:44 PM, Eraldo Helal ad...@eraldo.at  
wrote:


Sounds good to me.

Eraldo

On Mon, May 25, 2009 at 12:30, Konstantin Antipin
antipin.konstan...@googlemail.com wrote:


Hi Daniel,
Yes, you are right indeed. I am talking about effort estimates -  
I'v

missed this chapter for some reason from the manual.
I like the idea you proposed - to show how much time is left in  
the
mode line. And I think I am going to write necessary code for  
this.


Or, may be someone has even better idea?

best,
Konstantin

On Mon, May 25, 2009 at 11:25 AM, Daniel Clemente n142...@gmail.com 


wrote:


Hi.
 I suppose you talk about estimated efforts. I also have  
noticed that I
work better if I have defined them, but it is very easy to miss  
them and

work on a task more time than planned.
 An easy improvement would be to show at the mode line not only  
how
much time you have worked on the current task but also the  
remaining time
according to your effort 

Re: [Orgmode] timer for a task

2009-05-26 Thread Konstantin Antipin
On Tue, May 26, 2009 at 4:45 PM, Carsten Dominik
carsten.domi...@gmail.com wrote:

 On May 26, 2009, at 4:26 PM, Konstantin Antipin wrote:

 Carsten, thank you for explanation.
 Hopefully, I will get FSF papers soon.

 In a meanwhile, here is another patch that introduces following changes:

   In case we set effort estimate on the currently clocked item,
   show message when time is up (notification is shown only once)
    * Linux only: If libnotify is used - the standard notification
      system in linux, then show notification with it.
      Note: Additional package libnotify-bin should be installed.
  Additionally, if variable org-clock-sound is set, interpret it as
 path to sound file
  and play it (wav files only).
    * If aplay (tool from alsa - standard linux sound system) is
 available play sound
      with it (all type of files).

 So, if someone has interest in this features, please try it.
 I also would like to discuss If we want this functionality (sound and
 notification) in the core,
 or it is better to put it to the extension... Or, just introduce
 another variable that controls if we show notification or not...

 I think we can put this into the core if:

 - this will work without crashing on any system where Emacs runs on,
  i.e. if the re is no way to play a sound file, fall back to (ding)
  with a message or so...
Well, I made it such, that
* If you are using linux
* and if you have libnotify or aplay in your $PATH, then libnotify or
aplay will be used.
If not, use simple message and emacs-beep.
It should not break things...




 TODO:
 * As proposed by Daniel, give user an option to see total time, spend
 on the task instead of currently clocked time.
 In fact, this functionality requires refactoring of org-clock-sum
 function. Is it ok, if I do it?

 Maybe you don't really need to refactor it:

    (save-restriction
      (org-narrow-to-subtree)
      (org-clock-sum)
      org-clock-file-total-minutes)

 will give you the total clocked time in minutes.

Coool! so elegantly simple!
I used it in the current patch.
DONE:  Show total clocked time in mode line.
   (Instead of time since last start)
In fact, now I simply changed the default behavior - now mode-line
shows total clocked time,
without giving user a preference. I thought it is more logical
behavior... Or should I introduce defcustom that controls it?

Probably I am sending too much patches around :)
Just a suggestion: why don't we use github for org-mode hosting? It
would be s simple to contribute
and to manage things! You would only benefit from this, Carsten.;)
Github is a really nice service. And free, of course.
Transition to it would be a breeze as well. I can help, if needed with this...

Konstantin




 - Carsten


 best,
 Konstantin

 patch is made on the git version of orgmode.




 On Tue, May 26, 2009 at 3:18 PM, Carsten Dominik
 carsten.domi...@gmail.com wrote:

 On May 25, 2009, at 5:43 PM, Konstantin Antipin wrote:

 Here is the patch to org-clock.el that does show estimated effort in
 the mode-line if it is set.  Like so: 01:20/01:30 (clocked
 time/estimated time)
  It does it by:
  * Setting new variable org-clock-effort in org-clock-in function.
  * If org-clock-effort is not nil, show estimated effort in the
 mode-line.

 I would like to go further and do the following:
 * Make a beep/or highlight if we spend more time on a task that
 initially intended
 * As proposed by Daniel, give user an option to see total time, spend
 on the task instead of currently clocked time.

 Does somebody else need this? Will this changes be accepted to the
 orgmode-core?
 I just saw that in order to contribute, you need to sign some papers..
 Is this the only way?
 I am new to open-source, so I am not really familiar with such things.


 Hi Konstantin,

 this is interesting functionality which I would like to have in the core.

 I can accept short patches of only a few lines without the paperwork, but
 your patch is already at the limit, and adding the other ideas you have
 will push it over that limit.  We have the following possibilities:

 1. You sign the papers.  This is very simple to do, unless you have
  an employer who owns everything you do and who might make problems.
  This would be my preferred solution.

 2. I can put stuff without FSF copyright assignment into the
  contrib directory - you could make a little package that hooks
  into Org, I would created any hooks needed.

 3. I treat your contribution as an idea/feature request and implement
  it myself.  As I have many other things to do, this is my least
 preferred
  solution.

 If you decide to sign the papers, please get the form from the homepage
 orgmode.org (near te end) and send it to the FSF, with a CC to me.  This
 will take you no more than 2 minutes.  We can then proceed with
 integrating
 your stuff into the Org core, but I will be able to integrate this change
 into Emacs only after I receive confirmation about the signed paper,
 

Re: [Orgmode] timer for a task

2009-05-26 Thread Carsten Dominik


On May 27, 2009, at 12:13 AM, Konstantin Antipin wrote:


On Tue, May 26, 2009 at 4:45 PM, Carsten Dominik
carsten.domi...@gmail.com wrote:


On May 26, 2009, at 4:26 PM, Konstantin Antipin wrote:


Carsten, thank you for explanation.
Hopefully, I will get FSF papers soon.

In a meanwhile, here is another patch that introduces following  
changes:


  In case we set effort estimate on the currently clocked item,
  show message when time is up (notification is shown only once)
   * Linux only: If libnotify is used - the standard notification
 system in linux, then show notification with it.
 Note: Additional package libnotify-bin should be installed.
 Additionally, if variable org-clock-sound is set, interpret it as
path to sound file
 and play it (wav files only).
   * If aplay (tool from alsa - standard linux sound system) is
available play sound
 with it (all type of files).

So, if someone has interest in this features, please try it.
I also would like to discuss If we want this functionality (sound  
and

notification) in the core,
or it is better to put it to the extension... Or, just introduce
another variable that controls if we show notification or not...


I think we can put this into the core if:

- this will work without crashing on any system where Emacs runs on,
 i.e. if the re is no way to play a sound file, fall back to (ding)
 with a message or so...

Well, I made it such, that
* If you are using linux
* and if you have libnotify or aplay in your $PATH, then libnotify or
aplay will be used.
If not, use simple message and emacs-beep.
It should not break things...






TODO:
* As proposed by Daniel, give user an option to see total time,  
spend

on the task instead of currently clocked time.
In fact, this functionality requires refactoring of org-clock-sum
function. Is it ok, if I do it?


Maybe you don't really need to refactor it:

   (save-restriction
 (org-narrow-to-subtree)
 (org-clock-sum)
 org-clock-file-total-minutes)

will give you the total clocked time in minutes.


Coool! so elegantly simple!
I used it in the current patch.


This is now a single patch, containing all your changes?


DONE:  Show total clocked time in mode line.
  (Instead of time since last start)
In fact, now I simply changed the default behavior - now mode-line
shows total clocked time,
without giving user a preference. I thought it is more logical
behavior... Or should I introduce defcustom that controls it?

Probably I am sending too much patches around :)
Just a suggestion: why don't we use github for org-mode hosting? It
would be s simple to contribute
and to manage things! You would only benefit from this, Carsten.;)
Github is a really nice service. And free, of course.


What would be the advantages of using github instead of repo.or.cz?
I have found repo.or.cz less polished looking than githib, but very
fast and reliable, while github is getting boged down when America
wakes up :-)

- Carsten

Transition to it would be a breeze as well. I can help, if needed  
with this...


Konstantin





- Carsten



best,
Konstantin

patch is made on the git version of orgmode.




On Tue, May 26, 2009 at 3:18 PM, Carsten Dominik
carsten.domi...@gmail.com wrote:


On May 25, 2009, at 5:43 PM, Konstantin Antipin wrote:

Here is the patch to org-clock.el that does show estimated  
effort in

the mode-line if it is set.  Like so: 01:20/01:30 (clocked
time/estimated time)
 It does it by:
 * Setting new variable org-clock-effort in org-clock-in function.
 * If org-clock-effort is not nil, show estimated effort in the
mode-line.

I would like to go further and do the following:
* Make a beep/or highlight if we spend more time on a task that
initially intended
* As proposed by Daniel, give user an option to see total time,  
spend

on the task instead of currently clocked time.

Does somebody else need this? Will this changes be accepted to the
orgmode-core?
I just saw that in order to contribute, you need to sign some  
papers..

Is this the only way?
I am new to open-source, so I am not really familiar with such  
things.



Hi Konstantin,

this is interesting functionality which I would like to have in  
the core.


I can accept short patches of only a few lines without the  
paperwork, but
your patch is already at the limit, and adding the other ideas  
you have

will push it over that limit.  We have the following possibilities:

1. You sign the papers.  This is very simple to do, unless you have
 an employer who owns everything you do and who might make  
problems.

 This would be my preferred solution.

2. I can put stuff without FSF copyright assignment into the
 contrib directory - you could make a little package that hooks
 into Org, I would created any hooks needed.

3. I treat your contribution as an idea/feature request and  
implement

 it myself.  As I have many other things to do, this is my least
preferred
 solution.

If you decide to sign the papers, please get the 

Re: [Orgmode] timer for a task

2009-05-25 Thread Daniel Clemente

Hi.
  I suppose you talk about estimated efforts. I also have noticed that I work 
better if I have defined them, but it is very easy to miss them and work on a 
task more time than planned.
  An easy improvement would be to show at the mode line not only how much time 
you have worked on the current task but also the remaining time according to 
your effort estimate. And if it comes to 0, highlight it noticeably.

  Other useful things to show would be the *total* elapsed time (not only the 
elapsed time of the last C-c C-x C-i) or directly the effort estimate (instead 
of the remaining time, the total time).

  And as you say, an alarm would be useful.

-- Daniel

El dl, mai 25 2009, Konstantin Antipin va escriure:
 Hi everybody!
 I am constantly trying to be more productive, and there is one thing
 that I noticed:
 If you give yourself a specific time for a task, then you tend to
 finish this task in this time. It helps to stay focused and do stuff
 that is most important.

 So, the question is - Is there any way to set a timer on a taks, and
 get a bell when it is expired?
 Some time before I even wrote a small extension that helps me to do
 that http://www.emacswiki.org/emacs/tea-time
 But now I am thinking - is there an orgmode-way to do that? It would
 be great to integrate it with great time tracking system, for
 example...
 If nobody uses proposed feature, please give me a hint how it would be
 best to do that.


 my best,
 Konstantin


 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] timer for a task

2009-05-25 Thread Konstantin Antipin
Hi Daniel,
Yes, you are right indeed. I am talking about effort estimates - I'v
missed this chapter for some reason from the manual.
I like the idea you proposed - to show how much time is left in the
mode line. And I think I am going to write necessary code for this.

Or, may be someone has even better idea?

best,
Konstantin

On Mon, May 25, 2009 at 11:25 AM, Daniel Clemente n142...@gmail.com wrote:

 Hi.
  I suppose you talk about estimated efforts. I also have noticed that I work 
 better if I have defined them, but it is very easy to miss them and work on a 
 task more time than planned.
  An easy improvement would be to show at the mode line not only how much time 
 you have worked on the current task but also the remaining time according to 
 your effort estimate. And if it comes to 0, highlight it noticeably.

  Other useful things to show would be the *total* elapsed time (not only the 
 elapsed time of the last C-c C-x C-i) or directly the effort estimate 
 (instead of the remaining time, the total time).

  And as you say, an alarm would be useful.

 -- Daniel

 El dl, mai 25 2009, Konstantin Antipin va escriure:
 Hi everybody!
 I am constantly trying to be more productive, and there is one thing
 that I noticed:
 If you give yourself a specific time for a task, then you tend to
 finish this task in this time. It helps to stay focused and do stuff
 that is most important.

 So, the question is - Is there any way to set a timer on a taks, and
 get a bell when it is expired?
 Some time before I even wrote a small extension that helps me to do
 that http://www.emacswiki.org/emacs/tea-time
 But now I am thinking - is there an orgmode-way to do that? It would
 be great to integrate it with great time tracking system, for
 example...
 If nobody uses proposed feature, please give me a hint how it would be
 best to do that.


 my best,
 Konstantin


 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] timer for a task

2009-05-25 Thread Eraldo Helal
Sounds good to me.

Eraldo

On Mon, May 25, 2009 at 12:30, Konstantin Antipin
antipin.konstan...@googlemail.com wrote:
 Hi Daniel,
 Yes, you are right indeed. I am talking about effort estimates - I'v
 missed this chapter for some reason from the manual.
 I like the idea you proposed - to show how much time is left in the
 mode line. And I think I am going to write necessary code for this.

 Or, may be someone has even better idea?

 best,
 Konstantin

 On Mon, May 25, 2009 at 11:25 AM, Daniel Clemente n142...@gmail.com wrote:

 Hi.
  I suppose you talk about estimated efforts. I also have noticed that I work 
 better if I have defined them, but it is very easy to miss them and work on 
 a task more time than planned.
  An easy improvement would be to show at the mode line not only how much 
 time you have worked on the current task but also the remaining time 
 according to your effort estimate. And if it comes to 0, highlight it 
 noticeably.

  Other useful things to show would be the *total* elapsed time (not only the 
 elapsed time of the last C-c C-x C-i) or directly the effort estimate 
 (instead of the remaining time, the total time).

  And as you say, an alarm would be useful.

 -- Daniel

 El dl, mai 25 2009, Konstantin Antipin va escriure:
 Hi everybody!
 I am constantly trying to be more productive, and there is one thing
 that I noticed:
 If you give yourself a specific time for a task, then you tend to
 finish this task in this time. It helps to stay focused and do stuff
 that is most important.

 So, the question is - Is there any way to set a timer on a taks, and
 get a bell when it is expired?
 Some time before I even wrote a small extension that helps me to do
 that http://www.emacswiki.org/emacs/tea-time
 But now I am thinking - is there an orgmode-way to do that? It would
 be great to integrate it with great time tracking system, for
 example...
 If nobody uses proposed feature, please give me a hint how it would be
 best to do that.


 my best,
 Konstantin


 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode



 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] timer for a task

2009-05-25 Thread Konstantin Antipin
Here is the patch to org-clock.el that does show estimated effort in
the mode-line if it is set.  Like so: 01:20/01:30 (clocked
time/estimated time)
  It does it by:
* Setting new variable org-clock-effort in org-clock-in function.
* If org-clock-effort is not nil, show estimated effort in the mode-line.

I would like to go further and do the following:
* Make a beep/or highlight if we spend more time on a task that
initially intended
* As proposed by Daniel, give user an option to see total time, spend
on the task instead of currently clocked time.

Does somebody else need this? Will this changes be accepted to the
orgmode-core?
I just saw that in order to contribute, you need to sign some papers..
Is this the only way?
I am new to open-source, so I am not really familiar with such things.

best,
Konstantin


On Mon, May 25, 2009 at 12:44 PM, Eraldo Helal ad...@eraldo.at wrote:
 Sounds good to me.

 Eraldo

 On Mon, May 25, 2009 at 12:30, Konstantin Antipin
 antipin.konstan...@googlemail.com wrote:
 Hi Daniel,
 Yes, you are right indeed. I am talking about effort estimates - I'v
 missed this chapter for some reason from the manual.
 I like the idea you proposed - to show how much time is left in the
 mode line. And I think I am going to write necessary code for this.

 Or, may be someone has even better idea?

 best,
 Konstantin

 On Mon, May 25, 2009 at 11:25 AM, Daniel Clemente n142...@gmail.com wrote:

 Hi.
  I suppose you talk about estimated efforts. I also have noticed that I 
 work better if I have defined them, but it is very easy to miss them and 
 work on a task more time than planned.
  An easy improvement would be to show at the mode line not only how much 
 time you have worked on the current task but also the remaining time 
 according to your effort estimate. And if it comes to 0, highlight it 
 noticeably.

  Other useful things to show would be the *total* elapsed time (not only 
 the elapsed time of the last C-c C-x C-i) or directly the effort estimate 
 (instead of the remaining time, the total time).

  And as you say, an alarm would be useful.

 -- Daniel

 El dl, mai 25 2009, Konstantin Antipin va escriure:
 Hi everybody!
 I am constantly trying to be more productive, and there is one thing
 that I noticed:
 If you give yourself a specific time for a task, then you tend to
 finish this task in this time. It helps to stay focused and do stuff
 that is most important.

 So, the question is - Is there any way to set a timer on a taks, and
 get a bell when it is expired?
 Some time before I even wrote a small extension that helps me to do
 that http://www.emacswiki.org/emacs/tea-time
 But now I am thinking - is there an orgmode-way to do that? It would
 be great to integrate it with great time tracking system, for
 example...
 If nobody uses proposed feature, please give me a hint how it would be
 best to do that.


 my best,
 Konstantin


 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode



 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 87ca180..445a336 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -158,6 +158,9 @@ All this depends on running `org-clock-persistence-insinuate' in .emacs
 (defvar org-clock-heading-for-remember )
 (defvar org-clock-start-time )
 
+(defvar org-clock-effort  
+  Effort estimate of the currently clocking task)
+
 (defvar org-clock-history nil
   List of marker pointing to recent clocked tasks.)
 
@@ -267,23 +270,50 @@ pointing to it.
 	(cons i marker)
 
 (defun org-clock-update-mode-line ()
-  (let* ((delta (- (time-to-seconds (current-time))
-		   (time-to-seconds org-clock-start-time)))
-	 (h (floor delta 3600))
-	 (m (floor (- delta (* 3600 h)) 60)))
-(setq org-mode-line-string
-	  (org-propertize
-	   (let ((clock-string (format (concat -[ org-time-clocksum-format  (%s)])
-   h m org-clock-heading))
-		 (help-text Org-mode clock is running. Mouse-2 to go there.))
-	 (if (and ( org-clock-string-limit 0)
-		  ( (length clock-string) org-clock-string-limit))
-		 (org-propertize (substring clock-string 0 org-clock-string-limit)
-			 'help-echo (concat help-text :  org-clock-heading))
-	   (org-propertize clock-string 'help-echo help-text)))
-	   'local-map org-clock-mode-line-map
-	   'mouse-face (if (featurep 'xemacs) 'highlight 'mode-line-highlight)))
-(force-mode-line-update)))
+  (setq org-mode-line-string
+	(org-propertize
+	 (let ((clock-string (org-clock-get-clock-string))
+	   (help-text Org-mode clock is running. Mouse-2 to go there.))
+	   (if (and ( org-clock-string-limit 0)
+		( (length clock-string)