head 1.6; access; symbols; locks sacha:1.6; strict; comment @; @; 1.6 date 2003.07.27.12.40.28; author sacha; state Exp; branches; next 1.5; 1.5 date 2003.07.16.07.42.55; author sacha; state Exp; branches; next 1.4; 1.4 date 2003.04.01.09.19.21; author sacha; state Exp; branches; next 1.3; 1.3 date 2003.04.01.09.17.37; author sacha; state Exp; branches; next 1.2; 1.2 date 2003.03.31.11.48.10; author sacha; state Exp; branches; next 1.1; 1.1 date 2003.03.31.11.47.42; author sacha; state Exp; branches; next ; desc @@ 1.6 log @Fixed doc comment. @ text @;;; Exports planner.el schedule entries for use by remind and diary ;; ;; Planner+Remind module ;; Sacha Chua ;; based on John Wiegley's work ;; ;; Canonical URL: http://richip.dhs.org/~sachac/notebook/emacs/remind.el ;; Version: $Id: remind.el,v 1.5 2003/07/16 07:42:55 sacha Exp sacha $ ;; Notes: http://www.emacswiki.org/cgi-bin/wiki.pl?PlannerAndRemind ;; ;; Usage: ;; ;; Download ;; http://richip.dhs.org/~sachac/notebook/emacs/plan2rem ;; http://richip.dhs.org/~sachac/notebook/emacs/rem2diary ;; and put them somewhere in your PATH, or customize ;; remind-plan2rem and remind-rem2diary ;; Add to your .emacs: ;; (require 'remind) ;; ;; Add to your ~/diary (or the file specified by diary-file): ;; #include ~/.diary.planner ;; (Replace ~/.diary.planner with the value of remind-diary-file.) ;; ;; Add to your ~/.reminders: ;; INCLUDE ~/.reminders.planner ;; ;; These files are automatically generated by the functions in this ;; module and should not be manually edited or your changes will be lost. ;; Remember to update your planner file instead of your diary file. ;; If you want your schedule to be automatically updated whenever you ;; save a planner file, put this in your .emacs: ;; ;; (add-hook 'planner-mode-hook ;; (lambda () (interactive) ;; (make-local-hook 'after-save-hook) ;; (add-hook 'after-save-hook 'remind-parse-planner t t) ;; (add-hook 'after-save-hook 'remind-export-to-diary t t))) ;; ;; Alternatively, you can add the following lines to your ;; .emacs file: ;; ;; (defadvice mark-diary-entries (before remind-generate-diary activate) ;; "Generate a diary file from a .reminders file." ;; (remind-parse-planner) ;; (remind-export-to-diary)) ;; ;; TODO: ;; ;; - Be a little more efficient when it comes to parsing the planner; ;; we don't have to parse _everything_ whenever we save. For ;; example, I tend to bunch edits together and then save everything ;; during the publishing process. I could probably just remove it ;; from the after-save-hook. It would be nice to have it kick in ;; when I interactively save one file, but postpone processing until ;; the last file if I'm working with a whole bunch of planner files. ;; - Write a planner-diary.el for people who don't like remind. ;; ;; Thanks to: ;; ;; Jody Klymak - getting me to write some documentation, and suggesting ;; use of remind-diary-file ;; ;; Note: I don't use this module much. If things don't work, please ;; e-mail me at sacha@@free.net.ph ;; ;; No guarantees. Might overwrite your scheduling info; keep a backup. (require 'planner) (defgroup remind nil "A module for exporting planner.el schedules to remind and/or diary." :prefix "remind-" :group 'applications) (defcustom remind-planner-file "~/.reminders.planner" "Where reminders extracted from planner files are stored. WARNING: This file will be overwritten whenever you call remind-parse-planner." :type 'file :group 'remind) (defcustom remind-diary-file "~/.diary.planner" "Where diary entries extracted from planner files are stored. WARNING: This file will be overwritten whenever you call remind-export-to-diary." :type 'file :group 'remind) (defcustom remind-rem "rem" "The path of the rem command." :type 'file :group 'remind) (defcustom remind-plan2rem "plan2rem" "The path of the planner to remind converter." :type 'file :group 'remind) (defcustom remind-rem2diary "rem2diary" "The path of the remind to diary converter." :type 'file :group 'remind) (defun remind-parse-planner () "Extract all appointments from planner files." (interactive) (with-current-buffer (find-file-noselect remind-planner-file) (erase-buffer) (call-process remind-plan2rem nil t nil (expand-file-name planner-directory)) (save-buffer))) (defun remind-export-to-diary () "Convert reminders to diary format, overwriting the file specified by `remind-diary-file'" (interactive) (with-current-buffer (find-file-noselect remind-diary-file) (erase-buffer) (call-process remind-rem nil t nil "-s3" "-r" "-q") (call-process-region (point-min) (point-max) remind-rem2diary t t nil) (save-buffer))) (provide 'remind)@ 1.5 log @Fix docbug. @ text @d8 1 a8 1 ;; Version: $Id: remind.el,v 1.4 2003/04/01 09:19:21 sacha Exp sacha $ d22 1 a22 1 ;; Add to your ~/.diary (or the file specified by diary-file): @ 1.4 log @Doc fix. @ text @d5 1 d8 2 a9 1 ;; Version: $Id: remind.el,v 1.3 2003/04/01 09:17:37 sacha Exp sacha $ d13 6 d27 1 a27 1 ;; INCLUDE ~/.remind.planner d29 4 d42 8 d90 15 d110 1 a110 1 (call-process "plan2rem" nil t nil (expand-file-name planner-directory)) d118 2 a119 2 (call-process "rem" nil t nil "-s3" "-r" "-q") (call-process-region (point-min) (point-max) "rem2diary" t t nil) @ 1.3 log @Doc fix. @ text @d7 1 a7 1 ;; Version: $Id: remind.el,v 1.2 2003/03/31 11:48:10 sacha Exp sacha $ d43 7 a49 1 ;; Jody Klymak - getting me to write some documentation @ 1.2 log @Added version tag. Hope it works! @ text @d1 1 d7 1 a7 1 ;; Version: $Id$ a8 8 ;; TODO: Be a little more efficient when it comes to parsing the ;; planner; we don't have to parse _everything_ whenever we save. For ;; example, I tend to bunch edits together and then save everything ;; during the publishing process. I could probably just remove it from ;; the after-save-hook. It would be nice to have it kick in when I ;; interactively save one file, but postpone processing until the last ;; file if I'm working with a whole bunch of planner files. d30 11 @ 1.1 log @Initial revision @ text @d6 2 a7 1 ;; @