Hello, timor <timor...@gmail.com> 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 <a> tags, like this: > > ------------------------------------ > Link to <a href="#orgsrcblock1">1</a> > ------------------------------------ > > and this: > > ------------------------------------ > Link to <a href="#orgsrcblock2">1</a> > ------------------------------------ > > 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