emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel P Gomez <gomez.danp@gmail.com>
To: emacs-orgmode@gnu.org
Subject: How to keep correct filepaths when using the #+INCLUDE derivative?
Date: Wed, 28 Feb 2018 14:29:57 +0100	[thread overview]
Message-ID: <CAJTMgxgXf4RjSfeXAyViQbcTyGz_tGkW3qCcgjm+TAoY2iUsBg@mail.gmail.com> (raw)

Dear org users,

If I include a file child.org in parent.org using the #+INCLUDE
derivative, and the following two conditions are true:

1. child.org and parent.org are not in the same directory nor share
directory structure,
2. child.org contains file links with relative file paths,

then exporting parent.org will produce a file with broken links.

Is there a way to have org sort this out? Or even make this optional,
say by using:

#+INCLUDE: child.org :fix-paths t

I guess the quickest (but perhaps not cleanest) way to have this
feature would be to convert relative paths in file links into absolute
paths within `org-export-expand-include-keyword`. I'm not that well
versed in Elisp yet to do this yet, though.

Are there any known solutions to this, or suggestions on how to get it working?

Thanks in advance,

Daniel

             reply	other threads:[~2018-02-28 13:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 13:29 Daniel P Gomez [this message]
2018-02-28 17:51 ` How to keep correct filepaths when using the #+INCLUDE derivative? Nicolas Goaziou
2018-02-28 20:11   ` Daniel P Gomez
2018-03-01  1:01     ` Daniel P Gomez
2018-03-01 18:32       ` Nicolas Goaziou
2018-03-01 18:56         ` Daniel P Gomez
2018-03-01 22:42           ` Nicolas Goaziou
2018-03-02 14:16             ` Daniel P Gomez
2018-03-03  1:24               ` Nicolas Goaziou
2018-03-03 13:06                 ` Daniel P Gomez
2018-03-06  8:51                   ` Nicolas Goaziou
2018-03-10 11:28                     ` Daniel P. Gomez
2018-03-18 15:15                       ` Nicolas Goaziou

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=CAJTMgxgXf4RjSfeXAyViQbcTyGz_tGkW3qCcgjm+TAoY2iUsBg@mail.gmail.com \
    --to=gomez.danp@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).