Re: [Orgmode] Re: org-mode and remind integration

2009-02-15 Thread Carsten Dominik

Hi Sharad,

thanks for your work.

Instead for making a big change to org-exp.el  I would much rather have
a separate files with these functions, and a change to org-exp.el
that is as minimal as possible.

- Carsten

On Feb 15, 2009, at 11:10 PM, Sharad Pratap wrote:


Hi Dominik,
I have added remind functions in `org-exp.el' by following icalendar,
functions.
As you must have known `ical2rem' kind of utilities is here, So I got
at least remind is superset to ical, there should not be any problem.

I have tested few things like.
* remind `[' `%' handled

In it two known bugs left.
1. Duplication of code, another copy of icalendar .function for  
remind.
2. empty description returning a single newline, that causes ugly  
output.


I am attaching this with this mail `org-exp.el' (with remind)
and full `org2rem.el' that I have not changed from last time,
As I started work on `org-exp.el.'

I will try to fix both 1, 2 as  I will get time.
But I think for most of usage it will work nice.

--
Regards,
Sharad

On Fri, Feb 13, 2009 at 12:55 PM, Carsten Dominik domi...@science.uva.nl 
 wrote:

Hi Sharad,

instead of a new patch, please send me just a full new version of
org2rem.el when you are done changing it.
Thanks.

- Carsten

On Feb 12, 2009, at 2:22 PM, Sharad Pratap wrote:


Hi Daniel,

Actually I have used your proposed _regular expression_ only,
and little rearrangement.
Since my child was born last month I did not have much time.  
Therefore, I did not test org2rem.

Many congratulations to you on your sweet little bundle of joy!!

I did not tested the last suggestion of Carsten but you seem to  
overcome the problem I encountered.

I also wanted to remove these three
(defvar org2rem-scheduled-reminders nil)
(defvar org2rem-deadline-reminders nil)
(defvar org2rem-pure-timestamps-reminders nil)
global variables, with next patch by this week end.

And finally Thanks you very much Daniel for `org2rem.el' I am  
regular user of `remind'.


On Thu, Feb 12, 2009 at 5:12 AM, Daniel Martins  
daniel...@gmail.com wrote:

Thanks Sharap,

Since my child was born last month I did not have much time.  
Therefore, I did not test org2rem.


I did not tested the last suggestion of Carsten but you seem to  
overcome the problem I encountered.


I am also suggest to include this patch to expand Bastien original  
org2rem.el


Whenever I have time (to sleep!) I will test your scripts.

Daniel





2009/2/11 Carsten Dominik domi...@science.uva.nl

Hi Bastien,

you wrote the original org2rem.el  Do you agree we should apply  
this patch?

I have not tested it as I do not use remind.

- Carsten

On Feb 11, 2009, at 4:33 PM, Sharad Pratap wrote:


Hi Carsten,
Please do apply it, (if you find it is fine.)
I have joined this mailing list today only,
so not able to include all peoples in thread.

On Wed, Feb 11, 2009 at 8:51 PM, Carsten Dominik domi...@science.uva.nl 
 wrote:

I have not followed this discussion - should I apply this patch
to org2rem.el in the distribution?

- Carsten


On Feb 11, 2009, at 3:23 PM, Sharad Pratap wrote:

Hi Daniel,

Your regular expression working fine!!, I have made few change with
same regular expression, and it has worked for me.

I wish `org2rem' could be as robust as `org-export-icalendar'.

Like me you also want orgmode outside editor, So I have added to
executable script `org2remind' and `show-agenda'.

orgremind.elorg2rem.el


___
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] Re: org-mode and remind integration

2009-02-12 Thread Sharad Pratap
Hi Daniel,

Actually I have used your proposed _regular expression_ only,
and little rearrangement.

 Since my child was born last month I did not have much time. Therefore, I
 did not test org2rem.

Many congratulations to you on your sweet little bundle of joy!!

I did not tested the last suggestion of Carsten but you seem to overcome the
 problem I encountered.

I also wanted to remove these three
(defvar org2rem-scheduled-reminders nil)
(defvar org2rem-deadline-reminders nil)
(defvar org2rem-pure-timestamps-reminders nil)
global variables, with next patch by this week end.

And finally Thanks you very much Daniel for `org2rem.el' I am regular user
of `remind'.

On Thu, Feb 12, 2009 at 5:12 AM, Daniel Martins daniel...@gmail.com wrote:

 Thanks Sharap,

 Since my child was born last month I did not have much time. Therefore, I
 did not test org2rem.

 I did not tested the last suggestion of Carsten but you seem to overcome
 the problem I encountered.

 I am also suggest to include this patch to expand Bastien original
 org2rem.el

 Whenever I have time (to sleep!) I will test your scripts.

 Daniel





 2009/2/11 Carsten Dominik domi...@science.uva.nl

 Hi Bastien,
 you wrote the original org2rem.el  Do you agree we should apply this
 patch?
 I have not tested it as I do not use remind.

 - Carsten

 On Feb 11, 2009, at 4:33 PM, Sharad Pratap wrote:

 Hi Carsten,
 Please do apply it, (if you find it is fine.)
 I have joined this mailing list today only,
 so not able to include all peoples in thread.

 On Wed, Feb 11, 2009 at 8:51 PM, Carsten Dominik 
 domi...@science.uva.nlwrote:

 I have not followed this discussion - should I apply this patch
 to org2rem.el in the distribution?

 - Carsten


 On Feb 11, 2009, at 3:23 PM, Sharad Pratap wrote:

  Hi Daniel,

 Your regular expression working fine!!, I have made few change with
 same regular expression, and it has worked for me.

 I wish `org2rem' could be as robust as `org-export-icalendar'.

 Like me you also want orgmode outside editor, So I have added to
 executable script `org2remind' and `show-agenda'.


___
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


[Orgmode] Re: org-mode and remind integration

2009-02-11 Thread Sharad Pratap
Hi Daniel,

Your regular expression working fine!!, I have made few change with
same regular expression, and it has worked for me.

I wish `org2rem' could be as robust as `org-export-icalendar'.

Like me you also want orgmode outside editor, So I have added to
executable script `org2remind' and `show-agenda'.

-- 
Regard
(`
_) h a r a d
--- org2rem.el.old	2009-01-09 09:00:48.0 +
+++ org2rem.el.new	2009-02-11 13:59:16.12000 +
@@ -34,13 +34,21 @@
 (eval-when-compile
   (require 'cl))
 
+(defvar org2rem-pure-timestamps-string  ;we need it.
+ (concat  \\( org-deadline-string \\|
+  org-scheduled-string  \\)\\{0\\}))
+
 (defvar org2rem-scheduled-reminders nil)
 (defvar org2rem-deadline-reminders nil)
+(defvar org2rem-pure-timestamps-reminders nil)
+
 (defvar pure-time nil)
 (defvar org2rem-scheduled-remind-file 
   ~/.reminders.org.scheduled)
 (defvar org2rem-deadline-remind-file 
   ~/.reminders.org.deadline)
+(defvar org2rem-pure-timestamps-remind-file
+  ~/.reminders.org.pure-timestamps)
 
 (defun org2rem-list-reminders (regexp)
   Make a list of appointments. 
@@ -95,9 +103,15 @@
 
 	  (setq rem-task (concat REM rem-time MSG   task %)
 		)
-	  (if (equal regexp org-scheduled-string)
-	  (push rem-task org2rem-scheduled-reminders)
-	(push rem-task org2rem-deadline-reminders)))
+
+  (cond
+   ((equal regexp org2rem-pure-timestamps-string)
+(push rem-task org2rem-pure-timestamps-reminders))
+   ((equal regexp org-scheduled-string)
+(push rem-task org2rem-scheduled-reminders))
+   ((equal regexp org-deadline-string)
+(push rem-task org2rem-deadline-reminders))
+   ))
 
 (defun org2rem-write-file (file reminders)
   Write reminders list to files.
@@ -116,13 +130,19 @@
   (interactive)
   (setq org2rem-scheduled-reminders nil)
   (setq org2rem-deadline-reminders nil)
+  (setq org2rem-pure-timestamps-string nil)
   (save-window-excursion
 (org2rem-list-reminders org-scheduled-string)
 (org2rem-list-reminders org-deadline-string)
-(org2rem-write-file ~/.reminders.org.scheduled 
+(org2rem-list-reminders org2rem-pure-timestamps-string)
+
+(org2rem-write-file org2rem-scheduled-remind-file ;~/.reminders.org.scheduled 
 			org2rem-scheduled-reminders)
-(org2rem-write-file ~/.reminders.org.deadline
-			org2rem-deadline-reminders)))
+(org2rem-write-file org2rem-deadline-remind-file ;~/.reminders.org.deadline
+			org2rem-deadline-reminders)
+(org2rem-write-file org2rem-pure-timestamps-remind-file ;~/.reminders.org.pure-timestamps
+			org2rem-pure-timestamps-reminders)
+))
 
 
 


org2remind
Description: Binary data


show-agenda
Description: Binary data
___
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] Re: org-mode and remind integration

2009-02-11 Thread Carsten Dominik

I have not followed this discussion - should I apply this patch
to org2rem.el in the distribution?

- Carsten

On Feb 11, 2009, at 3:23 PM, Sharad Pratap wrote:


Hi Daniel,

Your regular expression working fine!!, I have made few change with
same regular expression, and it has worked for me.

I wish `org2rem' could be as robust as `org-export-icalendar'.

Like me you also want orgmode outside editor, So I have added to
executable script `org2remind' and `show-agenda'.

--  
Regard

(`
_) h a r a d
org2rem.el.patchorg2remindshow- 
agenda___

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] Re: org-mode and remind integration

2009-02-11 Thread Sharad Pratap
Hi Carsten,
Please do apply it, (if you find it is fine.)
I have joined this mailing list today only,
so not able to include all peoples in thread.

On Wed, Feb 11, 2009 at 8:51 PM, Carsten Dominik domi...@science.uva.nlwrote:

 I have not followed this discussion - should I apply this patch
 to org2rem.el in the distribution?

 - Carsten


 On Feb 11, 2009, at 3:23 PM, Sharad Pratap wrote:

  Hi Daniel,

 Your regular expression working fine!!, I have made few change with
 same regular expression, and it has worked for me.

 I wish `org2rem' could be as robust as `org-export-icalendar'.

 Like me you also want orgmode outside editor, So I have added to
 executable script `org2remind' and `show-agenda'.


-- 
Regard
(`
_) h a r a d
___
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] Re: org-mode and remind integration

2009-02-11 Thread Daniel Martins
Thanks Sharap,

Since my child was born last month I did not have much time. Therefore, I
did not test org2rem.

I did not tested the last suggestion of Carsten but you seem to overcome the
problem I encountered.

I am also suggest to include this patch to expand Bastien original
org2rem.el

Whenever I have time (to sleep!) I will test your scripts.

Daniel





2009/2/11 Carsten Dominik domi...@science.uva.nl

 Hi Bastien,
 you wrote the original org2rem.el  Do you agree we should apply this patch?
 I have not tested it as I do not use remind.

 - Carsten

 On Feb 11, 2009, at 4:33 PM, Sharad Pratap wrote:

 Hi Carsten,
 Please do apply it, (if you find it is fine.)
 I have joined this mailing list today only,
 so not able to include all peoples in thread.

 On Wed, Feb 11, 2009 at 8:51 PM, Carsten Dominik 
 domi...@science.uva.nlwrote:

 I have not followed this discussion - should I apply this patch
 to org2rem.el in the distribution?

 - Carsten


 On Feb 11, 2009, at 3:23 PM, Sharad Pratap wrote:

  Hi Daniel,

 Your regular expression working fine!!, I have made few change with
 same regular expression, and it has worked for me.

 I wish `org2rem' could be as robust as `org-export-icalendar'.

 Like me you also want orgmode outside editor, So I have added to
 executable script `org2remind' and `show-agenda'.


 --
 Regard
 (`
 _) h a r a d



___
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


[Orgmode] Re: org-mode and remind integration

2009-01-13 Thread Olaf Dietsche
Daniel Martins daniel...@gmail.com writes:

 I did your test wuth a null regexp

 It is a regexp problem!

 Org-mode has two variables: org-deadline-string and org-scheduled-string
 (see below)

 and I want to match tasks which have a timestamp, ie satisfies the
 org-ts-regexp2

 BUT DO NOT  have org-deadline-string NOR org-scheduled-string

 I tried

 (org2rem-pure-timestamps-string
   (concat  \\( org-deadline-string \\|
org-scheduled-string  \\)\\{0\\}))

 in order that a regexp such as

 \\(org-deadline-string\\|org-scheduled-string\\)\\{0\\}

 would match only zero {0} occurrences of
 (org-deadline-string|org-scheduled-string)
 but this seems to be a mistake.

 Any hint??

I can only suggest the empty regexp, as before:

 (org2rem-pure-timestamps-string )

If this doesn't work, I don't know.

Regards, Olaf


___
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


[Orgmode] Re: org-mode and remind integration

2009-01-11 Thread Daniel Martins
I did your test wuth a null regexp

It is a regexp problem!



Org-mode has two variables: org-deadline-string and org-scheduled-string
(see below)

and I want to match tasks which have a timestamp, ie satisfies the
org-ts-regexp2

BUT DO NOT  have org-deadline-string NOR org-scheduled-string

I tried


(org2rem-pure-timestamps-string
  (concat  \\( org-deadline-string \\|
   org-scheduled-string  \\)\\{0\\}))


in order that a regexp such as

\\(org-deadline-string\\|org-scheduled-string\\)\\{0\\}

would match only zero {0} occurrences of
(org-deadline-string|org-scheduled-string)
but this seems to be a mistake.

Any hint??

Daniel





--- Details ---

org-deadline-string is a variable defined in `org.el'.
Its value is DEADLINE:


org-scheduled-string is a variable defined in `org.el'.
Its value is SCHEDULED:


org-ts-regexp2 is a variable defined in `org.el'.
Its value is
\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) +\\([^]-+0-9
\n ]*\\)\\( \\([0-9]\\{2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)[^\n]\\{0,16\\}

Documentation:
Regular expression matching time stamps, with groups.










2009/1/10 Olaf Dietsche
olaf+list.orgm...@olafdietsche.deolaf%2blist.orgm...@olafdietsche.de


 Hi Daniel,

 Daniel Martins daniel...@gmail.com writes:

  Me, as an ex-Fortran77 programmer, am suffering a lot with emacs lisp.

 With time, it'll get better.

  After o couple of hours trying to catch all timestamps outside SCHEDULE:
 and
  DEADLINE: lines I gave up and ask for help
 [...]
  I tried to catch all timestamps outside SCHEDULE: and DEADLINE:
  using something like
 
  (org2rem-pure-timestamps-reminders
   (org2rem-list-reminders
(concat  \\( org-deadline-string \\|
 org-scheduled-string  \\)\\{0\\})))
 
 [...]
  I tried first to create a local variable
 
  ;;; (org2rem-pure-timestamps-string
  ;;;   (concat  \\( org-deadline-string \\|
  ;;;org-scheduled-string  \\)\\{0\\}))
 
  ;;; (org2rem-pure-timestamps-reminders
  ;;;  (org2rem-list-reminders org2rem-pure-timestamps-string)
  ;;;  )
 
  but it did not work either.
 
  I am probably having
 
  Any help for this stupid doubt?

 I don't think, this is a question of a local variable vs. inlining the
 regexp. It's more a matter of an appropriate regular expression. Did
 you try an empty string instead?

 e.g.: (org2rem-pure-timestamps-reminders (org2rem-list-reminders ))

 Or did I miss your problem completely?

 Regards, Olaf

___
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


[Orgmode] Re: org-mode and remind integration

2009-01-10 Thread Daniel Martins
Olaf,

Thank you very much for your diff. I worked fine  and I learned a bit of
lisp.

Me, as an ex-Fortran77 programmer, am suffering a lot with emacs lisp.

After o couple of hours trying to catch all timestamps outside SCHEDULE: and
DEADLINE: lines I gave up and ask for help




Originally we had

(org2rem-scheduled-reminders (org2rem-list-reminders
org-scheduled-string))
(org2rem-deadline-reminders (org2rem-list-reminders
org-deadline-string))


I tried to catch all timestamps outside SCHEDULE: and DEADLINE:
using something like

(org2rem-pure-timestamps-reminders
 (org2rem-list-reminders
  (concat  \\( org-deadline-string \\|
   org-scheduled-string  \\)\\{0\\})))


In te beginning I create

(defvar org2rem-pure-timestamps-remind-file
  ~/.reminders.org.pure-timestamps)

and at the end I add an extra line to export these reminds in a different
file
  (org2rem-write-file org2rem-scheduled-remind-file
  org2rem-scheduled-reminders)
  (org2rem-write-file org2rem-deadline-remind-file
  org2rem-deadline-reminders)
  (org2rem-write-file org2rem-pure-timestamps-remind-file
  org2rem-pure-timestamps-reminders)

I tried first to create a local variable


;;; (org2rem-pure-timestamps-string
;;;   (concat  \\( org-deadline-string \\|
;;;org-scheduled-string  \\)\\{0\\}))

;;; (org2rem-pure-timestamps-reminders
;;;  (org2rem-list-reminders org2rem-pure-timestamps-string)
;;;  )

but it did not work either.




I am probably having

Any help for this stupid doubt?


Thank you

Daniel


2009/1/9 Olaf Dietsche
olaf+list.orgm...@olafdietsche.deolaf%2blist.orgm...@olafdietsche.de


  Yes, I am.
 [...]
  I am sending the last version of org2rem which integrates timed reminds
 from
  DEADLINE: and SCHEDULE: lines
 [...]
 
  2009/1/9 Carsten Dominik domi...@science.uva.nl
 
  Is any action happening on this?  Is someone trying to fix org2rem?
  - Carsten

 I have no idea of remind.

 This is an untested patch, but you get the idea. Avoid global
 variables, if you can. If you use global variables, you have
 prerequisites and side effects, which complicate following the
 code. This is not lisp specific.

 Regards, Olaf


___
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


[Orgmode] Re: org-mode and remind integration

2009-01-10 Thread Olaf Dietsche
Hi Daniel,

Daniel Martins daniel...@gmail.com writes:

 Me, as an ex-Fortran77 programmer, am suffering a lot with emacs lisp.

With time, it'll get better.

 After o couple of hours trying to catch all timestamps outside SCHEDULE: and
 DEADLINE: lines I gave up and ask for help
[...]
 I tried to catch all timestamps outside SCHEDULE: and DEADLINE:
 using something like

 (org2rem-pure-timestamps-reminders
  (org2rem-list-reminders
   (concat  \\( org-deadline-string \\|
org-scheduled-string  \\)\\{0\\})))

[...]
 I tried first to create a local variable

 ;;; (org2rem-pure-timestamps-string
 ;;;   (concat  \\( org-deadline-string \\|
 ;;;org-scheduled-string  \\)\\{0\\}))

 ;;; (org2rem-pure-timestamps-reminders
 ;;;  (org2rem-list-reminders org2rem-pure-timestamps-string)
 ;;;  )

 but it did not work either.

 I am probably having

 Any help for this stupid doubt?

I don't think, this is a question of a local variable vs. inlining the
regexp. It's more a matter of an appropriate regular expression. Did
you try an empty string instead?

e.g.: (org2rem-pure-timestamps-reminders (org2rem-list-reminders ))

Or did I miss your problem completely?

Regards, Olaf


___
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


[Orgmode] Re: org-mode and remind integration

2009-01-09 Thread Daniel Martins
Yes, I am.

My poor capabilibies on Emacs Lisp are constraining my efforts a bit.


I am sending the last version of org2rem which integrates timed reminds from
DEADLINE: and SCHEDULE: lines

I lack a way to add timestamps

Brackets are another problem with remind

Something like

 Shop   [1/5] [60%]
SCHEDULED: 2009-01-12 Mon +1w
- [ ]  2 dvds
- [ ]  1 cd
- [ ]  1 disk
- [X] extra 1
- [X] extra 2

I opt to kill all the bracketed enclosed regions

REM 12 Jan 2009 MSG Shop   %

Since
REM 12 Jan 2009 MSG Shop 1/5 60% %

may generate a problem due to %

Daniel

2009/1/9 Carsten Dominik domi...@science.uva.nl

 Is any action happening on this?  Is someone trying to fix org2rem?
 - Carsten

 On Dec 31, 2008, at 12:53 PM, Daniel Martins wrote:


 I changed from planner-el to org-mode after reading Sachas comments and
 some videos: mostly Carsten and Russell ones.

 However I use remind a lot. I like wyrd for remote operation and I have
 remind - diary - ical and planner-el very integrated.

 I think that org-mode would be improved from using remind. The ical -
 org-mode could be done using the longer path

 ical - remind - diary - org-mode

 Via

 ical - remind:  http://wiki.43folders.com/index.php/*ICal2Rem*

 remind - diary:   Sacha's rem2diary

 diary - org-mode:  (setq org-agenda-include-diary t)


 the reverse path could be directly

 org-mode - ical

 .reminders.org.deadline
  .reminders.org.scheduled

 However if I want to add all my appts in
 .reminders.org.deadline and
  .reminders.org.scheduled
   from inside org-mode

 I think that

 org2rem

 is lacking a few features

 1. It does not work with priorities since

 *** TODO  [#A] something
 DEADLINE: 2009-01-05

 generates

 REM 30 Dec 2008 MSG [#A] something

 which yields problems with remind parser

 org2rem should eliminate the priorities at all

 REM 30 Dec 2008 MSG something

 or eliminate the brackets
 REM 30 Dec 2008 MSG #A something


 2. timed deadlines are not included
 *** TODO  something
 DEADLINE: 2008-12-31 Wed 19:00


 generates
 REM 31 Dec 2008 MSG something%

 and should generate

 REM 31 Dec 2008 AT 19:00 MSG something%



 I tried to send an emacs bug report but as I do not use Emacs for sending
 email (yet!).  It seems that the bug was not reported.

 I must also admit that gnus always frightened me!

 First thanks for all the good work done with org-mode


 Daniel






org2rem.el
Description: Binary data
___
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


[Orgmode] Re: org-mode and remind integration

2009-01-09 Thread Olaf Dietsche
Daniel Martins daniel...@gmail.com writes:

 Yes, I am.
[...]
 I am sending the last version of org2rem which integrates timed reminds from
 DEADLINE: and SCHEDULE: lines
[...]

 2009/1/9 Carsten Dominik domi...@science.uva.nl

 Is any action happening on this?  Is someone trying to fix org2rem?
 - Carsten

I have no idea of remind.

This is an untested patch, but you get the idea. Avoid global
variables, if you can. If you use global variables, you have
prerequisites and side effects, which complicate following the
code. This is not lisp specific.

Regards, Olaf

--- org2rem.el.orig	2009-01-09 12:47:39.0 +0100
+++ org2rem.el	2009-01-09 15:28:55.0 +0100
@@ -34,9 +34,6 @@
 (eval-when-compile
   (require 'cl))
 
-(defvar org2rem-scheduled-reminders nil)
-(defvar org2rem-deadline-reminders nil)
-(defvar pure-time nil)
 (defvar org2rem-scheduled-remind-file 
   ~/.reminders.org.scheduled)
 (defvar org2rem-deadline-remind-file 
@@ -45,6 +42,7 @@
 (defun org2rem-list-reminders (regexp)
   Make a list of appointments. 
 REGEXP is either SCHEDULED: or DEADLINE:.
+  (let (reminders)
   (save-excursion
 (goto-char (point-min))
 (while (re-search-forward 
@@ -66,17 +64,17 @@
 
 	  (if (string-match [0-9]+:[0-9]+  task) 
 	  (save-excursion	  
-	   (setq pure-time
+		  (let ((pure-time
 		 (replace-regexp-in-string 
 ;;		  [^0-9]*\\([0-9]+:[0-9]+\\).* \\1 
 		  .*\\([0-9][0-9]:[0-9][0-9]\\).* \\1 
 ;;		  .*\\(\D\D:\D\D\\)+.* \\1 
 		  task)
-		 ) 
+			 ))
 
 	   (setq rem-time
 		 (concat  rem-time  AT  pure-time  )
-		 )
+			  ))
 	   )
 	)	  
 
@@ -95,9 +93,9 @@
 
 	  (setq rem-task (concat REM rem-time MSG   task %)
 		)
-	  (if (equal regexp org-scheduled-string)
-	  (push rem-task org2rem-scheduled-reminders)
-	(push rem-task org2rem-deadline-reminders)))
+	(push rem-task reminders)
+reminders))
+
 
 (defun org2rem-write-file (file reminders)
   Write reminders list to files.
@@ -114,15 +112,13 @@
 Store scheduled appointments in `org2rem-scheduled-remind-file'
 and `org2rem-deadline-remind-file'.
   (interactive)
-  (setq org2rem-scheduled-reminders nil)
-  (setq org2rem-deadline-reminders nil)
+  (let ((org2rem-scheduled-reminders (org2rem-list-reminders org-scheduled-string))
+	(org2rem-deadline-reminders (org2rem-list-reminders org-deadline-string)))
   (save-window-excursion
-(org2rem-list-reminders org-scheduled-string)
-(org2rem-list-reminders org-deadline-string)
-(org2rem-write-file ~/.reminders.org.scheduled 
+  (org2rem-write-file org2rem-scheduled-remind-file 
 			org2rem-scheduled-reminders)
-(org2rem-write-file ~/.reminders.org.deadline
-			org2rem-deadline-reminders)))
+  (org2rem-write-file org2rem-deadline-remind-file
+			  org2rem-deadline-reminders
 
 
 
___
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