* Re: How to maintain newsrc.eld clean and tidy
@ 2024-10-28 14:41 Dilip
0 siblings, 0 replies; 10+ messages in thread
From: Dilip @ 2024-10-28 14:41 UTC (permalink / raw)
To: Björn Bidar; +Cc: ding
> The rest of my config is here below:
> https://github.com/Thaodan/emacs.d/blob/master/init.org
Thank you for sharing dotfiles. This will help me find something new ;)
--
Best,
Dilip
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to maintain newsrc.eld clean and tidy
2024-11-02 0:53 ` James Thomas
@ 2024-11-03 7:56 ` Dilip
0 siblings, 0 replies; 10+ messages in thread
From: Dilip @ 2024-11-03 7:56 UTC (permalink / raw)
To: James Thomas; +Cc: ding
> Simple: add a -request-compact-group back-end function for nntp. :-)
That should have been the solution, unfortunately the nntp backend does
not support it i guess.
Even the manual says its only supported by nnml.
> ‘G z’
>
> Compact the group under point (‘gnus-group-compact-group’).
> Currently implemented only in nnml (*note Mail Spool::). This
> removes gaps between article numbers, hence getting a correct total
> article count.
Although, thanks for the input.
--
Best,
Dilip
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to maintain newsrc.eld clean and tidy
2024-10-26 18:33 Dilip
2024-10-26 19:48 ` Bob Newell
@ 2024-11-02 0:53 ` James Thomas
2024-11-03 7:56 ` Dilip
1 sibling, 1 reply; 10+ messages in thread
From: James Thomas @ 2024-11-02 0:53 UTC (permalink / raw)
To: Dilip; +Cc: ding
Dilip wrote:
> 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.
Simple: add a -request-compact-group back-end function for nntp. :-)
> Thank you for taking time to read this.
No problem.
Regards,
James
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to maintain newsrc.eld clean and tidy
2024-10-27 5:38 ` Dilip
2024-10-27 9:51 ` Andreas Schwab
@ 2024-10-28 13:20 ` Björn Bidar
1 sibling, 0 replies; 10+ messages in thread
From: Björn Bidar @ 2024-10-28 13:20 UTC (permalink / raw)
To: Dilip; +Cc: ding
Dilip <idlip@protonmail.com> writes:
>> Personally I just have a Gnus demon timer to save newsrc, sync with
>> Nextcloud and the close whenever I'm done on that machine.
> It has become an habit to hit 's' to save after I read, Just like 'C-x
> C-s'
> I will also try to make demon timer.
Here's what I do:
(defun gnus-demon-scan-news-2 ()
(when gnus-plugged
(let ((win (current-window-configuration))
(gnus-read-active-file nil)
(gnus-check-new-newsgroups nil)
(gnus-verbose 2)
(gnus-verbose-backends 5))
(unwind-protect
(save-window-excursion
(when (gnus-alive-p)
(with-current-buffer gnus-group-buffer
(gnus-group-get-new-news gnus-activate-level))))
(set-window-configuration win)))))
(defun save-gnus-newsrc ()
(if (and (fboundp 'gnus-group-exit)
(gnus-alive-p))
(with-current-buffer (get-buffer "*Group*")
(gnus-save-newsrc-file))))
(setopt gnus-demon-handlers '((gnus-demon-scan-mail 120 60)
(gnus-demon-close-connections nil 3)
(save-gnus-newsrc nil 1)
(gnus-demon-scan-news-2 60 nil)))
The rest of my config is here below:
https://github.com/Thaodan/emacs.d/blob/master/init.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to maintain newsrc.eld clean and tidy
[not found] ` <87plnlr95i.fsf@protonmail.com>
@ 2024-10-27 13:43 ` Andreas Schwab
0 siblings, 0 replies; 10+ messages in thread
From: Andreas Schwab @ 2024-10-27 13:43 UTC (permalink / raw)
To: Dilip; +Cc: ding
On Okt 27 2024, Dilip wrote:
> But you can see 20, 26… post exist,
But the server never advertises them.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to maintain newsrc.eld clean and tidy
2024-10-27 5:38 ` Dilip
@ 2024-10-27 9:51 ` Andreas Schwab
[not found] ` <87plnlr95i.fsf@protonmail.com>
2024-10-28 13:20 ` Björn Bidar
1 sibling, 1 reply; 10+ messages in thread
From: Andreas Schwab @ 2024-10-27 9:51 UTC (permalink / raw)
To: Dilip; +Cc: ding
On Okt 27 2024, Dilip wrote:
> Now to restate, I'd like to know why this break in article sequence
> although I have read it?
Did you? Does that article actually exist?
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to maintain newsrc.eld clean and tidy
[not found] ` <4904.38762806065$1729976159@news.gmane.org>
@ 2024-10-27 5:38 ` Dilip
2024-10-27 9:51 ` Andreas Schwab
2024-10-28 13:20 ` Björn Bidar
0 siblings, 2 replies; 10+ messages in thread
From: Dilip @ 2024-10-27 5:38 UTC (permalink / raw)
To: ding; +Cc: ding
> Personally I just have a Gnus demon timer to save newsrc, sync with
> Nextcloud and the close whenever I'm done on that machine.
It has become an habit to hit 's' to save after I read, Just like 'C-x
C-s'
I will also try to make demon timer.
Also I would like to update on the saved data;
> ("news...." 3 ((1 . 100)) ((unexist) (seen (1 . 10))))
I observed that this actually is as expected is simple, like
'... (seen (1 . 10))...'
But for some group, it misses some points as in;
'... (seen (1 . 2) (4 . 6))...'
^ As you see here, 3 is missing/break. In some groups I happened to
notice that 3 is updated or duplicate of 2 or 4 (adjacent article)
Now to restate, I'd like to know why this break in article sequence
although I have read it?
Thank you for considering this!
--
Best,
Dilip
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to maintain newsrc.eld clean and tidy
2024-10-26 19:48 ` Bob Newell
@ 2024-10-26 20:54 ` Björn Bidar
[not found] ` <4904.38762806065$1729976159@news.gmane.org>
1 sibling, 0 replies; 10+ messages in thread
From: Björn Bidar @ 2024-10-26 20:54 UTC (permalink / raw)
To: Bob Newell; +Cc: ding
Bob Newell <bobnewell@bobnewell.net> writes:
> As to coordinating with other computers, tablets and phones, I
> sync .newsrc.eld across devices (with an rsync service and
> appropriate scripts).
Personally I just have a Gnus demon timer to save newsrc, sync with
Nextcloud and the close whenever I'm done on that machine.
If I forget that I can just take over the file on another machine as
Gnus notices if another program has touched the file and stops saving.
When I then return to the machine I quit without saving in that Gnus and
then start Gnus again.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How to maintain newsrc.eld clean and tidy
2024-10-26 18:33 Dilip
@ 2024-10-26 19:48 ` Bob Newell
2024-10-26 20:54 ` Björn Bidar
[not found] ` <4904.38762806065$1729976159@news.gmane.org>
2024-11-02 0:53 ` James Thomas
1 sibling, 2 replies; 10+ messages in thread
From: Bob Newell @ 2024-10-26 19:48 UTC (permalink / raw)
To: ding
Aloha,
This topic interests me as well and I also could use some
tips as .newsrc.eld grows to be very very large after some time
and I don't know a way of cleaning it out other than risky
manual edits.
As to coordinating with other computers, tablets and phones, I
sync .newsrc.eld across devices (with an rsync service and
appropriate scripts).
But I would really like to know how to safely prune
.newsrc.eld. Maybe something already exists that I'm simply
not aware of?
Mahalo one and all
--
Bob Newell
Honolulu, Hawai`i
- Via GNU-Linux/Emacs/Gnus/BBDB
^ permalink raw reply [flat|nested] 10+ messages in thread
* How to maintain newsrc.eld clean and tidy
@ 2024-10-26 18:33 Dilip
2024-10-26 19:48 ` Bob Newell
2024-11-02 0:53 ` James Thomas
0 siblings, 2 replies; 10+ messages in thread
From: Dilip @ 2024-10-26 18:33 UTC (permalink / raw)
Cc: ding
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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-11-03 7:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-28 14:41 How to maintain newsrc.eld clean and tidy Dilip
-- strict thread matches above, loose matches on Subject: below --
2024-10-26 18:33 Dilip
2024-10-26 19:48 ` Bob Newell
2024-10-26 20:54 ` Björn Bidar
[not found] ` <4904.38762806065$1729976159@news.gmane.org>
2024-10-27 5:38 ` Dilip
2024-10-27 9:51 ` Andreas Schwab
[not found] ` <87plnlr95i.fsf@protonmail.com>
2024-10-27 13:43 ` Andreas Schwab
2024-10-28 13:20 ` Björn Bidar
2024-11-02 0:53 ` James Thomas
2024-11-03 7:56 ` Dilip
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 NNTP newsgroup(s).