[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Regression in #+include behavior [master]
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Regression in #+include behavior [master] |
Date: |
Tue, 20 Mar 2018 08:53:21 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello,
Kaushal Modi <address@hidden> writes:
> Though I didn't understand why it failed when exporting from the large
> file, but not when moving the relevant subtrees (where the #+include was
> called, and the included) to a separate file..
The code was fixing links in the whole document, not only in the subtree
you were including.
The problem lay somewhere else in the file, in the "* Hey! I have a link
[[https://example.org][here]] (Awesome!)" headline. There,
`org-element-context' needed to check the headline, by (looking-at
org-complex-heading-regexp). However, since the changes were happening
in Fundamental mode, the regexp was not set. Hence the error.
So, the fix implements the following changes:
- only modify links withing the included part of the document,
- do not modify anything if includer and includee both live in the same
directory,
- switch to Org mode before proceeding with changes.
Regards,
--
Nicolas Goaziou