From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brett Viren Subject: Re: most robust linking practices? Date: Fri, 17 Jan 2014 10:19:55 -0500 Message-ID: References: <87vbxj36dk.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4BDg-0002xc-Uz for emacs-orgmode@gnu.org; Fri, 17 Jan 2014 10:20:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4BDc-00030m-HD for emacs-orgmode@gnu.org; Fri, 17 Jan 2014 10:20:28 -0500 Received: from smtpgw.bnl.gov ([2620:10a:0:3::30]:39705 helo=iron3.sec.bnl.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4BDb-0002mY-Hf for emacs-orgmode@gnu.org; Fri, 17 Jan 2014 10:20:24 -0500 In-Reply-To: (John Kitchin's message of "Fri, 17 Jan 2014 09:43:44 -0500") 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: John Kitchin Cc: Nick Dokos , "emacs-orgmode@gnu.org" --=-=-= Content-Type: text/plain Hi John, 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. How about defining a slew of links in org-link-abbrev-list. Say, one for each set of class notes. Maybe you'd maintain two copies of such a list, one that assumes your shared file system is being used and one that assumes some layout convention in the user's home directory. Your users could pick the best one or use them as a starting point for their own customization. The fact that the link definitions may contain inline lisp functions may help to organize this. I guess you would need some way to update your reader/user's copy of the list as it evolves. Immediately, I don't have any ideas about that. I've started to use this approach a little. So far, just to reference some common external links. Here's my setup: #+BEGIN_SRC elisp ;; Custom external links ;; http://orgmode.org/manual/Adding-hyperlink-types.html#Adding-hyperlink-types ;; http://orgmode.org/manual/Link-abbreviations.html#Link-abbreviations (defun bv-link-resolve-github (tag) (replace-regexp-in-string ":" "/blob/master/" tag)) (setq org-link-abbrev-alist '( ("ghsite" . "https://github.com/brettviren/%h") ("ghfile" . "https://github.com/brettviren/%(bv-link-resolve-github)") ("dbtrac" . "http://dayabay.ihep.ac.cn/tracs/dybsvn/ticket/%h") )) #+END_SRC -Brett. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlLZShsACgkQEixH2Z0dKCzAugCfb6rCN9m27CM0539OyaYz3e2c kzMAoJZPhNKAAmdaQ5vYcmxvY8XvlXA7 =eCN0 -----END PGP SIGNATURE----- --=-=-=--