From: "Tim O'Callaghan" <tim.ocallaghan@gmail.com>
To: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Feature Request - Active and inactive links.
Date: Mon, 10 Dec 2007 01:52:10 +0100 [thread overview]
Message-ID: <3d6808890712091652r55b7e583y1a28896693d86a27@mail.gmail.com> (raw)
In-Reply-To: <3d6808890712091651j17631cd6s7234351ac8f35532@mail.gmail.com>
On 10/12/2007, Bastien <bzg@altern.org> wrote:
> Hi Tim,
>
> "Tim O'Callaghan" <tim.ocallaghan@gmail.com> 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)))
))))
next prev parent reply other threads:[~2007-12-10 0:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 15:17 Feature Request - Active and inactive links Tim O'Callaghan
2007-12-09 23:52 ` Bastien
[not found] ` <3d6808890712091651j17631cd6s7234351ac8f35532@mail.gmail.com>
2007-12-10 0:52 ` Tim O'Callaghan [this message]
2007-12-10 23:49 ` Christian Egli
2007-12-11 11:21 ` Bastien
[not found] ` <3d6808890712110523l5d369faaj5aaf1bcc87a1b55f@mail.gmail.com>
2007-12-11 13:24 ` Tim O'Callaghan
2007-12-11 14:59 ` Bastien
2007-12-11 16:08 ` Christian Egli
2007-12-11 21:30 ` Bastien
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d6808890712091652r55b7e583y1a28896693d86a27@mail.gmail.com \
--to=tim.ocallaghan@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.