Subject: Re: 31.0.50; nnatom: missing content in articles.

From: Daniel Semyonov <[email-masked]>
Date: Sat, 05 Apr 2025 01:40:54 +0300

>>>>> Fernando de Morais writes:

    > When accessing certain feeds with `nnatom', it is possible to notice the
    > absence of characters such as curly quotes.

    > To reproduce, which is possible with `emacs -Q', please:

    > 1. M-x load-library RET gnus RET
    > 2. M-x gnus
    > 3. In the groups buffer:
    >    - press B (shift+b), then type nnatom and insert the address
    >      planet.emcaslife.com/atom.xml then RET
    > 4. In the browse server buffer, RET and select an article with RET

    > Results in:

    >         - It should be noticeable that curly quotes are missing from the
    >           text.  This can be validated by opening the original article
    >           link in a browser.

I think those characters disappear due to the text being HTML, which
causes Gnus to display it differently.
AFAICT, the characters do appear in the body of the text saved by nnatom.

    > Additionally, in feeds like YouTube channels, the link to the video is
    > missing.  It is also possible to reproduce this with `emacs -Q' by
    > following the steps described above, but change the address to (Prot's
    > channel):

    > - www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g

    > Results in:

    >         - Instead of the link, the content of the article is:
    >           (nil (Content-Type . text/html) links)

YouTube "articles" should actually contain two links, a link to the
channel and the video; unfortunately even though I remember testing this
it seems I made a typo and any article with an empty body (other than
links) will be broken in this way.
Attached a patch which fixes this.

Daniel

>From 5cca19014b90b2edcbbc3373cd9c66c75ed34561 Mon Sep 17 00:00:00 2001
From: Daniel Semyonov <[email-masked]>
Date: Sat, 5 Apr 2025 01:29:44 +0300
Subject: [PATCH] nnatom: Fix parsing of empty articles

* lisp/gnus/nnatom.el (nnatom--read-parts): Fix typo
---
 lisp/gnus/nnatom.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/gnus/nnatom.el b/lisp/gnus/nnatom.el
index 281c3a1aeed..0d2136f20cb 100644
--- a/lisp/gnus/nnatom.el
+++ b/lisp/gnus/nnatom.el
@@ -269,7 +269,7 @@ nnatom--read-parts
            (or st (push summary parts)))
           ((setq content (or summary content))
            (push (append content '(links)) parts))
-          (t (push '((nil (Content-Type . "text/html") links)) parts)))
+          (t (push '(nil (Content-Type . "text/html") links) parts)))
     parts))
 (defvoo nnatom-read-parts-function #'nnatom--read-parts
   nil nnfeed-read-parts-function)
-- 
2.49.0