emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] manual: confusing example of adding attributes to a link (affiliated keywords)
Date: Mon, 20 Jun 2022 23:25:29 +0700	[thread overview]
Message-ID: <t8q71r$mgv$1@ciao.gmane.io> (raw)


Org Manual in info "(org) Links in HTML export" 
https://orgmode.org/manual/Links-in-HTML-export.html has the following 

> Org files can also have special directives to the HTML export
> back-end. For example, by using ‘#+ATTR_HTML’ lines to specify new
> format attributes to <a> or <img> tags. This example shows changing
> the link’s title and style:
> #+ATTR_HTML: :title The Org mode homepage :style color:red;
> [[https://orgmode.org]]

Likely I have seen similar suggestions in this list as well.

Actually it assigns attribute to paragraphs in addition to links. That 
is why, I think, this fragment should be removed from manual as a 
confusing one since it gives impression of support of per-link attributes.

Attributes assigned through affiliated keywords belongs to paragraph 
(block-level element), not to link (inline object). Actual result of export:

     <p title="The Org mode homepage" style="color:red;">
     <a href="https://orgmode.org" title="The Org mode homepage" 

If it were possible to set attributes to links, the result should be

     <a href="https://orgmode.org" title="The Org mode homepage" 

The reason of my expectation is that a paragraph may have more than one 
link with different titles.

I am unsure if formal bug report will help. I promised it in the 
following discussion:
Max Nikulin to emacs-orgmode. Re: Org-syntax: Intra-word markup. Thu, 3 
Feb 2022 19:10:19 +0700. https://list.orgmode.org/stggnf$d8g$1@ciao.gmane.io

A similar complain:
Anton Linevych. How to add extra attributes to link in Org-mode? 
2017-06-21 https://linevi.ch/en/org-link-extra-attrs.html

The reason why I have decided to post this bug report now is the 
following message:
Juan Manuel Macías to emacs-orgmode. Re: About 'inline special blocks' 
Sun, 19 Jun 2022 12:47:40 +0000. 

It states that styles and similar stuff may solve the issue with 
attributes for inline objects. From my point of view it is wrong and in 
some cases per-object attributes are necessary. While <a rel="nofollow 
noreferrer" href="..."> or <a target="_blank" href="..."> may be added 
through style, attributes like "alt" for images, "title", "lang", etc. 
for links are individual.

I am aware of the following post:
J. Kitchin. Extending the org-mode link syntax with attributes. 
The recipe solves the problem, but this time the topic of inline special 
blocks has been risen in the context of limitations in Org markup making 
it inappropriate tool for GNU manuals in general and the Org manual in 
particular. So some more general solution is required than local 

So as outcome for this bug report I expect that either caveats related 
to affiliated keywords are clearly stated in the manual or some 
"official" way to assign attributes for specific inline objects is 

             reply	other threads:[~2022-06-20 17:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 16:25 Max Nikulin [this message]
2022-06-25  5:29 ` [BUG] manual: confusing example of adding attributes to a link (affiliated keywords) Ihor Radchenko
2022-06-25 10:12   ` Max Nikulin
2022-06-25 10:39     ` Ihor Radchenko
2022-06-25 11:55       ` Max Nikulin
2022-06-25 12:17         ` Ihor Radchenko

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:

  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='t8q71r$mgv$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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).