From: Ihor Radchenko <yantar92@posteo.net>
To: Gregor Zattler <telegraph@gmx.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [FR] stable literal hrefs in HTML export of direct links and usage of link description instead of numbered links in case of shortend link syntax
Date: Wed, 21 Aug 2024 16:51:21 +0000 [thread overview]
Message-ID: <87seuxlsza.fsf@localhost> (raw)
In-Reply-To: <87plq3nslb.fsf@no.lan>
Gregor Zattler <telegraph@gmx.net> writes:
> I write a piece documentation with a
> glossary in form of a description list
> and want to able to link to the
> descriptions. The thing is then
> exported to HTML.
>
> The only way to do that I found was with
> direct links, but this
>
> 1. does not allow for stable hrefs
>
> This
>
> An Emacs [[frame]] may be
> opened...
>
> - <<frame>> frame :: This is ancient
> terminology...
>
>
> This renders into (among other things):
>
> <div id="content" class="content">
> <p>
> An Emacs <a href="#orgc6125eb">1</a> may be
> opened…
> </p>
>
> <dl class="org-dl">
> <dt><a id="orgc6125eb"></a> frame</dt><dd>This is ancient
> terminology…</dd>
> </dl>
> </div>
You can customize `org-html-prefer-user-labels' to suppress
automatically generated IDs in your scenario.
> 1. that instead of a random id the link
> description is used as a href and
> therefore be stable between different
> exports, and
A more general question is whether we can default references to targets
in HTML export to use the target value.
I think that the answer for such a default is a no - IDs in HTML cannot
contain spaces, while Org mode targets can have spaces inside. Moreover,
in HTML4 spec, IDs are limited to latin characters, while Org mode
documents may not be latin-only.
Of course, we might also go into previously discussed idea to generate
valid IDs based on the text (we usually talk about it in the context of
headline IDs), but that will simply be a repetition of the previous
threads like
https://list.orgmode.org/orgmode/87wnrhl7z7.fsf@catern.com/
https://list.orgmode.org/orgmode/CAJcAo8tXVW39h18FUXLtwoDYNKQsFHqCp+YDiyWfLee29B1PRw@mail.gmail.com/
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2024-08-21 16:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 15:04 [FR] stable literal hrefs in HTML export of direct links and usage of link description instead of numbered links in case of shortend link syntax Gregor Zattler
2024-08-20 18:47 ` Ihor Radchenko
2024-08-21 16:51 ` Ihor Radchenko [this message]
2024-09-02 11:00 ` Gregor Zattler
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87seuxlsza.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=telegraph@gmx.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.