[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Searching for a headline
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Searching for a headline |
Date: |
Sun, 26 Feb 2017 16:27:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hello,
Mark Meyer <address@hidden> writes:
> I'm using org-publish-external-link to look up a the link target for a
> headline. The following code works, although I'd expect it to fail:
>
> (org-publish-resolve-external-link
> (concat "* " (org-element-property :raw-value headline))
> source-file)
>
> ``headline'' is a headline as returned by org-element, while
> ``source-file'' is a ``.org'' file.
>
> I'd expect that this needs to be
>
> (org-publish-resolve-external-link
> (concat (make-string (org-element-property :level headline) ?*)
> " " (org-element-property :raw-value headline))
> source-file)
>
> I.e. for a level 3 headline it should be ``*** foobar'' and not ``*
> foobar''. ``org-publish-resolve-external-link'' uses
> ``org-export-string-to-search-cell'' internally.
>
> Can someone point me to some docuentation on how the searching works?
The first argument for `org-publish-external-link' is a so-called
"fuzzy" search string. In such a string "*whatever" is meant to match
a headline named "whatever", whatever its level is. IOW, the "*"
character denotes a headline, not a level.
Regards,
--
Nicolas Goaziou
- [O] Searching for a headline, Mark Meyer, 2017/02/26
- Re: [O] Searching for a headline,
Nicolas Goaziou <=
- Re: [O] Searching for a headline, Mark Meyer, 2017/02/26
- Re: [O] Searching for a headline, Nicolas Goaziou, 2017/02/26
- Re: [O] Searching for a headline, Mark Meyer, 2017/02/26
- Re: [O] Searching for a headline, Nicolas Goaziou, 2017/02/26
- Re: [O] Searching for a headline, Mark Meyer, 2017/02/26
- Re: [O] Searching for a headline, Nicolas Goaziou, 2017/02/26
- Re: [O] Searching for a headline, Mark Meyer, 2017/02/26
- Re: [O] Searching for a headline, Nicolas Goaziou, 2017/02/26
- Re: [O] Searching for a headline, Mark Meyer, 2017/02/26
- Re: [O] Searching for a headline, Mark Meyer, 2017/02/26