emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Searching for a headline
@ 2017-02-26 13:41 Mark Meyer
  2017-02-26 15:27 ` Nicolas Goaziou
  0 siblings, 1 reply; 15+ messages in thread
From: Mark Meyer @ 2017-02-26 13:41 UTC (permalink / raw)
  To: emacs-orgmode

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
  mark@ofosos.org

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-02-26 21:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-26 13:41 Searching for a headline Mark Meyer
2017-02-26 15:27 ` Nicolas Goaziou
2017-02-26 16:11   ` Mark Meyer
2017-02-26 16:39     ` Nicolas Goaziou
2017-02-26 16:58       ` Mark Meyer
2017-02-26 17:28         ` Nicolas Goaziou
2017-02-26 17:54           ` Mark Meyer
2017-02-26 18:12             ` Nicolas Goaziou
2017-02-26 18:21               ` Mark Meyer
2017-02-26 18:28                 ` Nicolas Goaziou
2017-02-26 18:30                   ` Mark Meyer
2017-02-26 21:46                   ` Mark Meyer
2017-02-26 19:32             ` Eric Abrahamsen
2017-02-26 20:40               ` Mark Meyer
2017-02-26 21:34                 ` Eric Abrahamsen

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).