emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: most robust linking practices?
Date: Fri, 17 Jan 2014 10:47:02 -0500	[thread overview]
Message-ID: <87eh46391l.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: CAJ51ETpKDC-eYkNzs9-EJpgK93KOeadq5oNXp+9AEqRD2a6p9w@mail.gmail.com

John Kitchin <jkitchin@andrew.cmu.edu> 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

  parent reply	other threads:[~2014-01-17 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16 21:09 most robust linking practices? John Kitchin
2014-01-16 22:32 ` Nick Dokos
2014-01-17 14:43   ` John Kitchin
2014-01-17 15:19     ` Brett Viren
2014-01-17 15:47     ` Nick Dokos [this message]
2014-01-19 20:37       ` John Kitchin

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eh46391l.fsf@alphaville.bos.redhat.com \
    --to=ndokos@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 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).