From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: most robust linking practices? Date: Fri, 17 Jan 2014 10:47:02 -0500 Message-ID: <87eh46391l.fsf@alphaville.bos.redhat.com> References: <87vbxj36dk.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4Bdj-0006jH-56 for emacs-orgmode@gnu.org; Fri, 17 Jan 2014 10:47:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4Bda-0003mq-C8 for emacs-orgmode@gnu.org; Fri, 17 Jan 2014 10:47:23 -0500 Received: from plane.gmane.org ([80.91.229.3]:46093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4Bda-0003me-6J for emacs-orgmode@gnu.org; Fri, 17 Jan 2014 10:47:14 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W4BdY-0001W9-6t for emacs-orgmode@gnu.org; Fri, 17 Jan 2014 16:47:12 +0100 Received: from pool-98-110-175-184.bstnma.fios.verizon.net ([98.110.175.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Jan 2014 16:47:12 +0100 Received: from ndokos by pool-98-110-175-184.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Jan 2014 16:47:12 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org John Kitchin writes: > The files are all on a unix file system served over nfs, so everyone > has the same / root. the users (students) have read access to my > files. > > I am working towards creating "packages" of notes in org-mode (they > might even be installed as emacs packages) for the courses that I > teach. Having relative paths within a package certainly makes sense. I > would like to link to notes in other packages too, as the courses are > related, and build on each other. but I won't know in advance where > those get installed. It sounds like those packages will have to have > some variables configured to make that work out. > IIUC, everybody sees the same namespace (students in read-only mode, you in rw: but /a/b/c/foo.org is the same file for everybody). If that's the case, then all methods (absolute or relative pathnames and/or ids) should work, no? I'd still do relative pathnames for individual "packages". For interpackage links, you might want to do a sort of double indirection[fn:1]: for each package, create a directory with a symlink farm where the symlinks point off-package: package1: /p1/c/foo.org contains an org link to file:../farm/bar.org /p1/farm/bar.org -> /p2/c/bar.org (-> means symlink) package2: /p2/c/bar.org It should be possible to construct the symlink farms mechanically (and if not, see [fn:1] :-).) Assuming that the indirections are not too onerous, it should be possible to arrange things so that installation consists of setting one symlink in each package: package1: /p1/c/foo.org contains an org link to file:../farm/bar.org /p1/farm/bar.org -> ./bar/bar.org /p1/farm/bar -> /p2/c package2: /p2/c/bar.org Only /p1/farm/bar needs to be adjusted. Or just go whole-hog with ids (but take good care of the id file: double and triple backups would not be excessive imo). Since only you can modify the file, it should work OK. Footnotes: [fn:1] http://en.wikipedia.org/wiki/Indirection - the David Wheeler quote :-) Nick