emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [patch] Question on resolving links?


From: Nicolas Goaziou
Subject: Re: [O] [patch] Question on resolving links?
Date: Sat, 20 Sep 2014 23:15:21 +0200

Hello,

Rasmus <address@hidden> writes:

> I would like to use #+INCLUDE keywords for inputting headlines from
> other files.  Line-numbers are too volatile and I'm not willing to
> split up my file.

I think these specifications need to be refined. Should it only include
the headline and its section, or the whole tree starting at the headline?

> The attached patch does not, but I am not very happy about the
> elegance of the implementation and it relies on a mix of org.el
> functions and ox functions.  Basically, the patch tries to interpret
> keywords like this:
>
> #+INCLUDE: "~/file.org::*foo"
>
> Is there not a function to interpret a link-string, say
> "~/file.org::*foo", particularly with ox? 

You cannot do this with ox, as include keywords are expanded before the
export process actually begins.

> The closes thing I found was `org-element-parse-secondary-string` on
> [[~/file.org::*foo]] which gives me the correct element. Normally,
> `org-export-resolve-fuzzy-link' should then help me out, but in
> `org-export-expand-include-keyword' I don't have info! Also,
> `org-link-search' didn't seem to work across files.

I think `org-open-link-from-string' is what you want:

  (org-open-link-from-string "[[~/file.org::*foo]]")


Regards,

-- 
Nicolas Goaziou



reply via email to

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