* Score on same subject to avoid read message with this subject in future...
@ 2013-04-07 21:59 Oleksandr Gavenko
2013-04-08 21:33 ` Oleksandr Gavenko
2013-04-10 21:14 ` Oleksandr Gavenko
0 siblings, 2 replies; 4+ messages in thread
From: Oleksandr Gavenko @ 2013-04-07 21:59 UTC (permalink / raw)
To: info-gnus-english
I found useful hide uninterested threads by:
.emacs:
(setq gnus-use-adaptive-scoring t)
(setq gnus-default-adaptive-score-alist
'(
(gnus-del-mark (followup -50))
(gnus-killed-mark (followup -50))
))
all.SCORE:
(
(mark-and-expunge -20)
(thread-mark-and-expunge -20)
)
and pressing 'T k' or 'k' or 'C-k' or 'C-M-k'. Uninterested parts marked as
killed and when I leave group 'group.ADAPT' file save message-ids of killed
articles and any followups to them didn't showed.
But sometimes threads are broken or group are broken (in case of forum to NNTP
gateway).
So I try to implement killing by subject:
(defun my-gnus-summary-kill-same-subject (&optional unmark)
(interactive "P")
(when (or (not (integerp unmark)) (< 0 unmark))
(gnus-summary-score-entry
"subject" (gnus-simplify-subject-fuzzy (gnus-summary-article-subject))
's (- gnus-score-interactive-default-score) (current-time-string)))
(gnus-summary-kill-same-subject unmark))
(eval-after-load 'gnus-summary
'(define-key gnus-summary-mode-map (kbd "C-k") #'my-gnus-summary-kill-same-subject))
I know about 'I' key binding but it require a lot of typing and attention...
Is that function a good way to hide uninterested threads by subject?
--
Best regards!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Score on same subject to avoid read message with this subject in future...
2013-04-07 21:59 Score on same subject to avoid read message with this subject in future Oleksandr Gavenko
@ 2013-04-08 21:33 ` Oleksandr Gavenko
2013-04-10 20:32 ` Oleksandr Gavenko
2013-04-10 21:14 ` Oleksandr Gavenko
1 sibling, 1 reply; 4+ messages in thread
From: Oleksandr Gavenko @ 2013-04-08 21:33 UTC (permalink / raw)
To: info-gnus-english
On 2013-04-08, Oleksandr Gavenko wrote:
> So I try to implement killing by subject:
>
> (defun my-gnus-summary-kill-same-subject (&optional unmark)
> (interactive "P")
> (when (or (not (integerp unmark)) (< 0 unmark))
> (gnus-summary-score-entry
> "subject" (gnus-simplify-subject-fuzzy (gnus-summary-article-subject))
> 's (- gnus-score-interactive-default-score) (current-time-string)))
> (gnus-summary-kill-same-subject unmark))
> (eval-after-load 'gnus-summary
> '(define-key gnus-summary-mode-map (kbd "C-k") #'my-gnus-summary-kill-same-subject))
One problem that I found with this function - it doesn't save
'gnus-summary-score-entry' to group.SCORE file on group exiting unless I flush
by 'V F'.
How can I do this automatically?
Do I need alter 'gnus-exit-group-hook'?
--
Best regards!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Score on same subject to avoid read message with this subject in future...
2013-04-08 21:33 ` Oleksandr Gavenko
@ 2013-04-10 20:32 ` Oleksandr Gavenko
0 siblings, 0 replies; 4+ messages in thread
From: Oleksandr Gavenko @ 2013-04-10 20:32 UTC (permalink / raw)
To: info-gnus-english
On 2013-04-09, Oleksandr Gavenko wrote:
> On 2013-04-08, Oleksandr Gavenko wrote:
>
>> So I try to implement killing by subject:
>>
>> (defun my-gnus-summary-kill-same-subject (&optional unmark)
>> (interactive "P")
>> (when (or (not (integerp unmark)) (< 0 unmark))
>> (gnus-summary-score-entry
>> "subject" (gnus-simplify-subject-fuzzy (gnus-summary-article-subject))
>> 's (- gnus-score-interactive-default-score) (current-time-string)))
>> (gnus-summary-kill-same-subject unmark))
>> (eval-after-load 'gnus-summary
>> '(define-key gnus-summary-mode-map (kbd "C-k") #'my-gnus-summary-kill-same-subject))
>
> One problem that I found with this function - it doesn't save
> 'gnus-summary-score-entry' to group.SCORE file on group exiting unless I flush
> by 'V F'.
>
> How can I do this automatically?
>
> Do I need alter 'gnus-exit-group-hook'?
I found a root of problem. Instead of:
>> (eval-after-load 'gnus-summary
I need use:
(eval-after-load 'gnus-sum ...)
--
Best regards!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Score on same subject to avoid read message with this subject in future...
2013-04-07 21:59 Score on same subject to avoid read message with this subject in future Oleksandr Gavenko
2013-04-08 21:33 ` Oleksandr Gavenko
@ 2013-04-10 21:14 ` Oleksandr Gavenko
1 sibling, 0 replies; 4+ messages in thread
From: Oleksandr Gavenko @ 2013-04-10 21:14 UTC (permalink / raw)
To: info-gnus-english
On 2013-04-08, Oleksandr Gavenko wrote:
> So I try to implement killing by subject:
>
> (defun my-gnus-summary-kill-same-subject (&optional unmark)
> (interactive "P")
> (when (or (not (integerp unmark)) (< 0 unmark))
> (gnus-summary-score-entry
> "subject" (gnus-simplify-subject-fuzzy (gnus-summary-article-subject))
> 's (- gnus-score-interactive-default-score) (current-time-string)))
> (gnus-summary-kill-same-subject unmark))
> (eval-after-load 'gnus-summary
> '(define-key gnus-summary-mode-map (kbd "C-k") #'my-gnus-summary-kill-same-subject))
>
> I know about 'I' key binding but it require a lot of typing and attention...
My latest implementation:
(defvar my-gnus-summary-kill-same-subject-min-len 8
"Minimal length of subject string to ignore this subject.")
(defun my-gnus-summary-kill-same-subject (&optional unmark)
"Add negative scores for all articles with same subject."
(interactive "P")
(when (or (not (integerp unmark)) (< 0 unmark))
(let ( (subj (gnus-simplify-subject-fuzzy (gnus-summary-article-subject))) )
(when (<= (length subj) my-gnus-summary-kill-same-subject-min-len)
(gnus-summary-score-entry
"subject" subj
's (- gnus-score-interactive-default-score) (current-time-string)))))
(gnus-summary-kill-same-subject unmark))
(eval-after-load 'gnus-sum
'(define-key gnus-summary-mode-map (kbd "C-k") #'my-gnus-summary-kill-same-subject))
It like defadvice for 'gnus-summary-kill-same-subject' but only for key
binding...
Also I put limits for too short subjects to prevent false matches.
After using this function to group.SCORE file added entries like:
("subject"
("How to deal with \"Archive\" and \"delete\" in gmail?" -100 734966 s))
--
Best regards!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-10 21:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-07 21:59 Score on same subject to avoid read message with this subject in future Oleksandr Gavenko
2013-04-08 21:33 ` Oleksandr Gavenko
2013-04-10 20:32 ` Oleksandr Gavenko
2013-04-10 21:14 ` Oleksandr Gavenko
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).