From: Sharad Pratap <sh4r4d@gmail.com>
To: danielemc@gmail.com
Cc: emacs-orgmode@gnu.org
Subject: Re: org-mode and remind integration
Date: Wed, 11 Feb 2009 19:53:09 +0530 [thread overview]
Message-ID: <5fb1c7f40902110623g57477e7ev4a47a1c28422b6ce@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 355 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 457 bytes --]
[-- Attachment #2: org2rem.el.patch --]
[-- Type: text/x-patch, Size: 2355 bytes --]
--- org2rem.el.old 2009-01-09 09:00:48.000000000 +0000
+++ org2rem.el.new 2009-02-11 13:59:16.777712000 +0000
@@ -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)
+ ))
\f
[-- Attachment #3: org2remind --]
[-- Type: application/octet-stream, Size: 847 bytes --]
#! /usr/bin/emacs --script
(load-file "~/.emacs")
(require 'org2rem)
(defun org2remind ()
"batch org2rem function"
(setq org2rem-scheduled-reminders nil)
(setq org2rem-deadline-reminders nil)
(setq org2rem-pure-timestamps-string nil)
(save-window-excursion
(find-file "~/my/test.org")
(org2rem-list-reminders org-scheduled-string)
(org2rem-list-reminders org-deadline-string)
(org2rem-list-reminders org2rem-pure-timestamps-string)
(org2rem-write-file org2rem-scheduled-remind-file ;"~/.reminders.org.scheduled"
org2rem-scheduled-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)
[-- Attachment #4: show-agenda --]
[-- Type: application/octet-stream, Size: 1611 bytes --]
#!/usr/bin/emacs --script
;;
;; be.el
;;
;; Made by s
;; Login <s@taj>
;;
;; Started on Wed Feb 4 21:51:00 2009 s
;; Last update Wed Feb 11 17:17:09 2009 Sharad Pratap
(setq
european-calendar-style nil
diary-mail-days 7
diary-file "~/.Organize/emacs/diary/diary")
(org-batch-agenda "a"
european-calendar-style nil
diary-mail-days 12
org-agenda-ndays 20
diary-file "~/.Organize/emacs/diary/diary"
org-agenda-files
(file-expand-wildcards "~/.Organize/emacs/org/*/*.org"))
; org-agenda-files
; (quote
; (
; "~/.Organize/emacs/org/myself/test.org"
; )))
; )
;;; emacs -batch -l ~/.emacs -eval '(org-batch-agenda "t")' | lpr
;;; You may also modify parameters on the fly like this:
;;; emacs -batch -l ~/.emacs \
;;; -eval '(org-batch-agenda "a" \
;;; org-agenda-ndays 300 \
;;; org-agenda-include-diary nil \
;;; org-agenda-files (quote ("~/org/project.org")))' \
;;; | lpr
;;; (org-batch-agenda "S")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; from: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg10679.html
;;emacs --batch --no-init-file -q -l ~/.emacs.slim --eval "(progn
;;(org-agenda-list) (princ (buffer-string)))" 2> /dev/null
[-- Attachment #5: 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
next reply other threads:[~2009-02-11 14:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-11 14:23 Sharad Pratap [this message]
2009-02-11 15:21 ` Re: org-mode and remind integration Carsten Dominik
2009-02-11 15:33 ` Sharad Pratap
[not found] ` <8B4F1B14-BD08-4446-B642-9D0DAEAD56D2@uva.nl>
2009-02-11 23:42 ` Daniel Martins
2009-02-12 13:22 ` Sharad Pratap
[not found] ` <A5094B1B-1F14-4395-938E-2AB57422C776@uva.nl>
[not found] ` <5fb1c7f40902151410s16b415ddqfbfb986a8a89fba0@mail.gmail.com>
2009-02-15 22:43 ` Carsten Dominik
[not found] ` <5fb1c7f40902160720x330896c2q530e38944463fdb9@mail.gmail.com>
2009-02-17 21:02 ` Carsten Dominik
-- strict thread matches above, loose matches on Subject: below --
2008-12-31 11:53 Daniel Martins
2009-01-09 8:17 ` Carsten Dominik
2009-01-09 8:57 ` Daniel Martins
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
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=5fb1c7f40902110623g57477e7ev4a47a1c28422b6ce@mail.gmail.com \
--to=sh4r4d@gmail.com \
--cc=danielemc@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).