Re: [O] notifications for todo items

2012-02-26 Thread Nicolas Goaziou
Hello,

Peter Münster pmli...@free.fr writes:

 On Sat, Feb 25 2012, Nick Dokos wrote:

 A quick first impression: orgntf-process seems expensive. It seems
 to take 100% of one core (I've got a quad-core processor) for three or
 four seconds every fifty seconds. Unfortunately, the core is the same one
 that's running emacs, so emacs stops responding for those three or four
 seconds. I have disabled org-notify for now.

 How many lines do you have in your org-files?
 (I've about 200 and execution time is about 100ms.)

 I call now (org-element-parse-buffer 'heading), I hope it's faster for
 you. Is it faster, when the file is byte-compiled?

I didn't look at the code but you probably mean
(org-element-parse-buffer 'headline) if you're only interested in
headline data.


Regards,

-- 
Nicolas Goaziou



Re: [O] notifications for todo items

2012-02-26 Thread Peter Münster
On Sun, Feb 26 2012, Nicolas Goaziou wrote:

 I didn't look at the code but you probably mean
 (org-element-parse-buffer 'headline) if you're only interested in
 headline data.

Yes, it's headline in the code... :)

-- 
   Peter




Re: [O] notifications for todo items

2012-02-25 Thread Peter Münster
On Sat, Feb 25 2012, Nick Dokos wrote:

 A quick first impression: orgntf-process seems expensive. It seems
 to take 100% of one core (I've got a quad-core processor) for three or
 four seconds every fifty seconds. Unfortunately, the core is the same one
 that's running emacs, so emacs stops responding for those three or four
 seconds. I have disabled org-notify for now.

How many lines do you have in your org-files?
(I've about 200 and execution time is about 100ms.)

I call now (org-element-parse-buffer 'heading), I hope it's faster for
you. Is it faster, when the file is byte-compiled?

Other ideas:
- I could divide orgntf-process into several tasks, so that things run
  more smoothly.
- You could call (org-notify-start -60), so the process will be called,
  when idle for one minute.

The file has a new home: https://github.com/p-m/org-notify
There is now `orgntf-verbose' to see execution time of
`orgntf-todo-list'.

Thanks for testing!
-- 
   Peter




Re: [O] notifications for todo items

2012-02-25 Thread Nick Dokos
Peter Münster pmli...@free.fr wrote:

 On Sat, Feb 25 2012, Nick Dokos wrote:
 
  A quick first impression: orgntf-process seems expensive. It seems
  to take 100% of one core (I've got a quad-core processor) for three or
  four seconds every fifty seconds. Unfortunately, the core is the same one
  that's running emacs, so emacs stops responding for those three or four
  seconds. I have disabled org-notify for now.
 
 How many lines do you have in your org-files?
 (I've about 200 and execution time is about 100ms.)
 

Roughly 7000 - I just added a task to clean things up, so it's now 7002 :-)

 I call now (org-element-parse-buffer 'heading), I hope it's faster for
 you. Is it faster, when the file is byte-compiled?
 
 Other ideas:
 - I could divide orgntf-process into several tasks, so that things run
   more smoothly.
 - You could call (org-notify-start -60), so the process will be called,
   when idle for one minute.
 

This sounds promising - I'll try this out in the next iteration.

 The file has a new home: https://github.com/p-m/org-notify
 There is now `orgntf-verbose' to see execution time of
 `orgntf-todo-list'.
 

OK - I'll try it out when I get a chance.

Thanks,
Nick




Re: [O] notifications for todo items

2012-02-25 Thread Nick Dokos
Peter Münster pmli...@free.fr wrote:

 On Sat, Feb 25 2012, Nick Dokos wrote:
 
  A quick first impression: orgntf-process seems expensive. It seems
  to take 100% of one core (I've got a quad-core processor) for three or
  four seconds every fifty seconds. Unfortunately, the core is the same one
  that's running emacs, so emacs stops responding for those three or four
  seconds. I have disabled org-notify for now.
 
 How many lines do you have in your org-files?
 (I've about 200 and execution time is about 100ms.)
 
 I call now (org-element-parse-buffer 'heading), I hope it's faster for
 you. Is it faster, when the file is byte-compiled?
 
 Other ideas:
 - I could divide orgntf-process into several tasks, so that things run
   more smoothly.
 - You could call (org-notify-start -60), so the process will be called,
   when idle for one minute.
 
 The file has a new home: https://github.com/p-m/org-notify
 There is now `orgntf-verbose' to see execution time of
 `orgntf-todo-list'.
 
 Thanks for testing!

Profiling results after byte compiling both org-notify.el and org-element.el
(the rest of org is uncompiled code):

,
| org-element-parse-elements891 
3.846205  0.0043167295
| orgntf-process1   
1.594772  1.594772
| orgntf-time-measure   1   
1.594763  1.594763
| orgntf-todo-list  1   
1.59444   1.59444
| org-element-parse-buffer  15  
1.575525  0.1050350666
| org-element-current-element   876 
1.512512  0.0017266118
| org-element-headline-parser   876 
1.477510  0.0016866552
| org-entry-properties  1752
0.720182  0.0004110627
| org-element-parse-secondary-string876 
0.468200  0.0005344748
| org-element-parse-objects 942 
0.431715  0.0004582972
| org-element-get-next-object-candidates1151
0.404424  0.0003513683
| org-back-to-heading   3504
0.125123  3.570...e-05
| org-element-time-stamp-successor  969 
0.120690  0.0001245521
| org-heading-components876 
0.053240  6.077...e-05
| org-element-latex-or-entity-successor 1884
0.046981  2.493...e-05
| org-end-of-subtree876 
0.036546  4.171...e-05
| org-match-string-no-properties4167
0.030249  7.259...e-06
| org-element-link-successor998 
0.022016  2.206...e-05
| org-get-limited-outline-regexp1676
0.019910  1.187...e-05
| org-element-sub/superscript-successor 953 
0.013222  1.387...e-05
| org-truely-invisible-p876 
0.012717  1.451...e-05
| org-get-property-block876 
0.011843  1.351...e-05
| org-element-map   15  
0.010387  0.0006924666
| org-element-inline-src-block-successor942 
0.006624  7.031...e-06
| org-element-text-markup-successor 942 
0.006122  6.499...e-06
| org-at-heading-p  1767
0.005833  3.301...e-06
| org-element-macro-successor   876 
0.005385  6.148...e-06
| org-get-category  1752
0.005148  2.938...e-06
| org-element-link-parser   63  
0.004671  7.414...e-05
| org-element-inline-babel-call-successor   942 
0.004548  4.829...e-06
| org-element-statistics-cookie-successor   922 
0.003133  3.399...e-06
| org-refresh-category-properties   10  
0.002967  0.0002967999
| org-element-property  5073
0.002889  5.694...e-07
| org-skip-whitespace   891 
0.002762  3.101...e-06
| org-element-radio-target-successor876 
0.002672  3.051...e-06
| org-outline-level 876 
0.001801  2.055...e-06
| org-element-time-stamp-parser 93  
0.001642  1.766...e-05
| orgntf-make-todo  

Re: [O] notifications for todo items

2012-02-24 Thread Nick Dokos
=?utf-8?Q?Peter_M=C3=BCnster?= pmli...@free.fr wrote:

 On Thu, Feb 23 2012, Nick Dokos wrote:
 
  what does this do that appt.el (and its org interface) does not?
 
 Sorry, I've totally forgotten to write about my motivation, to create
 such an org-notify module.
 
 Here a summary:
 - different warning periods for different todo-types
 - fine grained warning periods (smallest unit is second)
 - continue notifications, when deadline is overdue
 - easy modification of timestamps (just one click, to say
   let's do it tomorrow)
 - switch from todo to done by clicking on the notification window
 - configurable notification types (email, notifications-notify, beep,
   etc.)
 - configurable notification period
 - configurable notification duration
 - crescendo notifications (be more aggressive, when time gets closer to
   deadline)
 
 There was a little thread about this subject:
 http://thread.gmane.org/gmane.emacs.orgmode/48832
 
 
 Example usage:
   (org-notify-add 'appt
   '(:time -1s :period 20s :duration 10
 :actions (org-notify-action-message
   org-notify-action-ding))
   '(:time 15m :period 2m :duration 100
 :actions org-notify-action-notify)
   '(:time 2h :period 5m
 :actions org-notify-action-message)
   '(:time 1d :actions org-notify-action-email))
 
 This means for todo-items with `notify' property set to `appt': 1 day before
 deadline, send a reminder-email, 2 hours before deadline, start to send
 messages every 5 minutes, then, 15 minutes before deadline, start to pop up
 notification windows every 2 minutes. The timeout of the window is set to
 100 seconds. Finally, when deadline is overdue, send messages and make
 noise.
 

A quick first impression: orgntf-process seems expensive. It seems
to take 100% of one core (I've got a quad-core processor) for three or
four seconds every fifty seconds. Unfortunately, the core is the same one
that's running emacs, so emacs stops responding for those three or four
seconds. I have disabled org-notify for now.

Nick





Re: [O] notifications for todo items

2012-02-23 Thread Peter Münster
On Thu, Feb 23 2012, Nick Dokos wrote:

 what does this do that appt.el (and its org interface) does not?

Sorry, I've totally forgotten to write about my motivation, to create
such an org-notify module.

Here a summary:
- different warning periods for different todo-types
- fine grained warning periods (smallest unit is second)
- continue notifications, when deadline is overdue
- easy modification of timestamps (just one click, to say
  let's do it tomorrow)
- switch from todo to done by clicking on the notification window
- configurable notification types (email, notifications-notify, beep,
  etc.)
- configurable notification period
- configurable notification duration
- crescendo notifications (be more aggressive, when time gets closer to
  deadline)

There was a little thread about this subject:
http://thread.gmane.org/gmane.emacs.orgmode/48832


Example usage:
  (org-notify-add 'appt
  '(:time -1s :period 20s :duration 10
:actions (org-notify-action-message
  org-notify-action-ding))
  '(:time 15m :period 2m :duration 100
:actions org-notify-action-notify)
  '(:time 2h :period 5m
:actions org-notify-action-message)
  '(:time 1d :actions org-notify-action-email))

This means for todo-items with `notify' property set to `appt': 1 day before
deadline, send a reminder-email, 2 hours before deadline, start to send
messages every 5 minutes, then, 15 minutes before deadline, start to pop up
notification windows every 2 minutes. The timeout of the window is set to
100 seconds. Finally, when deadline is overdue, send messages and make
noise.

-- 
   Peter




Re: [O] notifications for todo items

2012-02-23 Thread Nick Dokos
Peter Münster pmli...@free.fr wrote:

 On Thu, Feb 23 2012, Nick Dokos wrote:
 
  what does this do that appt.el (and its org interface) does not?
 
 Sorry, I've totally forgotten to write about my motivation, to create
 such an org-notify module.
 
 Here a summary:
 - different warning periods for different todo-types
 - fine grained warning periods (smallest unit is second)
 - continue notifications, when deadline is overdue
 - easy modification of timestamps (just one click, to say
   let's do it tomorrow)
 - switch from todo to done by clicking on the notification window
 - configurable notification types (email, notifications-notify, beep,
   etc.)
 - configurable notification period
 - configurable notification duration
 - crescendo notifications (be more aggressive, when time gets closer to
   deadline)
 
 There was a little thread about this subject:
 http://thread.gmane.org/gmane.emacs.orgmode/48832
 
 
 Example usage:
   (org-notify-add 'appt
   '(:time -1s :period 20s :duration 10
 :actions (org-notify-action-message
   org-notify-action-ding))
   '(:time 15m :period 2m :duration 100
 :actions org-notify-action-notify)
   '(:time 2h :period 5m
 :actions org-notify-action-message)
   '(:time 1d :actions org-notify-action-email))
 
 This means for todo-items with `notify' property set to `appt': 1 day before
 deadline, send a reminder-email, 2 hours before deadline, start to send
 messages every 5 minutes, then, 15 minutes before deadline, start to pop up
 notification windows every 2 minutes. The timeout of the window is set to
 100 seconds. Finally, when deadline is overdue, send messages and make
 noise.
 

Thanks! That's very helpful. I'll take a look in my copious (cough!)
spare time.

Nick



[O] notifications for todo items

2012-02-22 Thread Peter Münster
Hi,

I've written a module, that allows flexible notifications for todo items
with deadline: http://pmrb.free.fr/work/OS/org-notify.el

Feedback is welcome!

-- 
   Peter




Re: [O] notifications for todo items

2012-02-22 Thread Nick Dokos
Peter Münster pmli...@free.fr wrote:

 Hi,
 
 I've written a module, that allows flexible notifications for todo items
 with deadline: http://pmrb.free.fr/work/OS/org-notify.el
 
 Feedback is welcome!
 

I've only taken a quick glance, but the question that immediately came
to my mind was: what does this do that appt.el (and its org interface)
does not?  Note that I don't know the answer: I just have the
question :-)

BTW, there are some FAQs that address such appointment things (check the
Appointments/Diary section of the FAQ). Maybe you can take a look and
then come back and tell us how your package stacks up.

Thanks,
Nick