From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Meyer Subject: Searching for a headline Date: Sun, 26 Feb 2017 14:41:35 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chz54-0001MC-3R for emacs-orgmode@gnu.org; Sun, 26 Feb 2017 08:41:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chz51-0006dp-03 for emacs-orgmode@gnu.org; Sun, 26 Feb 2017 08:41:42 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:57869) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1chz50-0006c0-RK for emacs-orgmode@gnu.org; Sun, 26 Feb 2017 08:41:38 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D4F4320445 for ; Sun, 26 Feb 2017 08:41:36 -0500 (EST) Received: from [192.168.13.178] (x4e3370a8.dyn.telefonica.de [78.51.112.168]) by mail.messagingengine.com (Postfix) with ESMTPA id 6CA4424077 for ; Sun, 26 Feb 2017 08:41:36 -0500 (EST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" 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