emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel P Gomez <gomez.danp@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: How to keep correct filepaths when using the #+INCLUDE derivative?
Date: Wed, 28 Feb 2018 21:11:01 +0100	[thread overview]
Message-ID: <CAJTMgxjMJ1g-vQsK2vMJyvAu7bra+4nOhhqLZ3GQ6MQhCQaxHw@mail.gmail.com> (raw)
In-Reply-To: <87woyxhuk2.fsf@nicolasgoaziou.fr>

Sorry for the ignorance, but where could I look up how to use a parse
tree filter? And where would these modifications make sense?
Any pointers towards documentation, functions, or any help of any kind
would be appreciated. I must say I am a bit lost.

Thank you in advance,

Daniel

On Wed, Feb 28, 2018 at 6:51 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
>
> Daniel P Gomez <gomez.danp@gmail.com> writes:
>
>> 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?
>
> As you suggest, I would use a parse tree filter that turns every
> relative file link into an absolute one.
>
> Regards,
>
> --
> Nicolas Goaziou

  reply	other threads:[~2018-02-28 20:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 13:29 How to keep correct filepaths when using the #+INCLUDE derivative? Daniel P Gomez
2018-02-28 17:51 ` Nicolas Goaziou
2018-02-28 20:11   ` Daniel P Gomez [this message]
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=CAJTMgxjMJ1g-vQsK2vMJyvAu7bra+4nOhhqLZ3GQ6MQhCQaxHw@mail.gmail.com \
    --to=gomez.danp@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).