bug#81529: 31.0.91; [ELPA] Atom feed entries only specify a self-link

Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]> Sat, 01 Aug 2026 13:00:03 +0200
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Philip Kaludercic <[email protected]> writes:

> Daniel Mendler <[email protected]> writes:
>
>> Philip Kaludercic <[email protected]> writes:
>>
>>>> It would be useful to also specify an additional rel="alternate" link
>>>> for each feed entry pointing to the package website, e.g.,
>>>> https://elpa.gnu.org/packages/tmr.html. This way feed readers like
>>>> Elfeed can point users to the package website.
>>>
>>> As we don't have any structure within the HTML changelog (and we don't
>>> reproduce the entire changelog, but both cap it ourselves and only
>>> generate what the maintainers include in their news source), we would
>>> have to use the same "alternate" link in every entry.
>>
>> Yes, I am aware of this problem. My suggestion is to add ids to the
>> headlines in the html file - this will be useful in any case. Then the
>> feed link could also point to the changelog for example:
>>
>> https://elpa.gnu.org/packages/consult.html#news
>
> Sure, but my point is that it remains the same link for every <entry>.
> It is not the end of the world, adjusting the code is trivial, I just
> wanted to think this through to not miss any obvious alternative ideas.

This does not sound like a problem? In case we figure out a better
approach to detect versions in the changelog, one could also use
different links later, e.g.:

https://elpa.gnu.org/packages/consult.html#news-2.0

(See the issue about including parts of the changelog in the feed.)

>>> Do you know if we can just set the alternate link for the entire feed,
>>> or will news readers not make use of this?
>>
>> I don't know if the spec allows this. The entire feed link is always a
>> rel="self" afaict. At least Elfeed only supports only rel="alternate"
>> links per entry.
>
> The spec implies that it is possible.  [0] says that a feed may have a
> link tag, and a comment further below implies that it is possible to
> have a rel="alternate" tag as well:

Yes, this is the alternate link for the feed, and not for the entries.
You can add that too of course (it would be appreciated), but I am
specifically asking about an alternate link for entries here, since this
is what feed readers usually use when you click on an entry.

> It also makes sense to me, as a HTML page can have alternate link to the
> atom feed and the atom feed can have a backlink to the HTML page.

Indeed.

> Whether or not clients make use of this and use it as a fallback if an
> entry lacks a <link rel="alternate" ...> tag is a different question
> that I don't know, but it doesn't seem unreasonable.

Well, I am not sure. It certainly deviates from the way Elfeed uses the
links right now. Elfeed uses any link if present, but prefers the
alternate entry link if present. Currently the self link is used, such
that you will see the xml file, which is suboptimal. Now falling back to
the feed alternate link instead sounds harmful and unexpected. Think
about feeds with entry links which don't specify rel attributes.

It is unlikely that we are going to change this in Elfeed, since Elfeed
works well as is with many feeds for many users over the years, and I've
not seen any new bug reports about the reader misbehaving on feeds.
Adding special casing for the ELPA feeds or changing the current rules
does not sound appealing. I don't know what other readers do, so maybe
there are some well-defined fallback rules.

Anyway, I suggest to not overthink this. This is issue is specifically
about proper html/alternate links in the entries (not the feed) as seems
to be common in most Atom feeds. If the links are the same for every
entry (for now) so be it, if we can live with this tiny aesthetic flaw.

>>>> Daniel