emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Searching for a headline


From: Mark Meyer
Subject: [O] Searching for a headline
Date: Sun, 26 Feb 2017 14:41:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

Hi,
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?

Cheers, Mark

-- 
  Mark Meyer
  address@hidden



reply via email to

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