* Emacs-Calendar export to iCal/vcal @ 2006-08-23 20:46 Philipp Raschdorff 2006-08-23 21:36 ` Carsten Dominik ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Philipp Raschdorff @ 2006-08-23 20:46 UTC (permalink / raw) To: emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm using emacs +org-mode mainly for organizing todos and for brainstorming in project planing and organizing tasks etc. So it's mainly a (very powerfull) outliner. I playes arround with the DUE & DEADLINE features and realized that there is one thing missing for me: synchronizing emacs-todos / appointments to iCal (Mac OS X 10.4) To make it easier: I really would like to have it one way: Adding data from emacs to an iCal-file. I'm using my mobile phone to synchronize with my calendar (iCal) and it would be nice to have EMacs copying data to iCal and then have this data on my mobile phone after the next sync. What do you think? Are you using the emacs-calendar-functions and how to you synchronize to other applications? Any suggestions would be great. Best regards from Berlin / Germany Phil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iD8DBQFE7L7HmbjPeL8dZWgRAt29AJ9JyQJK5Ps3UJyAuFDGGhlZq+WdQgCeIMvj Sl/n5RM1yFFlpSX8umWWH8A= =+rV9 -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Emacs-Calendar export to iCal/vcal 2006-08-23 20:46 Emacs-Calendar export to iCal/vcal Philipp Raschdorff @ 2006-08-23 21:36 ` Carsten Dominik 2006-08-23 21:53 ` Piotr Zielinski 2006-08-23 22:45 ` Philipp Raschdorff 2006-08-23 22:15 ` Pete Phillips 2006-09-01 15:50 ` Carsten Dominik 2 siblings, 2 replies; 7+ messages in thread From: Carsten Dominik @ 2006-08-23 21:36 UTC (permalink / raw) To: Philipp Raschdorff; +Cc: emacs-orgmode Hi Phillip, have you read this? http://staff.science.uva.nl/~dominik/Tools/org/org.html#iCalendar-export If yes, can you be more specific about what you are missing? - Carsten On Aug 23, 2006, at 22:46, Philipp Raschdorff wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I'm using emacs +org-mode mainly for organizing todos and for > brainstorming in project planing and organizing tasks etc. So it's > mainly a (very powerfull) outliner. > > I playes arround with the DUE & DEADLINE features and realized that > there is one thing missing for me: > > synchronizing emacs-todos / appointments to iCal (Mac OS X 10.4) > > To make it easier: I really would like to have it one way: Adding data > from emacs to an iCal-file. > > I'm using my mobile phone to synchronize with my calendar (iCal) and > it would be nice to have EMacs copying data to iCal and then have this > data on my mobile phone after the next sync. > > What do you think? Are you using the emacs-calendar-functions and how > to you synchronize to other applications? > > Any suggestions would be great. > > Best regards from Berlin / Germany > > Phil > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.3 (Darwin) > > iD8DBQFE7L7HmbjPeL8dZWgRAt29AJ9JyQJK5Ps3UJyAuFDGGhlZq+WdQgCeIMvj > Sl/n5RM1yFFlpSX8umWWH8A= > =+rV9 > -----END PGP SIGNATURE----- > > > _______________________________________________ > Emacs-orgmode mailing list > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Emacs-Calendar export to iCal/vcal 2006-08-23 21:36 ` Carsten Dominik @ 2006-08-23 21:53 ` Piotr Zielinski 2006-08-23 22:45 ` Philipp Raschdorff 1 sibling, 0 replies; 7+ messages in thread From: Piotr Zielinski @ 2006-08-23 21:53 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode Hi Phil, Not directly relevant, but here's what I use to synchronize the calendar information in the other direction: from iCalendar calendars to emacs org-mode. The whole setup is rather hacky and complicated (I didn't really have time to make it more presentable) but it might be still useful to some. I have all my org-files in ~/myfiles/org/. File calendars.txt, contains URLs of remote calendars I'd like to include in my org-agenda. The first word in each line is the name of the local file to which the remote calendar will periodically be downloaded: ---------- calendars.txt STARTS ---------- camtalks http://talks.cam.ac.uk/show/ics/5245 msresearchtalks http://www.srcf.ucam.org/users/pz215/msr.ics ---------- calendars.txt ENDS ---------- Once a day I execute the following script (from cron): ---------- update-calendars STARTS ---------- #!/bin/bash orgdir=~/myfiles/org diary=$orgdir/calendars.diary emacs=$orgdir/local-calendars.el > $diary echo "(setq local-calendars '(" > $emacs cat $orgdir/calendars.txt | \ { while read name url ; do wget -N -O $orgdir/$name.ics $url echo "#include \"$orgdir/$name.diary\"" >> $diary echo "\"$name\" " >> $emacs done } echo "))" >> $emacs ---------- update-calendars ENDS ---------- It downloads all the remote calendars described in "calendars.txt" and creates two new files. First, "calendars.diary", which is an emacs diary meta-file that just includes the proper calendar files. ---------- calendars.diary STARTS ---------- #include "/home/pz215/myfiles/org/camtalks.diary" #include "/home/pz215/myfiles/org/msresearchtalks.diary" ---------- calendars.diary ENDS ---------- The second file created by "update-calendars" is "local-calendars.el", an elisp file that contains a list of calendars: ---------- local-calendars.el STARTS ---------- (setq local-calendars '( "camtalks" "msresearchtalks" )) ---------- local-calendars.el ENDS ---------- What remains is to convert the downloaded icalendar files into the diary files included by "calendars.diary". To this end, I have the following lines in my ".emacs": ---------- .emacs SNIPPET STARTS ---------- (require 'calendar) (european-calendar) (load "~/myfiles/org/local-calendars.el") (dolist (name local-calendars) (let ((ical (concat "/home/pz215/myfiles/org/" name ".ics")) (diary (concat "/home/pz215/myfiles/org/" name ".diary"))) (when (file-newer-than-file-p ical diary) (with-current-buffer (find-file-noselect diary) (kill-region (point-min) (point-max)) (icalendar-import-file ical diary))))) ---------- .emacs SNIPPET ENDS ---------- That's it. If you want emacs to notify you about your appointments, take a look at the function "appt-activate" in the appt library. If you use a desktop environment that uses the standard notification deamon (e.g., GNOME), you can set up the appt library to use it. Take a look at the "send-notify" command from the "libnotify-bin" package (Debian/Ubuntu). Thanks, Piotr On 23/08/06, Carsten Dominik <dominik@science.uva.nl> wrote: > > Hi Phillip, > > have you read this? > > http://staff.science.uva.nl/~dominik/Tools/org/org.html#iCalendar-export > > If yes, can you be more specific about what you are missing? > > - Carsten > > On Aug 23, 2006, at 22:46, Philipp Raschdorff wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Hi, > > > > I'm using emacs +org-mode mainly for organizing todos and for > > brainstorming in project planing and organizing tasks etc. So it's > > mainly a (very powerfull) outliner. > > > > I playes arround with the DUE & DEADLINE features and realized that > > there is one thing missing for me: > > > > synchronizing emacs-todos / appointments to iCal (Mac OS X 10.4) > > > > To make it easier: I really would like to have it one way: Adding data > > from emacs to an iCal-file. > > > > I'm using my mobile phone to synchronize with my calendar (iCal) and > > it would be nice to have EMacs copying data to iCal and then have this > > data on my mobile phone after the next sync. > > > > What do you think? Are you using the emacs-calendar-functions and how > > to you synchronize to other applications? > > > > Any suggestions would be great. > > > > Best regards from Berlin / Germany > > > > Phil > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.3 (Darwin) > > > > iD8DBQFE7L7HmbjPeL8dZWgRAt29AJ9JyQJK5Ps3UJyAuFDGGhlZq+WdQgCeIMvj > > Sl/n5RM1yFFlpSX8umWWH8A= > > =+rV9 > > -----END PGP SIGNATURE----- > > > > > > _______________________________________________ > > Emacs-orgmode mailing list > > Emacs-orgmode@gnu.org > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > > > > > -- > Carsten Dominik > Sterrenkundig Instituut "Anton Pannekoek" > Universiteit van Amsterdam > Kruislaan 403 > NL-1098SJ Amsterdam > phone: +31 20 525 7477 > > > > _______________________________________________ > Emacs-orgmode mailing list > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- Piotr Zielinski, Research Associate Cavendish Laboratory, University of Cambridge, UK http://www.cl.cam.ac.uk/~pz215/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Emacs-Calendar export to iCal/vcal 2006-08-23 21:36 ` Carsten Dominik 2006-08-23 21:53 ` Piotr Zielinski @ 2006-08-23 22:45 ` Philipp Raschdorff 2006-08-24 6:36 ` Carsten Dominik 1 sibling, 1 reply; 7+ messages in thread From: Philipp Raschdorff @ 2006-08-23 22:45 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1.1.1: Type: text/plain, Size: 1044 bytes --] Carsten, Piotr and Pete, thanks for the replies so far - great to hear that it's possible to do plain ascii editing and still have the same data ready for syncing. I tried to play with the ideas you mentioned, but I found out that I have no .ics-files in ~/Library/Calendars. I knew I had my iCal files stored there in the past (OS X 10.3.x). Currently I'm using OS X 10.4.7 and it seems that some data is stored in ~/Library/Application Support/iCal/Sources for each calendar in iCal, there seems to be a directory like: E2A32ED1-CBD0-4A13-B397-3742B1680F17.calendar which has 3 files in it: corestorage.ics Index Info.plist I was able to export my org-mode-data to an .ics file, but it seems that iCal imports data from that file and then creates a new file under the path given before (~/Library/Application Support/iCal/ Sources). Question1: How can I force iCal to read and write to the .ics-file I've exported from org-mode? Question2: Why isn't there a ~/Library/Calendars Folder? Best regards from berlin phil [-- Attachment #1.1.2: Type: text/html, Size: 2403 bytes --] [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 186 bytes --] [-- Attachment #2: Type: text/plain, Size: 149 bytes --] _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Emacs-Calendar export to iCal/vcal 2006-08-23 22:45 ` Philipp Raschdorff @ 2006-08-24 6:36 ` Carsten Dominik 0 siblings, 0 replies; 7+ messages in thread From: Carsten Dominik @ 2006-08-24 6:36 UTC (permalink / raw) To: Philipp Raschdorff; +Cc: emacs-orgmode On Aug 24, 2006, at 0:45, Philipp Raschdorff wrote: > Carsten, Piotr and Pete, > > thanks for the replies so far - great to hear that it's possible to do > plain ascii editing and still have the same data ready for syncing. > > I tried to play with the ideas you mentioned, but I found out that I > have no .ics-files in ~/Library/Calendars. I knew I had my iCal files > stored there in the past (OS X 10.3.x). Currently I'm using OS X > 10.4.7 and it seems that some data is stored in > > ~/Library/Application Support/iCal/Sources > > for each calendar in iCal, there seems to be a directory like: > E2A32ED1-CBD0-4A13-B397-3742B1680F17.calendar > Yes, you are right, this seems to be the new convention in MacOSX. Unfortunately, I don't have 10.4 and I am not going to get it soon, so I will probably not be driven to fix this soon either :-( - Carsten ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Emacs-Calendar export to iCal/vcal 2006-08-23 20:46 Emacs-Calendar export to iCal/vcal Philipp Raschdorff 2006-08-23 21:36 ` Carsten Dominik @ 2006-08-23 22:15 ` Pete Phillips 2006-09-01 15:50 ` Carsten Dominik 2 siblings, 0 replies; 7+ messages in thread From: Pete Phillips @ 2006-08-23 22:15 UTC (permalink / raw) To: Philipp Raschdorff; +Cc: emacs-orgmode Hi Philipp >>>>> "Philipp" == Philipp Raschdorff <p.raschdorff@macnews.de> writes: Philipp> realized that there is one thing missing for me: Philipp> synchronizing emacs-todos / appointments to iCal (Mac OS X Philipp> 10.4) Philipp> To make it easier: I really would like to have it one way: Philipp> Adding data from emacs to an iCal-file. Philipp> What do you think? Are you using the Philipp> emacs-calendar-functions and how to you synchronize to Philipp> other applications? It just so happens that I have been playing around with this myself in the last few days. I'm not sure whether you want to sync the org-mode dated items, or items from the emacs diary/calendar files - your last sentence tends to suggest the latter, so... I needed to be able to export my emacs diary file to an icalendar file (which I assume Mac iCal supports ?) so that I could copy it to our Intranet (our lab staff can then point SunBird or Evolution to the file on the Intranet and see my appointments). Now I use CVS emacs, which comes with icalendar.el - if you can't find this on your system, you can google for it. You need this for the ical export function. The basic command line version is this: /usr/local/emacs-cvs/bin/emacs -batch --eval "(icalendar-export-file \"/home/pete/diary\" \"/home/pete/diary.ics\")" The 'diary' file is the file you edit in emacs (you may call it something else of course) and the 'diary.ics' file is the exported icalendar file. A word of warning - I'd advise setting up a shellscript to do all the work for you, as you need to make sure you remove the diary.ics file first, otherwise it appends the dates to it each time you run it. This means that you will end up with multiple entries for the same appointment (in some applications which aren't fussy about the files they slurp in), or it just won't import in others - Google calendar being one. I couldn't understand how it worked once, and then Google Calendar just kept complaining and aborting. It was only when I saw the ics file getting bigger each time that it dawned on me ....... :-( So, to enable you to read it in iCal (I am a Mac ignoramus - excuse me here) you will either need to be able to copy it to the Mac partition from your GNU Linux/UNIX partition, or to copy the file to a web server which you can access from your Mac iCal. Making another assumption, I assume you can point iCal to a disk file to import, or to add another calendar to your setup ? With sunbird and evolution, you can have multiple calendars, and toggle them on and off. My shell script is appended. Hope this helps. Now of course, it could be that you are using emacs under some M$ product or Mac O/S, in which case the shellscript itself will only be of use to you in giving you an idea how to do what you need. I have no idea whether you can do similar things under thos O/Ss. Note - my application only pulls out appointments I have tagged with :SMTL:, so my personal appointments stay private. This is an added level of complexity - you can delete the appropriate lines. Final point - if I have misunderstood, and you need to get dated items from your org-mode file, you will need to use something like this: /usr/local/emacs-cvs/bin/emacs -batch --eval "(org-export-icalendar-combine-agenda-files)" Or one of the other org-mode icalendar export functions. I managed to get this to work once, but it doesn't create the file ~/org.ics for me anymore. I'm sure Carsten will be able to sort this for you anyway, if this is what you need. All the best, Pete ---------------sync-icalendar-to-apache.sh---------------------- #!/bin/sh ##################################################################### # FUNCTION: grab all my SMTL appointments from my emacs diary file, # # export to ical, then copy to SMTL Intranet server. # ##################################################################### ################ ### IMPORTANT### ######################################################################### # This script needs to be run *after* running ssh-add at login, so that # # the ssh transfers will occur without human intervention. # ######################################################################### ########################################################################### # I use my ~/.xinitrc to run ssh-add and then run an 'at' job to schedule # # it to run at 3:30 every morning: # # # # xterm -bg red -e ssh-add $HOME/.ssh/id_dsa # # echo /home/pete/bin/sync-icalendar-to-apache.sh | at 3:30 # # # # 1 - takes my ~/diary file (maintained in emacs) # # 2 - greps out the SMTL only appointments into another emacs diary file, # # 3 - then uses the icalendar export function to export to ical format. # # 4 - copies to our internal Intranet server file system # # # ########################################################################### #################### # SET UP VARIABLES # #################### DIARY_COMPLETE=/home/pete/diary DIARY_SMTL=/home/pete/pete.smtl ICAL_SMTL=/home/pete/pete.ics ICAL_INTRANET=/data/htdocs/Calendars/pete.ics ############################## # Must remove the old copies # ############################## rm $ICAL_COMPLETE rm $ICAL_SMTL ################################################################################# # filter out all SMTL stuff only. the smtl file will only be SMTL appointments. # ################################################################################# egrep ":SMTL:" < $DIARY_COMPLETE | sed 's/\:SMTL\://g' > $DIARY_SMTL ############################## # export to icalendar format # ############################## /usr/local/emacs-cvs/bin/emacs -batch --eval "(icalendar-export-file \"$DIARY_SMTL\" \"$ICAL_SMTL\")" ######################################################################### # Now copy to the correct directory on the internal file server so that # # users can point sunbird/evolution to: # # http://intranet.smtl.co.uk/Calendars/pete.ics # ######################################################################### scp $ICAL_SMTL intranet.smtl.co.uk:$ICAL_INTRANET ################################################# # Finally, set up another job for the next day. # ################################################# echo /home/pete/bin/sync-icalendar-to-apache.sh | at 03:30 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Emacs-Calendar export to iCal/vcal 2006-08-23 20:46 Emacs-Calendar export to iCal/vcal Philipp Raschdorff 2006-08-23 21:36 ` Carsten Dominik 2006-08-23 22:15 ` Pete Phillips @ 2006-09-01 15:50 ` Carsten Dominik 2 siblings, 0 replies; 7+ messages in thread From: Carsten Dominik @ 2006-09-01 15:50 UTC (permalink / raw) To: Philipp Raschdorff; +Cc: emacs-orgmode It just occurred to me that a possible solution may be to write the ical file to your public HTML directory and *subscribe* iCal to it. I don't know the correct syntax, but there must be a way to specify a url on the local computer. Maybe it does not even have to be in the public HTML folder, maybe you can subscribe to any location? I don't know, if anybody does, please tell us. Disadvantage would be that this would be a read-only calendar in iCal. However, since you would not be able to import any changes back into org-mode anyway, maybe this is not a big problem - you can just write to another calendar to which you own the write rights. - Carsten On Aug 23, 2006, at 22:46, Philipp Raschdorff wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I'm using emacs +org-mode mainly for organizing todos and for > brainstorming in project planing and organizing tasks etc. So it's > mainly a (very powerfull) outliner. > > I playes arround with the DUE & DEADLINE features and realized that > there is one thing missing for me: > > synchronizing emacs-todos / appointments to iCal (Mac OS X 10.4) > > To make it easier: I really would like to have it one way: Adding data > from emacs to an iCal-file. > > I'm using my mobile phone to synchronize with my calendar (iCal) and > it would be nice to have EMacs copying data to iCal and then have this > data on my mobile phone after the next sync. > > What do you think? Are you using the emacs-calendar-functions and how > to you synchronize to other applications? > > Any suggestions would be great. > > Best regards from Berlin / Germany > > Phil > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.3 (Darwin) > > iD8DBQFE7L7HmbjPeL8dZWgRAt29AJ9JyQJK5Ps3UJyAuFDGGhlZq+WdQgCeIMvj > Sl/n5RM1yFFlpSX8umWWH8A= > =+rV9 > -----END PGP SIGNATURE----- > > > _______________________________________________ > Emacs-orgmode mailing list > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-09-01 17:04 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-08-23 20:46 Emacs-Calendar export to iCal/vcal Philipp Raschdorff 2006-08-23 21:36 ` Carsten Dominik 2006-08-23 21:53 ` Piotr Zielinski 2006-08-23 22:45 ` Philipp Raschdorff 2006-08-24 6:36 ` Carsten Dominik 2006-08-23 22:15 ` Pete Phillips 2006-09-01 15:50 ` Carsten Dominik
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).