emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Nick Dokos <ndokos@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: most robust linking practices?
Date: Sun, 19 Jan 2014 15:37:45 -0500	[thread overview]
Message-ID: <CAJ51ETpoqa3DTOSBeVDU4CXRyX08fD4WiCiUzPJzcrrSBhUt=w@mail.gmail.com> (raw)
In-Reply-To: <87eh46391l.fsf@alphaville.bos.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2919 bytes --]

thanks for the ideas.

I put together a new kind of link that takes you to files inside of emacs
packages, or to paths relative to where a library is installed.

http://kitchingroup.cheme.cmu.edu/blog/2014/01/19/Making-org-mode-links-to-files-in-Emacs-packages/

basically I find where the library or package is installed, and then
construct an org-link relative to that.

from the tests at the post above, it seems to work pretty well!

John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Fri, Jan 17, 2014 at 10:47 AM, Nick Dokos <ndokos@gmail.com> wrote:

> 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
>
>
>

[-- Attachment #2: Type: text/html, Size: 4483 bytes --]

      reply	other threads:[~2014-01-19 20:37 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
2014-01-19 20:37       ` John Kitchin [this message]

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='CAJ51ETpoqa3DTOSBeVDU4CXRyX08fD4WiCiUzPJzcrrSBhUt=w@mail.gmail.com' \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /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).