emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Daniel Martins" <danielemc@gmail.com>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: bastien.guerry@ens.fr, Emacs-orgmode@gnu.org
Subject: Re: org-mode and remind integration
Date: Fri, 9 Jan 2009 06:57:18 -0200	[thread overview]
Message-ID: <6ac505ad0901090057x40d163edr1366a45fb08ed405@mail.gmail.com> (raw)
In-Reply-To: <368A47AA-30D5-40B0-9ECD-57B0361B89AA@uva.nl>


[-- Attachment #1.1: Type: text/plain, Size: 2507 bytes --]

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 <dominik@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
>
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 3498 bytes --]

[-- Attachment #2: org2rem.el --]
[-- Type: application/octet-stream, Size: 4285 bytes --]

;;; org2rem.el --- Convert org appointments into reminders

;; Copyright 2006 Bastien Guerry
;;
;; Author: bzg AT altern DOT fr
;; Version: $Id: org2rem.el,v 0.1 2006/12/04 09:21:03 guerry Exp guerry $
;; Keywords: org-mode remind reminder appointment diary calendar
;; X-URL: http://www.cognition.ens.fr/~guerry/u/org2rem.el

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

;;; Commentary:

;; Not so much to say here.  Just try org2rem in your org-mode buffer.

;; Put this file into your load-path and the following into your ~/.emacs:
;;   (require 'org2rem)

;;; Code:

(provide 'org2rem)
(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 
  "~/.reminders.org.deadline")

(defun org2rem-list-reminders (regexp)
  "Make a list of appointments. 
REGEXP is either SCHEDULED: or DEADLINE:."
  (save-excursion
    (goto-char (point-min))
    (while (re-search-forward 
	    (concat "^[ \t]*" regexp
		    "[ \t]*"  org-ts-regexp2) nil t)
      (let* ((system-time-locale "C") ;; make sure we use english dates
	     (year (string-to-number (match-string-no-properties 2)))
	     (month (string-to-number (match-string-no-properties 3)))
	     (day (string-to-number (match-string-no-properties 4)))
	     (encoded-time (encode-time 0 0 0 day month year))
	     (rem-time (format-time-string " %d %b %Y " encoded-time))
	     task rem-task)
	(save-excursion
	  (re-search-backward org-todo-line-regexp nil t)
	  (setq task
		(replace-regexp-in-string 
		 org-bracket-link-regexp 
		 "\\3" (match-string-no-properties 3)))

	  (if (string-match "[0-9]+:[0-9]+"  task) 
	      (save-excursion	      
	       (setq 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 " ")
		     )
	       )
	    )	      


;; ;; To maintain priority and list results [1/5]
;; 	  (setq task
;; 		(replace-regexp-in-string 
;; 		 "\\[\\(.*\\)\\]" "\\1" task))

;; deleting priority and list results [1/5]

	  (setq task
		(replace-regexp-in-string 
		 "\\[\\(.*\\)\\]" "" task))


	  (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)))))))

(defun org2rem-write-file (file reminders)
  "Write reminders list to files."
  (with-temp-buffer
    (find-file file)
    (erase-buffer)
    (dolist (rem reminders)
      (insert rem "\n"))
    (write-file file)
    (kill-buffer (file-name-nondirectory file))))

(defun org2rem ()
  "Convert appointment from local org-mode buffer to reminders.
Store scheduled appointments in `org2rem-scheduled-remind-file'
and `org2rem-deadline-remind-file'."
  (interactive)
  (setq org2rem-scheduled-reminders nil)
  (setq org2rem-deadline-reminders nil)
  (save-window-excursion
    (org2rem-list-reminders org-scheduled-string)
    (org2rem-list-reminders org-deadline-string)
    (org2rem-write-file "~/.reminders.org.scheduled" 
			org2rem-scheduled-reminders)
    (org2rem-write-file "~/.reminders.org.deadline"
			org2rem-deadline-reminders)))


\f
;;;;##########################################################################
;;;;  User Options, Variables
;;;;##########################################################################





;;; org2rem.el ends here

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

  reply	other threads:[~2009-01-09  8:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-31 11:53 org-mode and remind integration Daniel Martins
2009-01-09  8:17 ` Carsten Dominik
2009-01-09  8:57   ` Daniel Martins [this message]
2009-01-09 14:39     ` Olaf Dietsche
2009-01-10 13:21       ` Daniel Martins
2009-01-10 21:18         ` Olaf Dietsche
2009-01-11 20:19           ` Daniel Martins
2009-01-13 21:06             ` Olaf Dietsche
  -- strict thread matches above, loose matches on Subject: below --
2009-02-11 14:23 Sharad Pratap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ac505ad0901090057x40d163edr1366a45fb08ed405@mail.gmail.com \
    --to=danielemc@gmail.com \
    --cc=Emacs-orgmode@gnu.org \
    --cc=bastien.guerry@ens.fr \
    --cc=dominik@science.uva.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).