From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: HTML Export of Links to Source Blocks seems broken Date: Fri, 17 Jun 2016 09:51:10 +0200 Message-ID: <874m8sxngx.fsf@saiph.selenimh> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDoYl-00046J-NX for emacs-orgmode@gnu.org; Fri, 17 Jun 2016 03:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDoYh-0000LL-JG for emacs-orgmode@gnu.org; Fri, 17 Jun 2016 03:51:22 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:36649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDoYh-0000LG-Bt for emacs-orgmode@gnu.org; Fri, 17 Jun 2016 03:51:19 -0400 In-Reply-To: (timor's message of "Thu, 16 Jun 2016 12:18:28 +0200") 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: timor Cc: emacs-orgmode@gnu.org Hello, timor writes: > considering the following example: > > -------------------------------------- > #+NAME: test_fun > #+BEGIN_SRC js > function test_fun() { > > } #+END_SRC > > Link to [[test_fun]] > > #+NAME: another_test_fun > #+BEGIN_SRC js > function another_test_fun() { > > } > #+END_SRC > > Link to [[another_test_fun]] > ----------------------------------------- > > the exported html code creates to tags, like this: > > ------------------------------------ > Link to 1 > ------------------------------------ > > and this: > > ------------------------------------ > Link to 1 > ------------------------------------ > > Is that behavior desired? Yes, it is. Those are internals targets. Org handles them, well, internally. > I would expect the link text to actually spell "test_fun" and > "another_test_fun" in this case, since those are the names of the > source blocks. This is a reasonable expectation only if you are a bit careful about the value of the NAME keyword. See `org-latex-prefer-user-labels' for more information. > As a workaround, is there anywhere in the exporter that I could hook > into to change the link text myself? There is no equivalent to `org-latex-prefer-user-labels' in HTML export back-end at the moment. Though, patches to add one are welcome since this is a quite frequent request. Regards, -- Nicolas Goaziou