New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to automatically start the next pomo? #32

Closed
x-ji opened this Issue May 9, 2015 · 10 comments

Comments

Projects
None yet
4 participants
@x-ji
Contributor

x-ji commented May 9, 2015

Many popular pomodoro software nowadays have the option to automatically start the next pomo after your short break/long break is over. I find it OK as then I'll not have to switch back to my original org buffer, find the task and start again. If I wasn't actually doing work when it auto-started, I can always kill the current pomo, delete the CLOCK entry and manually start.

Could such a functionality be also added to org-pomodoro?

@hello-code

This comment has been minimized.

hello-code commented May 30, 2015

How to automatically start the next pomodoro ?

@x-ji

This comment has been minimized.

Contributor

x-ji commented May 30, 2015

Don't think there is one yet. Thus the issue.

@leoc

This comment has been minimized.

Collaborator

leoc commented May 30, 2015

I would suggest using a break hook to start a pomodoro on the latest task.

With the version 2.0.0 I introduced double prefix, which starts another pomodoro automatically upon a break end.

This should do the trick:

(add-hook 'org-pomodoro-break-finished-hook
  (lambda ()
    (interactive)  
    (org-pomodoro '(16)))  
@en30

This comment has been minimized.

en30 commented May 31, 2015

org-pomodoro-break-finished-hooks are run before (org-pomodoro-reset) and then (org-pomodoro-active-p) is t. So org-pomodoro does not work as expected.

https://github.com/lolownia/org-pomodoro/blob/2.0.2/org-pomodoro.el#L543-L546
https://github.com/lolownia/org-pomodoro/blob/2.0.2/org-pomodoro.el#L498-L499
https://github.com/lolownia/org-pomodoro/blob/2.0.2/org-pomodoro.el#L506-L507

@en30

This comment has been minimized.

en30 commented Jun 14, 2015

I think using a break hook is a nice way, but it does not work in the current implementation.
Is there any reason to run org-pomodoro-bread-finished-hook before (org-pomodoro-reset)?
I am not fluent in Emacs Lisp (and also English). This does not include any offesive meaning and is just a question.

@leoc

This comment has been minimized.

Collaborator

leoc commented Jun 21, 2015

Hi @en30, please apologize the delay. I haven't had the time to come back earlier.
You are completely right. The hooks should always run after the state changed. I fixed that with my latest commit.

@x-ji

This comment has been minimized.

Contributor

x-ji commented Jun 23, 2015

It works now. Though the only thing is that it seems the sound is not played any more on either break end or new pomo start

@x-ji

This comment has been minimized.

Contributor

x-ji commented Jun 23, 2015

Never mind it seems to work well. Thank you.

@x-ji x-ji closed this Jun 23, 2015

@leoc

This comment has been minimized.

Collaborator

leoc commented Jun 23, 2015

Awsome! 👍

@en30

This comment has been minimized.

en30 commented Jun 24, 2015

Thank you for fixing 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment