From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64202: bug#66188: 29.1; Include Atom feed reader Date: Thu, 22 Feb 2024 07:47:15 +0530 Message-ID: <87msrtkztg.fsf@outlook.com> References: <87v8fhmgvw.fsf@dsemy.com> <8734wcfynr.fsf@dsemy.com> <87wmtnbptm.fsf@dsemy.com> <87zfyj8ojz.fsf@dsemy.com> <87ttohxc56.fsf@dsemy.com> <87le83hcm8.fsf@outlook.com> <87h6io5rr5.fsf@dsemy.com> <87r0hof9ll.fsf_-_@dsemy.com> <87jznfpom1.fsf@gmx.net> <874jejb2sg.fsf@dsemy.com> <87fry2pa1n.fsf@gmx.net> <87ttmhwxby.fsf@dsemy.com> <87wmrd9zcy.fsf@outlook.com> <875xyx5ksi.fsf@dsemy.com> <87sf219ntf.fsf@gmx.net> Reply-To: James Thomas Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34170"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64202@debbugs.gnu.org To: Daniel Semyonov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 22 03:19:02 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rcyfu-0008Zo-GI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Feb 2024 03:19:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcyfZ-00070A-Dm; Wed, 21 Feb 2024 21:18:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcyfX-0006zv-Uy for bug-gnu-emacs@gnu.org; Wed, 21 Feb 2024 21:18:39 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rcyfX-0005h9-MU for bug-gnu-emacs@gnu.org; Wed, 21 Feb 2024 21:18:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcyft-0007dy-RY; Wed, 21 Feb 2024 21:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: James Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Thu, 22 Feb 2024 02:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64202 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: patch Original-Received: via spool by 64202-submit@debbugs.gnu.org id=B64202.170856828829242 (code B ref 64202); Thu, 22 Feb 2024 02:19:01 +0000 Original-Received: (at 64202) by debbugs.gnu.org; 22 Feb 2024 02:18:08 +0000 Original-Received: from localhost ([127.0.0.1]:37290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcyf1-0007bY-Og for submit@debbugs.gnu.org; Wed, 21 Feb 2024 21:18:08 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:49233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcyey-0007ar-C4 for 64202@debbugs.gnu.org; Wed, 21 Feb 2024 21:18:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1708568244; x=1709173044; i=jimjoe@gmx.net; bh=riMBAX5/2NyjqE+R945Wjr0vAc80O3WBAZLbkXiI14U=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=jSJpfPAQ6RJntTZom1b9MOwi59SlPU9kE72hlg1gAAIn+uHEe056k6M2XJB9anSK Lx4v2i+wfmMyR9A0hqarz+Giet1CQvL+l0ipdYgrBu6PwehhvdgDMbwUWCuQlE3De qCe+ZRsOlKkazDLKzOrrqBZXLiEF52hkeZ18vONy/Zz6Msd8wCFfVe7OiKS8mOx14 c7nEo+u07QPN2f2HtBlyyC5HxI1vpwovpUk1daOqwAWxRStvkLmTJ4+zjzcSHY6f0 6Tp5A+O+H2/xtnSfU9wB8FAJDK/XypbG1gGwcPNGzILhEjpZqDEca83jNrODMg8eV asl6kYmO5702wttSkg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from user-Inspiron-15-5518 ([59.92.162.6]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1M1psI-1rfAVf1Q2i-002E09; Thu, 22 Feb 2024 03:17:23 +0100 In-Reply-To: <87sf219ntf.fsf@gmx.net> (James Thomas's message of "Sat, 10 Feb 2024 05:45:40 +0530") X-Provags-ID: V03:K1:YatBzcj0onUf8Xe2qiMe3PtLqxflv5rXT2l3hJFch72LBKQ442S m3MwceyIARon1iSLcZMKeTOdk4uq4JVN1b+zYrOA2JWqLL8fPCVs5011ttL36Yikzg8Mm5N QW8IUuUyAbbr1to6Wl5umzta9qnTANN4DYCGSfiMDyh4qG5Nnna63rwI07dLSd6WMFH75j8 6nIYBPNTWZHb852/xpofg== UI-OutboundReport: notjunk:1;M01:P0:XTS/4Imsf7g=;Q4JXXyd0GLkYc7pdVoNrmmSTqgP sQ8ioqns/wi4OuFOB9DWaL7j//aNl6zUAXkUrFjy4AfKaNKv5qynGo/7jRwFbX9KQ1VQI31sU tmxF9MIXXKPb3n9C/V/oDiawTDX1BaQfb4VkeB5CEB+mHE6vb1ZL/jPLvy4QS+A7LAv3cOzYj UgUDJi5uNTZ6A6eS48Vyrp8QuW+4fKASLHnzGS9o3PRmRRFWXzA0Po9XtSd4jHlBGQK/cQvzK 6zTY8Ex48VnpwlG/8I6RcOzKf795PXVAMeVTFHh27uS6XOMD/t1XwBssTPsE9wRKb3AQ1gSF7 qFxBpsIGEBtBSu+UAtWiMR+Ti/9VKfRcfc/P3xmLbqTG44Qub0pVlJ/7wt/By6H22gH1HbkJb zeDwkgEk5Br028K2/SZoD200WpeIEmSLdKh7X3QTBqtpQTdW9xPIrnVYMrKvZW5VtovW8eSaR drJCdjbvihUj9ny1yT4JWTj3YOeUEtxMGkPbofgb3UIzg0GaAJ+iM+yoGZfPZBJ0VO+QkNwYt u/CfQsntzSk8bdvfzaxbonAL9TnRBkzKZv7EdlZQcdJ4GHCToIVC36EWb012lcI7+yNjSuZ6M gIajCHH5NKx18sAfKQxpcphqlMn+z0Q/0m0lYKw2Vt5poyOF2PPbqXRYwVX8XKqDY26zefBdx VBWEuzcVjhlSFLZNZIllc5CUCFjxa+OE8z2IlXbSfYRzPV02wKMmufQSpBHr153Y3bq0Xv47Z Y9LTnaF7lqPlRJ/QPjPuP3NrJfRrEjoaAZBFoM5+ggNdgFIzWPTWzHVwDbvcQ/+JeEAMn4fo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280425 Archived-At: James Thomas wrote: > Daniel Semyonov wrote: > >>>>>>> James Thomas writes: >> >> >> If the posts appear in a chronological order, it should end up >> >> being correct. I think what's happening is that the feed you're >> >> testing actually uses a reverse chronological order for posts. >> >> If not, send me the feed, I might be misunderstanding something. >> >> > Hmm.. It seems to be happening that way for every server I used: >> >> > git.savannah.gnu.org/cgit/emacs.git/atom/?h=3Dmaster >> >> > rss.slashdot.org/Slashdot/slashdotMainatom:Slashdot >> >> > github.com/emacs-mirror/emacs/commits.atom >> >> These feeds (except for the second one which I can't access) are in >> reverse-chronological order. > > Right. I was hoping that that could be made the default. > > But I think the patch is fine to be included as it is; from my 1-2 weeks > of testing. > > Cheers, > James This doesn't seem to work for some feeds such as: en.wikipedia.org/w/index.php?title=3DSpecial:RecentChanges&feed=3Datom thehackernews.com/feeds/posts/default In the first one above, is the colon character to blame? Another thing: I've been using your branch also with my addition below for assuming reverse-chronological as a default (Sorry! But it was really bugging me! :-)). diff --git a/lisp/gnus/nnatom.el b/lisp/gnus/nnatom.el index 2fcf59c1441..9f2b9c359aa 100644 =2D-- a/lisp/gnus/nnatom.el +++ b/lisp/gnus/nnatom.el @@ -64,14 +64,16 @@ nnatom--read-feed (when (eq (car data) 'top) (setq data (assq 'feed data))) (dom-add-child-before data auth) - (catch :stop ; Collect feed authors, stop at first en= try. - (dolist (child (cdddr data)) - (let ((tag (car-safe child))) - (if (eq tag 'entry) - (throw :stop data) - (and (or (eq tag 'author) - (eq tag 'contributor)) - (dom-add-child-before auth child))))) + (let ((prev (cddr data))) + (while-let ((next (cdr prev)) + (child (car-safe next)) + (tag (car-safe child)) + (_ (not (eq tag 'entry)))) + (and (or (eq tag 'author) + (eq tag 'contributor)) + (dom-add-child-before auth child)) + (setq prev next)) + (setcdr prev (nreverse (cdr prev))) data))))))) (defvoo nnatom-read-feed-function #'nnatom--read-feed nil nnfeed-read-feed-function) My case for such a change: - Reverse-chronological makes sense as a default because a feed link only guarantees to provide the latest updates, not an unbroken chain of all events since the beginning. - nnrss.el does it that way: see the 'nreverse' in line #643. - Performance impact should be minimal because nreverse is O(n) and perhaps having to sort by date afterward (rather than simply use the existing number) would more than compensate for that. - Running -catchup-to-here (on a datetime-sorted Summary buffer) will only have to record a single article number range in the newsrc. (My code is probably not as beautiful as many would like it to be) Would like to know your thoughts. Regards, James