From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tim O'Callaghan" Subject: Feature Request - Active and inactive links. Date: Mon, 10 Dec 2007 01:52:10 +0100 Message-ID: <3d6808890712091652r55b7e583y1a28896693d86a27@mail.gmail.com> References: <3d6808890712030717s4aeccea3oe95960df850d4841@mail.gmail.com> <87bq8zcto6.fsf@bzg.ath.cx> <3d6808890712091651j17631cd6s7234351ac8f35532@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1WsX-0003zx-FX for emacs-orgmode@gnu.org; Sun, 09 Dec 2007 19:52:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1WsW-0003zh-Tu for emacs-orgmode@gnu.org; Sun, 09 Dec 2007 19:52:13 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1WsW-0003zc-PE for emacs-orgmode@gnu.org; Sun, 09 Dec 2007 19:52:12 -0500 Received: from nf-out-0910.google.com ([64.233.182.189]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1WsW-0006a5-06 for emacs-orgmode@gnu.org; Sun, 09 Dec 2007 19:52:12 -0500 Received: by nf-out-0910.google.com with SMTP id f5so1000284nfh for ; Sun, 09 Dec 2007 16:52:10 -0800 (PST) In-Reply-To: <3d6808890712091651j17631cd6s7234351ac8f35532@mail.gmail.com> Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: org-mode mailing list On 10/12/2007, Bastien wrote: > Hi Tim, > > "Tim O'Callaghan" writes: > > > Currently Org mode supports links like: > > http://www.astro.uva.nl/~dominik > > file:/home/dominik/images/jupiter.jpg > > news:comp.emacs > > etc.... > > > > I would like to propose the concept of 'Active' links, based on > > the above. The idea being that some links are marked such that > > when Org is building an agenda, it includes these links as if they > > were in the org-agenda-files list. > > It's been a while since you posted this message... I think I > don't really understand the core idea here. Can you elaborate a > bit more? What kind of information do you want to attach to > links? what for? in what context should this information be > displayed? processed? > Thanks for providing further details! > Sorry if i was unclear, I thought my examples would it explain most of it, my bad. Here it is in more detail. :) The core idea - Active links - is a link that specifies a resource (usually remote) that will be included (and possibly preprocessed) when you compile an agenda. They should look and act like normal links, but be handled differently when an agenda is compiled. Where this idea came from. I have a hacked together function that i use (see my rusty elisp below) that creates org-files from ical URLs. I use this to include my google calendar and other published events in my agenda. With the addition of org-add-link-type (described in Appendix A-2 in the org manual), i could create a link type that would convert an ical link to an org file on opening. This is great, but i could not then auto-include that in buffed file in my agenda without saving it and adding it to org-agenda-files. What would be needed would be some kind of flag or indicator that the link should be processed when creating an agenda buffer. It would need to be assumed that the link is, or will be preprocessed into, an org file. This led me to consider the consequences of an 'Active Link' and how to make it a more general and flexible concept. * The Agenda is not passive, it modifies its source files. = This could be mitigated using meta-tagging of read only resources. Another more finicky method could be a file of negative or modification assertions that change or remove a read only link before inclusion in the Agenda. Possibly a table of specific org node search links that replace the target with the stored org node. * The Agenda only processes the org-agenda-files list. = Let org build the list recursively from active links with one org-file as the head of the tree. This would have the benefit of letting you build different agendas based on the first org file referenced. Note - might need to force read only active links to be leaf nodes (i.e not recurse into them). * The Active Link referenced is no longer an agenda item. = If you remove the org file or its link from the within agenda, you change the Active Link to an inactive link globally. That is, in all of the linked files in the current org-agenda files list. * What if you open an active link from an org-mode buffer? = Undecided possibly configurable? I would say open the link in its natural state. * What use is a an active link to a remote read-only org file? = Collaboration. I can think of many scenarios, but the one i like is where my wife can just update a text file or blog post or whatever to update my agenda. * How would you represent an active link so it is obvious? = An active link could be prefixed by a + sign, possibly with embedded meta information for the agenda. Some possible examples: - read/write remote org file for collaboration (efs/angeftp) +file:/me@my-home-machine.com:/home/me/personal.org - read only remote org file for collaboration in category work +work+http://www.astro.uva.nl/~dominik/remote.org - read only remote ical file of local whats-on information. +whatson+ical:http://upcoming.yahoo.com/calendar/v2/place/upI5ACueA5szd_8- The +category+ link prefix idea is because + can be part of a URL. * Where could you go from here? = The concept could be extended to allow further integration to other tools using to-org and from-org pre and post processing. Using my ical hack for an example, it could possibly be extended to a read/write WEBDAV link. Say for Outlook or Sunbird integration. So thats the idea in more detail, hope it clarifies the idea further... Tim. -- Google Calendar hack -- (setq google-ical-org-list '( ; removed personal links, but left a working public ical link. ; each ical link consists of: ;("ical link" ; "ical link download target file" ; "org file created - must be in org-agenda-files") ("http://upcoming.yahoo.com/calendar/v2/place/upI5ACueA5szd_8-" "~/gettingThingsDone/CalendarSync/UpComing.ics" "~/gettingThingsDone/CalendarSync/Upcoming.org"))) (defun toc:goggle-to-org () "get a google calendar and convert it into org dates" (interactive) (with-temp-buffer ;; initialise calendar handling (let* ((glist google-ical-org-list)) ;; iterate through list (while (setq entry (pop glist)) (setq google-ical-url (car entry) local-ical-file (nth 1 entry) local-date-file (nth 2 entry)) ;; Delete the diary local files (if (file-exists-p local-ical-file) (delete-file local-ical-file)) (if (file-exists-p local-date-file) (delete-file local-date-file)) ;; Get ical file (w3-download-url google-ical-url (expand-file-name local-ical-file)) ;; create an empty ical to process (if (not (file-exists-p local-ical-file)) ((set-buffer (find-file local-ical-file)) (save-buffer local-ical-file))) ;; convert to diary without leading & (icalendar-import-file local-ical-file local-date-file t) ;; create an empty org file if needed (if (not (find-buffer-visiting local-date-file)) ((set-buffer (file-find local-date-file)) (save-buffer local-date-file))) ;; iCalendar leaves the buffers open (if (find-buffer-visiting local-date-file) (kill-buffer (find-buffer-visiting local-date-file))) (if (find-buffer-visiting local-ical-file) (kill-buffer (find-buffer-visiting local-ical-file))) ))))