From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: timor <timor.dd@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: HTML Export of Links to Source Blocks seems broken
Date: Fri, 17 Jun 2016 09:51:10 +0200 [thread overview]
Message-ID: <874m8sxngx.fsf@saiph.selenimh> (raw)
In-Reply-To: <CAAX25XA3dSreTbqeTfBajcrKv8kj2fDapdpFUu05UD7HkVZ-dA@mail.gmail.com> (timor's message of "Thu, 16 Jun 2016 12:18:28 +0200")
Hello,
timor <timor.dd@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
next prev parent reply other threads:[~2016-06-17 7:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 10:18 HTML Export of Links to Source Blocks seems broken timor
2016-06-17 7:51 ` Nicolas Goaziou [this message]
2016-06-17 10:46 ` timor
2016-06-17 11:56 ` Nicolas Goaziou
2016-06-20 8:18 ` timor
2016-06-20 12:52 ` Nicolas Goaziou
2016-06-20 13:07 ` timor
2016-06-20 20:23 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874m8sxngx.fsf@saiph.selenimh \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=timor.dd@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).