emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [ox, patch] Quickly INCLUDE from own file


From: Nicolas Goaziou
Subject: Re: [O] [ox, patch] Quickly INCLUDE from own file
Date: Tue, 07 Oct 2014 16:02:29 +0200

Hello,

Rasmus <address@hidden> writes:

> The attached patch allows for "quick" (== without filename) inclusion
> from the same file.  Why?  'Cause I'm lazy and it would be useful to
> push boring, location-specific stuff to the end of the file.
>
> Here's an example:
>
>     * poor man's ~:ignoreheading:~
>     #+INCLUDE: "::*foo" :only-contents t
>
>     #+INCLUDE: "::tbl"
>
>     * foo                                                   :noexport:
>     1
>
>     * bar                                                   :noexport:
>     #+NAME: tbl
>     | 1 |
>
> You need the preceding "::" to be able tell the difference between the
> file "tbl" and the table "tbl".  Granted, this doesn't look like an
> org link.  If that's an issue, for each link sans location it could be
> tested if it exists in the current buffer.
>
> Do you think something like this would be desirable?

Including in the same file is dangerous: you can easily duplicate
custom-id, name keywords, which are supposed to be unique. Even though
we don't prevent it[fn:1], I don't think we should make it easier to achieve.

Introducing a new special syntax in this case doesn't sound like a good
move either.


Regards,

[fn:1] Actually, we should have a guard against circular inclusion, but
at the moment, it is ineffective in this case.

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]