Hello, Mark Meyer <m...@ofosos.org> 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