From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch] Question on resolving links?
Date: Sat, 20 Sep 2014 23:15:21 +0200 [thread overview]
Message-ID: <87oaua8046.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87d2aq6mrj.fsf@gmx.us> (rasmus@gmx.us's message of "Sat, 20 Sep 2014 22:49:04 +0200")
Hello,
Rasmus <rasmus@gmx.us> 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
next prev parent reply other threads:[~2014-09-20 21:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-20 20:49 [patch] Question on resolving links? Rasmus
2014-09-20 21:15 ` Nicolas Goaziou [this message]
2014-09-20 22:04 ` Rasmus
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=87oaua8046.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=rasmus@gmx.us \
/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).