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: Mon, 20 Jun 2016 14:52:37 +0200 Message-ID: <87fus82fai.fsf@saiph.selenimh> References: <874m8sxngx.fsf@saiph.selenimh> <87r3bwvxke.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEyh3-0006JJ-Qn for emacs-orgmode@gnu.org; Mon, 20 Jun 2016 08:52:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEyh2-0007Vp-WC for emacs-orgmode@gnu.org; Mon, 20 Jun 2016 08:52:45 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:59873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEyh2-0007Vl-Pc for emacs-orgmode@gnu.org; Mon, 20 Jun 2016 08:52:44 -0400 In-Reply-To: (timor's message of "Mon, 20 Jun 2016 10:18:51 +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: > Ok, if I understand you correctly, implementing the mechanism akin to > the latex one, setting a new variable `org-html-prefer-user-labels` would > change the relevant exported HTML for the following piece of org: > > ---------------------- > #+NAME: test_fun > #+BEGIN_SRC js :exports code > function test_fun() { > > } #+END_SRC > > Link to [[test_fun]] > > #+CAPTION: Caption of Another Test Fun > #+NAME: another_test_fun > #+BEGIN_SRC js > function another_test_fun() { > > } > #+END_SRC > > Link to [[another_test_fun]] ----------------------- > > from > > #+BEGIN_EXAMPLE html > >
>   ...
>   
> >
>   ...
>   
> > Link to 1 > > Link to 1 > > #+END_EXAMPLE > > to > > #+BEGIN_EXAMPLE html > >
>   ...
>   
> >
>   ...
>   
> > Link to 1 > > Link to 1 > > #+END_EXAMPLE Correct. > Looking at `org-html-link`, `org-export-get-reference` is only called > to get the _internal_ reference. That works perfectly fine already, and I am > quite happy with the way org mode generates labels/ids for the exported > code. That should, however, have no influence of the link description > (called `desc` in the code in `org-html-link`), which is the thing > that I actually want to change? They have no influence over the link description (which is "1" in both cases, as you noticed). If you want to change the description, simply provide one: [[test_fun][whatever]] Regards, -- Nicolas Goaziou