How to maintain newsrc.eld clean and tidy

Dilip <[email protected]> Sat, 26 Oct 2024 18:33:48 +0000
Newsgroups gmane.emacs.gnus.general
Message-ID <[email protected]>
The following message is a courtesy copy of an article
that has been posted to gmane.emacs.gnus.general as well.

Hi gnus!

Gnus saves the state of reading into ~gnus-newsrc-alist~ as in elisp
data form.

When I read all messages from a group, I would expect the data form to
shrink or minimize, but I still see long form of data for that group.
Note: By read everything, for old messages I run ~gnus-topic-catchup-articles~ (=c=) on group buffer

Eg:

#+begin_src emacs-lisp
(setq gnus-newsrc-alist
      '( ("nntp+news.gmane.io:gmane.comp.gnu.guix.user" 3 ((1 . 18968))
          ((unexist) (seen (1 . 18968))) "nntp:news.gmane.io") ))
#+end_src
^ I'd expect this form to show that all have been read from 1-18968.

But actually it saves data in session wise based on what were read.
#+begin_src emacs-lisp
(setq gnus-newsrc-alist
      '( ("nntp+news.gmane.io:gmane.comp.gnu.guix.user" 3 ((1 . 18968))
          ((unexist) (seen (18957 . 18968) (18937 . 18944) (18912 . 18920) ........)) "nntp:news.gmane.io") ))
#+end_src
^ But it looks this way. Which create very long lines.

May I know the significance of this form? Why can't it be simple?

After searching up a bit, I notice that =gnus-topic-alist= and =gnus-topic-topology= and be easily maintained manually by config.

So may I get some tips to maintain newsrc file clean and in version control. As I do want to sync with phone (android emacs app) to read as well.
Basically I'm expecting to want that =gnus-newsrc-alist= (hash-table) to be simple in a way that only reports
#+begin_src text
("news...." 3 ((1 . 100)) ((unexist) (seen (1 . 10))))
#+end_src

and not splits of =(1 . 2) (3 . 4) (5 . 10)= for very long lines.

Thank you for taking time to read this.
-- 
Best,
Dilip